home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / Hack / MISC / INTRHAC3.ZIP / INTRHAC3.TXT
Encoding:
Text File  |  1991-06-09  |  7.3 KB  |  113 lines

  1.  
  2. Title:   Introduction To Hacking - Part #3
  3. Date:    4/29/88
  4. Time:    11:18 am
  5.  
  6.  
  7.  
  8. ** The Basics Of Hacking II: Vax's  **   
  9. ** Unix is a trademark of bell labs ** 
  10. ** (and you know what *that* means) **  
  11.  
  12. Welcome to the Basics Of Hacking II: Vax's and Unix.  
  13.  
  14.    In this article, we discuss the unix system that runs on the various
  15. vax systems.  If you are on another unix-type system, some commands may 
  16. differ, but since it is licenced to bell, they can't make many changes.   
  17. Hacking onto a unix system is very difficult, and in this case, we advise 
  18. having an inside source, if possible. The reason it is difficult to hack a 
  19. vax is this:  many vax, after you get a carrier from them, respond=> login: 
  20. they give you no chance to see what the login name format is.  Most commonly 
  21. used are single words, under 8 digits, usually the person's name.  There is a
  22. way around this: most vax have an acct. Called 'suggest' for people to use to
  23. make a suggestion to the system root terminal.  This is usually watched by 
  24. the system operator, but at late  he is probably at home sleeping or screwing
  25. someone's brains out. So we can write a program to send at the vax this type 
  26. of a message: a screen freeze (cntrl-s), screen clear (system dependant), 
  27. about 255 garbage characters, and then a command to create a login acct., 
  28. After which you clear the screen again, then un- freeze the terminal.  What 
  29. this does: when the terminal is frozen, it keeps a buffer of what is sent.  
  30. Well, the buffer is about 127 characters long. So you overflow it with trash,
  31. and then you send a command line to create an acct. (System dependant).  
  32. After this you clear the buffer and screen again, then unfreeze the terminal.
  33. This is a bad way to do it, and it is much nicer if you just send a command 
  34. to the terminal to shut the system down, or whatever you are after... There 
  35. is always, *always* an acct. Called root, the most powerful acct. To be on, 
  36. since it has all of the system files on it.  If you hack your way onto this 
  37. one, then everything is easy from here on... On the unix system, the abort 
  38. key is the cntrl-d key.  Watch how many times you hit this, since it is also
  39. a way to log off the system! A little about unix architechture: the root 
  40. directory, called root, is where the system resides.  After this come a few 
  41. 'sub' root directories, usually to group things (stats here, priv stuff here,
  42. the user log here...). Under this comes the superuser (the operator of the 
  43. system), and then finally the normal users.  In the unix 'shell' everything 
  44. is treated the same. By this we mean:  you can access a  program the same 
  45. way you access a user directory, and so on.  The wa}Mthe unix system was 
  46. written, everything, users included, are just programs belonging to the root
  47. directory.  Those of you who hacked onto the root, smile, since you can screw
  48. everything... The main level (exec level) prompt on the unix system is the $,
  49. and if you are on the root, you have a # (super-user prompt). Ok, a few 
  50. basics for the system... To see where you are, and what paths are active in 
  51. reguards to your user account, then type => pwd this shows  your acct. 
  52. Seperated by a slash with another pathname (acct.), Possibly many times. To 
  53. connect through to another path, or many paths, you would type: you=>path1/
  54. path2/path3 and then you are connected all the way from path1 to path3. You 
  55. can run the programs on all the paths you are connected to.  If it does not
  56. allow you to connect to a path,  then you have insufficient privs, or the 
  57. path is closed and archived onto tape.  You can run programs this way also:
  58. you=>path1/path2/path3/program-name unix treats everything as a program, and
  59. thus there a few commands to learn... To see what you have access to in the 
  60. end path, type=>  ls for list.  This show the programs you can run.  You can
  61. connect to the root directory and run it's  programs with=> /root by the way,
  62. most unix systems have their log file on the root, so you can set up a watch
  63. on the file, waiting for people to log in and snatch their password as it 
  64. passes thru the file. To connect to a directory, use the command:  => cd 
  65. pathname this allows you to do what you want with that directory.  You may be
  66. asked for a  password, but this is a good way of finding other user names to 
  67. hack onto.   The wildcard character in unix, if you want to search down a 
  68. path for a game or such, is the *. => Ls /* should show you what you can 
  69. access. The file types are the same as they are on a dec, so refer to that 
  70. section when examining file.  To see what is in a file, use the => pr 
  71. filename command, for print file.   We advise playing with pathnames to get
  72. the hang of the concept.  There is on-line help available on most systems 
  73. with a 'help' or a '?'. We advise you look thru the help files and pay 
  74. attention to anything they give you on pathnames, or the commands for the 
  75. system.   You can, as a user, create or destroy directories on the tree 
  76. beneath you. This means that root can kill everything but root, and you can 
  77. kill any that are below you.  These are the=> mkdir pathname => rmdir 
  78. pathname  commands.   Once again, you are not alone on the system...  Type=>
  79. who to see what other users are logged in to the system at the time.  If you
  80. want to talk to them=>  write username will allow you to chat at the same 
  81. time, without having to worry about the parser.  To send mail to a user, say
  82. => mail and enter the mail sub-system. To send a message to all the users on
  83. the system, say => wall which stands for 'write all' by the way, on a few 
  84. systems, all you have to do is hit the <return> key to end the message, but 
  85. on others you must hit the cntrl-d key. To send a single message to a user, 
  86. say => write username this is very handy again!  If you send the sequence of
  87. characters discussed at the very beginning of this article, you can have the
  88. super-user terminal do tricks for you again. Privs: if you want super-user 
  89. privs, you can either log in as root, or edit your acct. So it can say => su
  90. this now gives you the # prompt, and allows you to completely by-pass the 
  91. protection.  The wonderful security conscious developers at bell made it very
  92. difficult to do much without  privs, but once you have them, there is 
  93. absolutely nothing stopping you from doing anything you want to. To bring 
  94. down a unix system: => chdir /bin => rm * this wipes out the pathname bin, 
  95. where all the system maintenance files are. Or try: => r -r this recursively 
  96. removes everything  from the system except the remove command itself. Or try:
  97. => kill -1,1 => sync this wipes out the system devices from operation.   When 
  98. you are finally sick and tired from hacking on the vax systems, just hit your 
  99. cntrl-d and repeat key, and you will eventually be logged out. The reason 
  100. this file seems to be very sketchy is the fact that bell has 7 licenced 
  101. versions of unix out in the public domain, and these commands are those 
  102. common to all of them.  We recommend you hack onto the root or bin directory,
  103. since they have the highest levels of privs, and there is really not much you
  104. can do (except develope software) without them. Next to come: the basics of 
  105. hacking iii: data general
  106.  
  107. This article written by: the Knights of Shadow
  108. -----------------------------------------------
  109.  
  110.  
  111. The Alternate Universe BBS - [718] 326-0720
  112.  
  113.