mississippi Posted February 13, 2008 Report Posted February 13, 2008 Am facut un block php nuke pentru a vedea avatarul unui user yahoo <?phpif (eregi("block-YahooAvatar.php", $_SERVER['PHP_SELF'])) { Header("Location: index.php"); die();}$content .= "<center><FORM method=GET action='http://img.msg.yahoo.com/avatar.php?yids='><INPUT TYPE=text name=yids size=60 maxlength=155 value=''><INPUT type=submit VALUE='Cauta Avatar'></center></FORM>";/************************************************************************//************************************************************************/?>Block-ul merge foarte bine, dar as vrea ca rezultatul (poza de la avatar) sa apara tot in acest block, cumva prin iframe Quote
xss Posted February 13, 2008 Report Posted February 13, 2008 Am facut un block php nuke pentru a vedea avatarul unui user yahoo <?phpif (eregi("block-YahooAvatar.php", $_SERVER['PHP_SELF'])) { Header("Location: index.php"); die();}$content .= "<center><FORM method=GET action='http://img.msg.yahoo.com/avatar.php?yids='><INPUT TYPE=text name=yids size=60 maxlength=155 value=''><INPUT type=submit VALUE='Cauta Avatar'></center></FORM>";/************************************************************************//************************************************************************/?>Block-ul merge foarte bine, dar as vrea ca rezultatul (poza de la avatar) sa apara tot in acest block, cumva prin iframefoloseste ajax: un exemplu http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htmnu ar if mai simplu sa posteze idiu si dupa if(isset($_POST['get_avatar'])){ echo '[img=http://img.msg.yahoo.com/avatar.php?yids='.$_POST['id'].'];} Quote
mississippi Posted February 13, 2008 Author Report Posted February 13, 2008 Multumesc pentru raspuns Xss codul :if(isset($_POST['get_avatar'])){ echo '[img=http://img.msg.yahoo.com/avatar.php?yids='.$_POST['id'].'];}nu merge , am sa incerc cu Ajax Quote
tw8 Posted February 13, 2008 Report Posted February 13, 2008 Uite un cod marca tw8 facut acum in graba care iti afiseaza avatarul:<?php$content = <<<HTML<center><FORM method=GET action="/yahoo.php"> <INPUT TYPE=text name=id size=60 maxlength=30 value=""><INPUT type=submit VALUE="Cauta Avatar"></FORM> HTML;if (isset($_GET["id"])){$user = htmlspecialchars($_GET["id"]);$content = $content . "[b]Avatarul curent:[/b] <iframe src=\"http://img.msg.yahoo.com/avatar.php?yids=$user\" width=\"96\" height=\"96\">";}$content = $content . "</center> ";echo $content;?>Din testele mele, merge ok. E aparat si de XSS [sunt bolnav cu astea ].Incearca-l . Quote
mississippi Posted February 13, 2008 Author Report Posted February 13, 2008 Salut tw8 , in codul tau sunt 2 greseli 1) tinind cont ca este vorba de un block php nuke , ar trebui sa inceapa asa<?phpif (eregi("block-YahooAvatar.php", $_SERVER['PHP_SELF'])) { Header("Location: index.php"); die();} 2) Cind apesi butonul Cauta Avatar da urmatoarea eroare in browser [url]http://localhost/yahoo.php?id=NUME[/url]Astept sa faci un cod ( dar nu in graba ) Merci anticipat Quote
amprenta Posted February 13, 2008 Report Posted February 13, 2008 Prima partea apare in toate asa ca nu a mai scris pentru ca se subintelegea ca trebuie sa fie prezenta in script .Si pentru punctu 2 . esti chiar atat de habarnist sa nu-ti dai seama ca trebuie modificat numele acolo ? In cazul tau daca fisierul se numeste block-YahooAvatar.php pui la action="/yahoo.php" ,numele respectiv .Vreti numai sa dati paste la orice fara sa va obositi sa modificati un pic offtopic : sa sti ca in unele exploit-uri de exemplu , programatorii mai stracoara greseli care o sa frece la menta compileru`\interpreteru` tocmai pentru a nu putea fi folosit de toti script kiddies ,sa-si mai puna si ei neuronii la contributie . Quote
tw8 Posted February 13, 2008 Report Posted February 13, 2008 @amprenta: I love you. Nici eu nu puteam sa o zic mai bine .@mississippi: Modifica asa cum a precizat amprenta si o sa mearga. Quote
mississippi Posted February 14, 2008 Author Report Posted February 14, 2008 Multumesc oricum tw8 am gasit rezolvarea facind o mica modificare in blockul facut de mine cu trimitere la un modul (Ajax) 10x xss good ideauite a treia eroare in blocul facut de tine Quote