Reverse Engineer And Modify D-Link Binary Firmware File

Some time ago I’ve published an article(post?) about blocking ads using the router,
while it works just fine for non-html files, such as scripts, images and such,
it isn’t so great solution for blocking iframes that shows HTML content,
why?

well..
when the (original firmware) D-Link router software identify a forbidden domain,
it sends out a series of responses, ending with a html page (HTML 1.0 302 redirect -> 200 response page),

while for <script> elements it works perfectly, since it renders an invalid script,
– blocked domain, which shows ads, for example in an iframe in the page (such as eBay),
will still block the original content, but will show an iframe, well… filled with the D-Link’s blocked page msg:

icompile.eladkarako.com_reverse_engineer_dlink_dir655_router_firmware_ads_page_2016-01-20_175855
Continue reading