koreth%panarthea.ebay@sun.com (Steven Grimm) (08/11/89)
Submitted-by: f-leoe@ifi.uio.no (Lars-Erik 0sterud) Posting-number: Volume 2, Issue 70 Archive-name: protect Small virus destruction and protection utility... PEA intro(PC) ;start beskjed MOVE.W #9,-(SP) ;print line TRAP #1 ;gemdos ADDQ.L #6,SP check_disk: MOVE.W #7,-(SP) ;les tegn TRAP #1 ;gemdos ADDQ.L #2,SP CMP.B #'n',D0 ;er det nei ? BNE lets_check ;nei - sjekke disk CLR.W -(SP) ;exit TRAP #1 lets_check: BSR read_boot ;lese disk boot-sector BSR checksum ;checksum i D7 CMP.W #$1234,D7 ;executable ? BNE no_danger ;nei - ingen fare PEA warning(PC) ;skrive advarsel MOVE.W #9,-(SP) ;print line TRAP #1 ;gemdos ADDQ.L #6,SP BRA immunize ;kverke og beskytte disk no_danger: LEA buf(PC),A6 CMP.B #$60,(A6) BNE immunize PEA immune(PC) ;skrive beskjed MOVE.W #9,-(SP) ;print line TRAP #1 ;gemdos ADDQ.L #6,SP BRA more_disks ;flere disketter ? immunize: PEA protect(PC) ;beskytte disk beskjed MOVE.W #9,-(SP) ;print line TRAP #1 ;gemdos ADDQ.L #6,SP MOVE.W #7,-(SP) ;les tegn TRAP #1 ;gemdos ADDQ.L #2,SP CMP.B #'y',D0 ;er det ja ? BNE more_disks ;nei - ny disk BSR protect_disk ;beskytte disk more_disks: PEA check(PC) ;flere disker beskjed MOVE.W #9,-(SP) ;print line TRAP #1 ;gemdos ADDQ.L #6,SP BRA check_disk ;sjekke ny disk ? checksum: CLR.W D7 LEA buf(PC),A6 MOVE.W #255,D6 loop3: ADD.W (A6)+,D7 DBRA D6,loop3 RTS read_boot: MOVE.W #1,-(sp) ;Antall sektorer paa stack MOVE.W #0,-(sp) ;Side 0 paa stack MOVE.W #0,-(sp) ;Track 0 paa stack MOVE.W #1,-(sp) ;Sector 1 paa stack MOVE.W #0,-(sp) ;Drive 0 (A) paa stack CLR.L -(sp) ;Ubrukt paa stack PEA buf(PC) ;buffer-adresse paa stack MOVE.W #8,-(sp) ;XBIOS 8 (floprd) paa stack TRAP #14 ;Kalle opp XBIOS ADD.L #20,sp ;Rette opp stack-pointer RTS protect_disk: LEA buf(PC),A6 LEA bstart(PC),A5 MOVE.L (A5),(A6) ;Start paa bootsector MOVE.L 4(A5),4(A6) ADD.L #30,A6 ;Ledig plass 30 frem LEA btxt(PC),A5 ;Adresse til bootprg i A5 loop: MOVE.B (A5)+,(A6)+ ;Flytte fra adresse til adresse TST.B (A5) ;0 betyr slutt BNE loop ;Neste tegn MOVE.W #208,D6 ;Blanke ut resten loop2: ;av boot-sektoren CLR.B (A6)+ DBRA D6,loop2 MOVE.W #1,-(sp) ;Antall sektorer paa stack MOVE.W #0,-(sp) ;Side 0 paa stack MOVE.W #0,-(sp) ;Track 0 paa stack MOVE.W #1,-(sp) ;Sector 1 paa stack MOVE.W #0,-(sp) ;Drive 0 (A) paa stack CLR.L -(sp) ;Ubrukt paa stack PEA buf(PC) ;buffer-adresse paa stack MOVE.W #9,-(sp) ;XBIOS 9 (flopwr) paa stack TRAP #14 ;Kalle opp XBIOS ADD.L #20,sp ;Rette opp stack-pointer RTS intro: DC.B 27,'E',10," ABK-BBS's Virus Killer & Protector",13,10,10 DC.B ' ',$BD,' by Lars-Erik 2sterud - July 1989',13,10,10,10 DC.B ' Call ABK-BBS in Oslo, Norway +47 2 13 26 59',13,10,10 DC.B ' Adress: 2kriveien 39, N-1349 Rykkinn, Norway',13,10,10 DC.B ' E-mail: leoe',64,'ifi.uio.no / f-leoe',64,'ifi.uio.no' check: DC.B 13,10,10,10,' Check disk in drive A: for Auto-Booting program ? ',0 warning: DC.B 13,10,10,10,7,' WARNING, Disk is AUTO-',7 DC.B 'BOOTING ',7,'(could be a VIRUS)',13,7,0 immune: DC.B 13,10,10,' Disk in drive A: is allready protected.',13,0 protect: DC.B 13,10,10,' Do you want to KILL & PROTECT disk in drive A: ? ',0,0 bstart: DC.W $601C ;Hoppe til prg (buf+30) DC.B 'Loader' ;Narre ekte virus btxt: ;Legges inn p boot-sektor RTS DC.B "################" DC.B " Disk protected " DC.B " by ABK-BBS's " DC.B " Anti-Virus " DC.B "################" DC.B " Dial ABK-BBS " DC.B " Oslo, Norway " DC.B " +47 2 13 26 59 " DC.B "################" DC.B " L.E. 0sterud " DC.B " 0kriveien 39 " DC.B " N-1349 Rykkinn " DC.B " Norway " DC.B "################" DC.B " Send E-mail to " DC.B "leoe",64,"ifi.uio.no " DC.B "################",0,0 buf: ;Buffer for disk read/write (gidder ikke sette av plassen n) END