home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
misc
/
unix.2
< prev
next >
Wrap
Text File
|
1980-01-01
|
13KB
|
237 lines
===============================================================================
rush2112
pRESENTS
a hale pRODUCTION
h ACKERS a GAINST l AW e NFORCEMENT
cALL hale cENTRAL. (619)472-0XXX
aCTIVE hale MEMBERS ARE: rIPPER, tRASHMAN, rUSH2112.
tHE uNDERGROUND nEWSLETTER: vOL i. iSSUE i, pART ii
===============================================================================
nOTE: fEEL FREE TO DISTRIBUTE THE FILE PROVIDED NONE OF ITS CONTENTS OR
CREDITS ARE CHANGED.
dATE: sEPTEMBER 3, 1989.
tOPIC: a gUIDE TO uNIX sYSTEMS, pART ii.
iN pART i OF tun, i EXPLAINED THE VERY BASIC FUNDAMENTALS OF THE
uNIX OPERATING SYSTEM. iN pART ii, WHICH i'M SURE A LOT OF YOU WILL BE
MORE INTERESTED IN, i WILL SHOW YOU A SAMPLE RUN OF HOW AND WHAT A HACKER
WOULD DO (FOR EXAMPLE - WHAT i WOULD DO) IF i WERE ON SOME UNKNOWN uNIX
ACCOUNT.
i. aCCESS TO A uNIX ACCOUNT.
fIRST OFF, YOU NEED TO FIND YOURSELF AN ACCOUNT. bRIEFLY, HERE ARE
SOME OF THE MOST POPULAR METHODS i USE SOME OF WHICH ARE HARD AND SOME OF
WHICH ARE EASY.
1. yOU CAN TRY TO HACK ONE OUT AT THE LOGIN: PROMPT. oF COURSE THIS
IS THE OLD TRADITIONAL METHOD OF TRIAL AND ERROR AND SOME STANDARD LOGIN
ACCOUNTS. (iT IS SUGGESTED BUT AS A LAST RESORT - THOUGH IT HAS WORKED FOR ME
IN THE PAST i OPT FOR OTHER ROUTES TO GETTING AN ACCOUNT.) wELL, THE FIRST
THING OF COURSE WHEN YOU HIT A uNIX SYSTEM IS TO TRY THE STANDARD ACCOUNTS.
tHIS WOULD INCLUDE: UUCP, NUUCP, DAEMON, FTP
sOME SYSTEMS INCLUDE PUBLIC ACCOUNTS THAT YOU MAY ALSO WANT TO TRY
AS MANY OF THEM GIVE YOU SHELL ACCESS.
yOU MIGHT WANT TO TRY: GUEST, INFO, BBS, GAMES
sOONER OR LATER, YOU'LL FIND A SYSTEM THAT HAS A VULNERABILITY LIKE
NON-PASSWORDED ACCOUNTS OR SIMPLE PASSWORDS FOR A LOGIN. sOME OF THE THINGS
YOU SHOULD TRY ARE THE LOGIN NAMES AS A PASSWORD. eVEN THE MAGAZINE unix
rEVIEW CLAIMS IT WAS SURPRISED HOW ENTRIES IN /ETC/PASSWD ON SYSTEMS THEY
CHECKED USED LOGIN NAMES AS THE ACTUAL PASSWORDS. mY OWN EXPERIENCES SHOWS
THIS IS TRUE.
2. yOU CAN GET ONE IF YOU KNOW SOMEONE WHO ALREADY HAS A uNIX ACCOUNT.
(i FIND THIS WORKS VERY WELL, BY WORKING FROM THE INSIDE YOU'RE GUARANTEED TO
GET AN ACCOUNT IF YOU KNOW WHAT YOU'RE DOING.)
oF COURSE THE HACK ATTACK FROM THE LOGIN: PROMPT COULD BE FRUITLESS
AND YOU MAY NEVER GET AN ACCOUNT THIS WAY SO THE BEST WAY TO GET INTO A uNIX
SYSTEM IS FROM THE INSIDE. tHIS MEANS OF COURSE YOU KNOW SOMEONE ON THAT
SYSTEM WITH AN ACCOUNT, WHO COULD HELP YOU FIND AN ACCOUNT EITHER BY SEARCHING
THE /ETC/PASSWD FOR NON-PASSWORDED ACCOUNT WITH SHELL ACCESS. oR HUNTING THE
ENTIRE FILE SYSTEM FOR FILES WITH "OTHER" AND/OR "GROUP" PRIVILEGES IN HOPES
OF FINDING A PASSWORD OR SOME ACCOUNT NAMES OR OTHER NEAT INFO TO GET YOU
STARTED ON uNIX.
3. yOU CAN TRY A TROJAN HORSE PROGRAM TO GAIN SOMEONE'S LOGIN AND
PASSWORD. sOME POPULAR TROJAN HORSES ARE PASSWORD CAPTURING PROGRAMS AND
EMULATORS THAT EMULATOR THE LOGIN SCREEN. tHIS METHOD BY-FAR IS THE easiest
WAY TO DO IT BUT IT REQUIRES YOU HAVE AN ACCOUNT TO RUN THE TROJAN HORSE
FROM. tHIS CAN BE DONE EASILY IF YOUR FRIEND LETS YOU USE HIS ACCOUNT. yOU
WON'T EVEN HAVE TO TELL HIM WHAT YOU'RE USING IT FOR.
i'LL HAVE MORE ABOUT THIS AT A LATER DATE. mAYBE AN ISSUE ON TROJAN
HORSES AND EMULATORS, ETC.. IS IN ORDER?
ii. wORKING WITH AN ACCOUNT.
oNCE YOU HAVE ACCESS SOME IMPORTANT POINTS TO REMEMBER AND DO ARE:
1. sET HISTORY TO 0 IF ON bsd OR ERASE .HISTORY ON sYS v BEFORE LOGOFF
2. tURN OFF YOUR MESSAGES.
3. gET A BUFFER OF THE /ETC/PASSWD.
4. gET A BUFFER OF THE LOGIN PROCESS.
5. gET A BUFFER OF THE entire FILE SYSTEM ONLINE.
aSSUMING THAT YOU HAVE GOTTEN INTO SOMEONE ELSE'S ACCOUNT, THE FIRST
THING TO DO WHEN YOU LOG IN IS SHUT YOUR MESSAGES OFF WITH "MESG N" (MESSAGES
NO). tHIS WILL TURN OFF WRITE PERMISSION TO YOUR TTY IN /DEV/TTYxx (WHERE xx
IS YOUR TTY NUMBER). iT WILL PREVENT PEOPLE FROM WRITING TO YOU WHILE YOU'RE
ONLINE BUFFERING SYSTEM INFORMATION. iT WILL ALSO STOP PEOPLE FROM
REDIRECTING OUTPUT TO YOUR TTY. pLUS, YOU'LL BE BUSY SO YOU WANT NO
DISTURBANCES OF ANY TYPE.
iF YOU'RE ON AN ACCOUNT RUNNING CSH YOU SHOULD SET THE HISTORY TO 0.
yOU CAN DO THAT WITH THE COMMAND 'SET HISTORY=0'. hISTORY IS JUST THAT... IT
KEEPS A HISTORY OF EVERYTHING THAT YOU DO, ALL THE COMMANDS YOU PASS TO THE
CSH IS STORED. tYPING 'HISTORY' BY ITSELF WILL SHOW YOU A LIST OF PREVIOUS
COMMANDS ENTERED BY THE USER. bY SETTING IT TO 0, IT WILL NOT RECORD YOUR
COMMANDS FROM THE SHELL. oN sYS v UNDER bOURNE SHELL, HISTORY IS STORED
SOMETIMES IN THE "HIDDEN FILE" .HISTORY IN YOUR HOME DIRECTORY ($home/.HISTORY)
yOU SHOULD DELETE THE FILE BEFORE LOGGING OFF.
nOW YOU SHOULD GET A COPY OF THE PASSWORD FILE. tHIS IS EASILY
ACCOMPLISHED WITH 'CAT /ETC/PASSWD'. mAKE SURE YOU BUFFER THE CONTENTS, YOU'LL
NEED THIS FOR LATER. yOU MAY ALSO WISH TO GET THE /ETC/GROUP FILE, THIS FILE
HAS INFORMATION ON ALL THE GROUPS ON THE SYSTEM ALONG WITH MEMBERS OF EACH
GROUP. (i'LL TALK ABOUT GROUPS IN ANOTHER FILE.) jUST TYPE 'CAT /ETC/GROUP'
AND BUFFER ITS CONTENTS.
nOW COMES THE INTERESTING PART. yOU'LL WANT TO GET A LISTING OF EVERY
SINGLE FILE ON THE SYSTEM AND BUFFER IT. hERE'S WHAT YOU WOULD DO:
$CD /
(AT THIS POINT OPEN YOUR BUFFER)
$FIND . -TYPE F -EXEC LS -AL *! \;
(WHEN THIS IS FINISH, CLOSE YOUR BUFFER)
tHIS WILL TAKE QUITE A WHILE IF THE SYSTEM YOU'RE ON HAS A LOT OF
FILES. bASICALLY, YOU ARE GOING TO THE ROOT DIRECTORY ('CD /') WHICH IS THE
TOP OF THE DIRECTORY TREE HIERARCHY. fROM THERE YOU WILL EXECUTE THE 'FIND'
COMMAND WHICH IS A FILE FIND UTILITY. wE ARE ASKING IT TO PRINT OUT ALL THE
FILENAMES OF TYPE 'F' (WHICH IS NORMAL FILE) FROM THE CURRENT DIRECTORY (WHICH
IS ROOT) AND ALL DIRECTORIES BELOW IT (WHICH IS THE REST OF THE DIRECTORY
TREE) AND SEARCH ALL FILES RECURSIVELY AND PASS ITS FINDINGS VIA -EXEC TO
THE "LS" UTILITY WHICH WILL LIST ITS FILE INFORMATION (-AL INCLUDING FILE
ATTRIBUTES).. BUT ANYWAY, IF THIS IS TOO COMPLICATED TO FOLLOW, DON'T WORRY.
tRY TYPING 'MAN FIND' FOR PERHAPS A BETTER EXPLANATION. sUFFICE IT TO SAY
YOU SHOULD NOW HAVE BUFFERED A LISTING OF ALL FILES IN THE DIRECTORY TREE.
nEXT TAKE A LOOK AT YOUR HIDDEN FILES LIKE .PROFILE ON sYS v OR
.LOGIN AND .CSHRC ON bsd uNIX. tHEY CONTAIN LOGIN INFORMATION SUCH AS COMMANDS
TO AUTOMATICALLY EXECUTE AND PERHAPS SOME ALIASES DEFINITIONS. iF THERE IS
ANYTHING INTERESTING YOU SHOULD BUFFER IT.
fIND OUT WHO THE HELL IS ON AT THE TIME WITH THE "WHO" COMMAND. tHEN
FIND OUT WHAT EVERYONE IS DOING WITH THE "PS" COMMAND. fOR EXAMPLE ON sYS v
uNIX YOU MIGHT DO SOMETHING LIKE THIS:
WHO -htU (SEE "MAN WHO" FOR WHAT THE FULL EXPLANATION OF ALL SWITCHES)
- BASICALLY THIS SHOWS ALL USERS ON CURRENTLY AND GIVES OTHER
INFORMATION ON THEIR TTY STATUS LIKE "MESG Y" OR "MESG N" (a + MEANS
MESSAGES ARE ON, A - MEANS MESSAGES ARE OFF.) iT WILL ALSO REPORT
TTY idle TIME, NICE TO KNOW IF SOMEONE IS WORKING OR NOT.
aFTER YOU SEE WHO'S ON, YOU'LL WANT TO KNOW WHAT THEY'RE DOING. tHIS CAN BE
DONE WITH THE "PS" (pROCESS sTATUS) COMMAND:
PS -FU USERNAME (READ THE ON-LINE MANUAL FOR FULL OPTIONS)
- WHERE USERNAME IS THE LOGIN NAME OF WHOEVER IT IS THAT YOU WANTED TO
CHECK UP ON.
PS -FA - MORE
- SHOWS all PROCESSES ON THE SYSTEM. pIPING THROUGH MORE WILL PAUSE
TTY OUTPUT EVERY SCREENFUL.
uSING THE "PS" UTILITY IS HANDY IN GETTING SOME INTERESTING PATHS TO
PROGRAMS RUN BY USERS ON THE SYSTEM AS IT SHOWS THE PATH TO THE ENTIRE PROCESS.
i HAVE FOUND MANY NEAT PROGRAMS AND UTILITIES BY WATCHING WHAT OTHER PEOPLE
DO ON THE SYSTEM WITH THE "PS" COMMAND.
aT THIS POINT YOU ARE INTERESTED IN GETTING YOUR OWN ACCOUNT IF
POSSIBLE. yOU HAVE SEVERAL OPTIONS NOW. yOU COULD INSTALL A TROJAN HORSE
PROGRAM IN HOPES OF GETTING AN ACCOUNT OR YOU MAY WANT TO PLAY AROUND WITH
THE ACCOUNT YOU HAVE.
iNSTALLING A TROJAN HORSE. i'LL BE GOING INTO MORE DETAILS ABOUT
TROJAN HORSES IN A FUTURE ISSUE OF tun AS THERE ARE MANY WAYS TO DO THIS.
yOU SHOULD CHECK FIRST TO SEE THAT YOUR uNIX SYSTEM HAS A c COMPILER ON IT.
(YES, YOU'LL UNFORTUNATELY HAVE TO KNOW A LITTLE BIT OF PROGRAMMING SO GO
GET THOSE BOOKS ON c AND START READING!). iF IT DOESN'T HAVE A c COMPILER
YOU'LL BE OUT OF LUCK, BUT NOT COMPLETELY HELPLESS, YOU COULD START WRITING
SHELL SCRIPTS (AGAIN PROBABLY ANOTHER ISSUE OF tun TO COVER SHELL SCRIPTS).
iF YOU WANT TO PLAY AROUND ON THE SYSTEM, HERE ARE A FEW THINGS TO DO.
oNE OF THE MOST BASIC TRICKS OF uNIX IS CALLED I/O REDIRECTION. tHIS IS A
PROCESS WHEREBY YOU "REDIRECT" STANDARD INPUT/OUTPUT TO SOME OTHER DEVICE.
aN EXAMPLE WOULD BE IF i WERE TO SEND A FILE TO MY SCREEN TO LOOK AT IT, i
WOULD REDIRECT THE OUTPUT TO ANOTHER FILE, OR SCREEN, OR PRINTER, OR ANY OTHER
DEVICE ON THE SYSTEM. lET'S GO WITH REDIRECTION TO A FILE FOR A SIMPLE FIRST
STEP. sUPPOSE i HAD A TEXT FILE CALLED "TEXTFILE001".
tO VIEW TO THE SCREEN i WOULD TYPE:
$CAT TEXTFILE001
wHAT HAPPENS WHEN YOU TYPE THE 'CAT' COMMAND IS IT VIEWS THE FILE AND SEND
ITS OUTPUT TO YOUR TTY OR TERMINAL SCREEN. nOW IF i WERE TO DO THIS:
$CAT TEXTFILE001 > NEWFILE
yOU CAN SEE THAT NOTHING HAPPENS TO THE SCREEN AND IT WILL COME BACK TO THE
MAIN PROMPT. hOWEVER YOU WILL NOW HAVE A NEW FILE CALLED "NEWFILE" WHOSE
CONTENTS ARE THOSE OF TEXTFILE001. tHE REDIRECTION SYMBOL > TOLD IT TO CAT
THE FILE TEXTFILE001 BUT REDIRECT STANDARD OUTPUT TO THE FILE CALLED "NEWFILE".
uSING THIS PRINCIPAL, YOU CAN TRY TO REDIRECT THINGS TO PEOPLE'S TTY'S
OR TERMINAL SCREEN. (nOTE - REDIRECTION TO TTY'S WILL NOT WORK ON bsd uNIX
VER 4.3 DUE TO A BUG FIX.) tHE WAY TO DO THAT IS LIKE THIS:
$CAT TEXTFILE001 > /DEV/TTYxx
wHERE xx IS THE TTY NUMBER YOU WISH THE STANDARD OUTPUT TO GO TO. sO FOR
EXAMPLE IF i WERE TO DO A 'WHO' COMMAND AND i FIND THAT THERE IS A USER NAME
'STEVE' ON THE SYSTEM ON 'TTY12' i COULD SEND THE TEXT FILE TO HIS TTY WITH:
$CAT TEXTFILE001 > /DEV/TTY12
nOW THE STANDARD OUTPUT OF 'CAT' WILL GO TO TTY12 WHICH BELONGS TO USER STEVE.
aNOTHER TRICK TO TO REDIRECT STTY OUTPUTS TO PEOPLE'S TTY'S. tHE
STTY COMMAND HANDLES CERTAINS SETUPS FOR YOUR TTY, INCLUDING HOW TO PROCESS
ERASE KEYS, INTERRUPT KEYS, BAUD RATE, HANGUPS, ETC... fOR A LIST TYPE
'MAN STTY' TO GET THE ON-LINE MANUAL ENTRY FOR STTY. aNYWAYS, THE COMMAND
STTY 0 WILL AUTOMATICALLY TERMINATE PHONE CONNECTION TO THE SYSTEM (I.E. HANG
YOU UP). sO IF YOU WERE TO TYPE:
$STTY 0
yOU WOULD GRACEFULLY EXIT THE SYSTEM WITH A &[1 no carrier OR SOME EQUIVALENT.
nOW USING REDIRECTION YOU CAN SEND YOUR STTY COMMANDS TO OTHER TTY'S. sO USING
THE ABOVE EXAMPLE OF STTY 0:
$STTY 0 > /DEV/TTY12
WILL HANG UP USER STEVE. uNFORTUNATELY, DUE TO THE WAY sYS v HANDLES STTY
PROCESSING, THIS WILL NOT WORK ON sYSTEM v OR LATER VERSIONS OF bsd uNIX
(4.3 TO BE EXACT.)
oTHER NASTY THINGS TO DO IS TO CAT BINARY FILES TO PEOPLE'S TTY. dUE
TO THE BIG FILE SIZES OF CERTAIN BINARY EXECUTABLES YOU SHOULD DO REDIRECTION
IN THE BACKGROUND..THAT IS WITH THE & SYMBOL AT THE END OF THE COMMAND LINE.
fOR EXAMPLE TO SEND THE "LS" BINARY FILE TO USER STEVE WE WOULD TYPE:
$CAT /BIN/LS > /DEV/TTY12 &
oNCE TYPED IN, YOU WILL GET A pROCESS id (pid) OR JOB NUMBER (ON bsd) FOR
THE BACKGROUND JOB. yOU WILL ALSO GET YOUR PROMPT BACK SO YOU CAN PROCEED
AS NORMAL WHILE uNIX IS SENDING THE LS BINARY TO USER STEVE. tO KILL THE
PROCESS YOU COULD TYPE:
$KILL -9 pid WHERE pid IS THE NUMBER RETURNED TO YOU FROM THE
BACKGROUND COMMAND.
oN bsd:
$KILL %JOBNUMBER FOR EXAMPLE IF THE JOB NUMBER RETURNED WAS 1 THEN
$KILL %1 WILL DO THE JOB.
tHIS IS HANDY TO REMEMBER SINCE DOING A PS -FU USERNAME ON YOUR USERNAME
WILL REVEAL YOU ARE SENDING HIM A BINARY FILE IN THE BACKGROUND. yOU COULD
EASILY BE DUBBED THE CULPRIT MESSING WITH PEOPLE'S TTY'S.
wELL, AT THIS POINT i WOULD LIKE TO WRAP UP pART ii. iF THERE ARE
TYPOS MY APOLOGIES.. IT'S LATE. pART iii WILL BE A BIT MORE TECHNICAL BUT
HOPEFULLY YOU'LL GET SOMETHING OUT OF IT. i WILL BE GOING OVER TROJAN HORSES
AND EMULATORS, AND PERHAPS A DISCUSSION OF FILE PROTECTIONS IS IN ORDER AND
OF COURSE HOW TO GET OTHER PEOPLE'S FILES AND GIVE YOURSELF MORE PERMISSION.
tHIS FILE IS FOR INFORMATIONAL PURPOSES ONLY.
bROUGHT TO YOU BY:
--------h.ACKERS--------a.GAINST-----------l.AW---------e.NFORCEMENT-----------
Text-Files 2: