Isn't $aid already escaped by intval() ? Gianluca On Fri, Jun 22, 2012 at 10:13 PM, Yaniv Shaked <yaniv0a@xxxxxxxxx> wrote: > > Look at the code at announcements.php: > > $aid = intval($mybb->input['aid']); > > [Boring lines…] > > [Boring lines…] > > $query = $db->query(" > SELECT u.*, u.username AS userusername, a.*, f.* > FROM ".TABLE_PREFIX."announcements a > LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid) > LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid) > WHERE a.startdate<='$time' AND (a.enddate>='$time' OR > a.enddate='0') AND a.aid='$aid' > "); > > $announcementarray = $db->fetch_array($query); > > Complete the missing part :) > > -- > Thanks, > Yaniv > > On Jun 22, 2012, at 8:58 AM, Henri Salo wrote: > > > On Thu, Jun 21, 2012 at 02:44:59PM +0000, Amir@xxxxxxxx wrote: > >> a bug in Mybb 1.6.8 'announcements.php' that allows to us to occur a > >> Sql Injection on a Remote machin. > >> > >> > >> > >> > >> > >> ######################################################################################### > >> # > >> # Exploit Title : Mybb 1.6.8 'announcements.php' Sql Injection > >> Vulnerabilitiy > >> # > >> # Author : IrIsT.Ir > >> # > >> # Discovered By : Am!r > >> # > >> # Home : http://IrIsT.Ir/forum > >> # > >> # Software Link : http://www.mybb.com/ > >> # > >> # Security Risk : High > >> # > >> # Version : All Version > >> # > >> # Tested on : GNU/Linux Ubuntu - Windows Server - win7 > >> # > >> # Dork : "Powered By Mybb" > >> # > >> > >> ######################################################################################### > >> # > >> # Expl0iTs : > >> # > >> # [TarGeT]/Patch/announcements.php?aid=1[Sql] > >> # > >> # > >> > >> ######################################################################################### > >> # > >> # Greats : B3HZ4D - Crim3R - nimaarek - Net.Edit0r - A.Cr0x - G3n3rall > >> - R3ZA BLACK HAT - > >> # > >> # TaK.FaNaR - m3hdi - F@rid - joker_s - H4x0r - dr.tofan - > >> skote_vahshat - d3c0d3r - > >> # > >> # Dr.Security - Mr.Xpr - Bl4ck_king - hellboy - Shekaf & All Members In > >> IrIsT.Ir > >> # > >> > >> ######################################################################################### > > > > Could not reproduce. Could you give working PoC? > > > > - Henri Salo >