Analyze AntiVirus 0.10

« Older   Newer »
  Share  
Hpmezzo
CAT_IMG Posted on 24/8/2011, 18:59     +1   -1




Ho realizzato il mio sogno... Creare uno scanner Antivirus! (Senza protezione in tempo reale). Il motore si chiama Sputnik da bravo Kasperiano! Ecco alcuni Screen del prodotto:
immagine1zd

Uploaded with ImageShack.us
Quando rileva malware:
scannq

Uploaded with ImageShack.us
Da dire che solo il motore è fatto in AutoIT. L'interfaccia mi sono ispirato a Kaspersky Internet Security 7.0
Per modificare i database basta lanciare il seguente comando da esegui:
edit.com C:\AnalyzeProduct\SAV\System300\Database\Database.ini
Oppure
wordpad.exe C:\AnalyzeProduct\SAV\System300\Database\Database.ini

Come vedrete il database è un semplice file INI. :D

Provate e fatemi sapere :D
Download:

FrontBack - Security Decompiler Team

Motivo: Sorgenti mancanti


Edited by FrontBack - 7/10/2011, 20:07
 
Top
LoGiX
CAT_IMG Posted on 24/8/2011, 19:15     +1   -1




Posta il sorgente..
 
Top
I.Ren
CAT_IMG Posted on 24/8/2011, 19:16     +1   -1




Domanda (son troppo pigro per scaricare il file) come fa ad individuare il virus?
 
Top
Hpmezzo
CAT_IMG Posted on 25/8/2011, 08:27     +1   -1




Calcolando MD5 del file. Se MD5 è presente nel database viene classificato come un malware.
 
Top
I.Ren
CAT_IMG Posted on 25/8/2011, 09:36     +1   -1




Interessante, ma poniti questo quesito.

Il codice del virus è questo, di cui hai l'hash md5:

CODE
#include <iostream>

using namespace std;

int main()
{
 desfa_il_mondo();
 return 0;
}


Io lo modifico così:

CODE
#include <iostream>

using namespace std;

int main()
{
 int asdasdasd; // variabile inutile che ha l'unico scopo di far cambiare l'md5 hash
 desfa_il_mondo();
 return 0;
}


Il codice fa sostanzialmente la stessa cosa, eppure una volta compilato avrà l'md5 hash diverso e non verrà visto come virus dal tuo database. Avevo letto da qualche parte che di solito si implementavano reti neurali o si usavano algoritmi euristici, questo è solo un pattern su ricerca su file con una bella grafica.

Ciò non toglie che sia un buon lavoro, comunque.
 
Top
*Sym98*
CAT_IMG Posted on 25/8/2011, 10:06     +1   -1




La grafica mi piace molto, bravo. ;)
Non l'ho provato perchè non mi va di scaricare il file :asd:, però dagli Screen sembra essere buono, a parte quello che ha già detto I.Ren.
 
Top
Hpmezzo
CAT_IMG Posted on 25/8/2011, 10:41     +1   -1




Già pensato, per il motore euristico mi sto basando su ClamAV, come motore principale HASH invece sto procedendo , insieme ad altri, a creare un db. L'euristica è una cosa comunque "difficile" da implementare in AutoIT. Fatto sta che molti virus non sono polimorfici, ma utilizzano un codice uguale che non viene alterato, di conseguenza md5 non cambia da infezione a infezione.
 
Top
mR.Ðe[A]Th. ‹3
CAT_IMG Posted on 5/10/2011, 18:48     +1   -1




bella :D
 
Top
FrontBack
CAT_IMG Posted on 5/10/2011, 20:32     +1   -1




Fino a quando i sorgenti non verranno fuori blocco il download.

PS: spostate in programmi!
 
Top
»Master
CAT_IMG Posted on 5/10/2011, 20:51     +1   -1




quoto i.ren, ho spostato in programmi
entro 24h se non posti il sorcio, frontback blocca il download...
comunque dalla grafica sembra bello
 
Top
FrontBack
CAT_IMG Posted on 7/10/2011, 19:08     +1   -1




L'autore del topic non si è fatto vivo per postare i sorgenti, perciò rimuovo il download.
 
Top
Hpmezzo
CAT_IMG Posted on 11/5/2012, 18:49     +1   -1




Scusate non avevo visto:
CITAZIONE
#include <guiconstantsex.au3>
#include <progressconstants.au3>
#include <crypt.au3>
#include <file.au3>
#include <guilistbox.au3>
#include <guiconstantsex.au3>
#include <windowsconstants.au3>
#include <constants.au3>
#include <sound.au3>
#RequireAdmin
GUISetBkColor(0xE0FFFF)
Opt('MustDeclareVars', 1)
Call ("Example")
Exit
Func Example()
Global $SilentMode
Global $progressbar1, $button, $Database, $wait, $s, $msg, $m , $Scan , $iALG_ID , $file , $TotaleFile , $Progress , $Status ,$count , $A , $line , $Digest , $countA , $HASH , $HASHDB ,$Inf1 , $InfT ,$m , $InfD ,$InfR , $InfI , $animazione , $button1 , $msg1 , $GUI ,$hListBox ,$FADS
Global $Digest , $Digest1 , $Sezione ,$Quarantena , $AzioneIntrapresa , $VerificaEliminazione ,$SilentMode
$Quarantena=@ScriptDir&"\Area51\"
$SilentMode=0
$Inf1=1
$InfT=0
$InfD=0
$InfI=0
$InfR=0
$m = GUIGetMsg()
$GUI=GUICreate("Analyze AntiVirus by Mezzofante Gaetano Emanuele", 470, 500, 250, 100)
$FADS="Calcolo in corso..."
$progressbar1 = GUICtrlCreateProgress(10, 10, 450, 20)
GUICtrlSetColor(-1, 32250)
$button = GUICtrlCreateButton("Start", 10, 160, 200, 25)
GUISetState()
GUICtrlCreateLabel("Sto caricando la lista dei file da scansionare...Per favore attendere!" , 10 ,35 , 4000 , 20) ; first cell 70 width
GUICtrlCreateLabel("Elementi infetti-------------------------------->:"&$InfT , 10 ,55, 4000 , 20) ; first cell 70 width
GUICtrlCreateLabel("Elementi eliminati---------------------------->:"&$InfD , 10 ,75, 4000 , 20) ; first cell 70 width
GUICtrlCreateLabel("Elementi che richiedono il riavvio--->:"&$InfR , 10 ,95, 4000 , 20) ; first cell 70 width
GUICtrlCreateLabel("Elementi ignorati dall'utente------------>:"&$InfI , 10 ,115, 4000 , 20) ; first cell 70 width
GUICtrlCreateLabel("File ancora da scansionare------------>:"&$FADS , 10 ,135, 4000 , 20) ; first cell 70 width

$wait = 20
$s = 0
Do

$msg = GUIGetMsg()
If $msg = $button Then GUICtrlSetData($button, "In attesa di una risposta..")
$hListBox=_GUICtrlListBox_Create($GUI, "=====================================================", 10, 200, 450, 300)
_GUICtrlListBox_InsertString ($hListBox , "Analyze AntiVirus <scansione> "&@HOUR&":"&@MIN)
_GUICtrlListBox_InsertString ($hListBox , "Data:"&@MDAY&"\"&@MON&"\"&@YEAR)
_GUICtrlListBox_InsertString ($hListBox , "Scansione iniziata alle "&@HOUR&":"&@MIN)
_GUICtrlListBox_InsertString ($GUI, "========================================================================================================================")
_GUICtrlListBox_UpdateHScroll($hListBox)
GUICtrlSetData($button, "Interrompi Scansione")
;Script Profilo
RunWait (@ScriptDir&"\Profili\Smart.cmd" , @ScriptDir&"\Scan\" , @SW_HIDE)
; Script Start
$iALG_ID=$CALG_MD5
$file=FileOpen(@ScriptDir&"\Scan\ListaFile.txt", 0)
$TotaleFile=_FileCountLines (@ScriptDir&"\Scan\ListaFile.txt")
FileWriteline (@ScriptDir&"\Scan\ListaFile.txt" , "Totale file :" &$TotaleFile)
$FADS=$TotaleFile
$Progress=100/$TotaleFile
$Status=$Progress
$Status=$Status+$Progress
$count=1
$countA=0
$A=10


For $count=1 to $TotaleFile
$FADS=$FADS-1
$m = GUIGetMsg()
If $m = $button Then call ("Esci")
$line = FileReadLine($file)
If @error = -1 Then ExitLoop
$Status=$Status+$Progress
GUICtrlSetData($progressbar1, $Status)
GUICtrlCreateLabel("Nome File : "&$line , 10 ,35 , 4000 , 20)
GUICtrlCreateLabel("File ancora da scansionare------------>:"&$FADS , 10 ,135, 4000 , 20)
$Digest=_Crypt_HashFile($line,$iALG_ID)
$Sezione=StringRight ($Digest , 32)
$Sezione=StringLeft ($Sezione , 3)
$Sezione=StringLower ($Sezione)

For $countA=1 to $TotaleFile
$HASHDB=IniRead (@ScriptDir&"\Database\"&$Sezione&".avc" , "INDEX" , $Digest , "NOVIRUS")
If $HASHDB="NOVIRUS" then ExitLoop
Call ("Malware")
$InfT=$InfT+$Inf1
GUICtrlCreateLabel("Elementi infetti-------------------------------->:"&$InfT , 10 ,55, 4000 , 20) ; first cell 70 width
ExitLoop
Next
Next

GUICtrlCreateLabel("Totale File Scansionati : "&$TotaleFile , 10 ,35 , 4000 , 20)
GUICtrlSetData($button, "Esci")
sleep (5000)
exit
Until $msg = $GUI_EVENT_CLOSE
EndFunc ;==>Example


Func Esci ()
MsgBox (4096 , "Analyze AntiVirus" , "Scansione annullata!")
if $InfT>0 then MsgBox (4096 , "Analyze AntiVirus" , "Alcune minaccie devono essere ancora debellate!")
Exit
EndFunc

Func Malware ()
FileSetAttrib($line, "-R-A-S")
_GUICtrlListBox_InsertString ($hListBox , "Trovato virus in :"&$line)
if $SilentMode=0 then Call ("OpzioniMalware")
if $SilentMode=1 then FileMove ($line , $Quarantena , 9)
call ($AzioneIntrapresa)
EndFunc


Func CountDelete ()
$VerificaEliminazione=FileExists ($line)
if $VerificaEliminazione=1 then call ("Reboot")
if $VerificaEliminazione=0 then call ("MalwareDebellato")
EndFunc

Func MalwareDebellato ()
_SoundPlay (@ScriptDir&"\Style\Cestino.wav")
$InfD=$InfD+$Inf1
GUICtrlCreateLabel("Elementi eliminati---------------------------->:"&$InfD , 10 ,75, 4000 , 20) ; first cell 70 width
_GUICtrlListBox_InsertString ($hListBox , "Minaccia rimossa con successo:"&$line)
EndFunc

Func Reboot ()
_SoundPlay (@ScriptDir&"\Style\Sound.wav")
DLLCall ("kernel32.dll", "int", "MoveFileEx", "str", $line, "PTR", 0, "int", 5)
MsgBox (4096 , "Info" , "Il file verrà cancellato al prossimo riavvio! Dettagli : "&$line)
$InfR=$InfR+$Inf1
GUICtrlCreateLabel("Elementi che richiedono il riavvio--->:"&$InfR , 10 ,95, 4000 , 20) ; first cell 70 width
_GUICtrlListBox_InsertString ($hListBox , "La seguente minaccia richiede il riavvio:"&$line)
FileWriteLine (@WindowsDir&"\RebootReq.av1" , $line)
EndFunc

Func Ignorato ()
_SoundPlay (@ScriptDir&"\Style\Sound.wav")
FileDelete ("ThreatIgnored.av1")
FileWriteLine (@WindowsDir&"\ThreatIgnored.av1" , $line)
$InfI=$InfI+$Inf1
GUICtrlCreateLabel("Elementi ignorati dall'utente------------>:"&$InfI , 10 ,115, 4000 , 20) ; first cell 70 width
FileWriteLine (@ScriptDir&"\Reporter\ThreatReport.txt" , $line)
_GUICtrlListBox_InsertString ($hListBox , "Elemento infetto ignorato dall'utente:"&$line)
EndFunc

Func OpzioniMalware ()
Opt('MustDeclareVars', 0)
$Timer=20

#Region ### START Koda GUI section ### Form=c:\documents and settings\emanuele\desktop\form1.kxf
$Form1_1 = GUICreate("Analyze", 623, 308, 192, 150, $WS_POPUP, 0)
GUISetBkColor(0xFFFFFF)
$Pic1 = GUICtrlCreatePic("C:\AnalyzeProduct\SAV\I386\Images\TOP.bmp", 0, 0, 620, 36)
$Label1 = GUICtrlCreateLabel("E' stata rilevata una minaccia nel seguente percorso:", 8, 40, 253, 17)
$Input1 = GUICtrlCreateInput("Input1", 8, 64, 601, 21)
$Label2 = GUICtrlCreateLabel("Nome minaccia:", 8, 88, 80, 17)
$Input2 = GUICtrlCreateInput("Input2", 8, 112, 601, 21)
$Label3 = GUICtrlCreateLabel("Cosa desideri fare?", 8, 136, 94, 17)
$Button1 = GUICtrlCreateButton("Sposta la minaccia nell'Area 51 [Quarantena]", 8, 160, 443, 25)
$Button2 = GUICtrlCreateButton("Elimina definitivamente senza passare dalla quarantena", 8, 192, 443, 25)
$Button3 = GUICtrlCreateButton("Ignora e non apportare nessuna modifica al file", 8, 224, 443, 25)
$Label4 = GUICtrlCreateLabel("Opzioni di avviso:", 8, 256, 87, 17)
$Button4 = GUICtrlCreateButton("Per le prossime minacce elimina senza chiedere conferma [Silent Mode]", 8, 272, 443, 25)
GUICtrlSetData ($Input1 , $line)
GUICtrlSetData ($Input2 , $HASHDB)
GUISetState(@SW_SHOW)
_SoundPlay (@ScriptDir&"\Style\Infetto.wav")
#EndRegion ### END Koda GUI section ###



While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE

ExitLoop
Case $Button1
FileMove ($line , $Quarantena , 9)
Global $AzioneIntrapresa="CountDelete"
GUIDelete ($Form1_1)
ExitLoop
Case $Button2
FileDelete ($line)
Global $AzioneIntrapresa="CountDelete"
GUIDelete ($Form1_1)
ExitLoop
Case $Button3
Global $AzioneIntrapresa="Ignorato"
GUIDelete ($Form1_1)
ExitLoop
Case $Button4
Global $AzioneIntrapresa="Quarantena"
Global $SilentMode=1
GUIDelete ($Form1_1)
ExitLoop
EndSwitch


WEnd

EndFunc

Scusate ma non volevo andare fuori regolamento. Ma vorrei postare pure il Database con le firme virali, e il resto dei componenti. Prima che li posto datemi il permesso. Alla prossima ;)
 
Top
FrontBack
CAT_IMG Posted on 11/5/2012, 20:32     +1   -1




Posta pure
 
Top
12 replies since 24/8/2011, 18:59   334 views
  Share