What's infected my Android device, and how do I remove it? This story of images occasionally pops up on opening new links in Chrome. These links are for legitimate websites such as imgur and reddit. When it happens, I'm on mobile data. When I choose the tab, and click the link again,  no pop-up appears. 

Here's the relevant portion from chrome://version


  Google Chrome 51.0.2704.81 (Official Build) (32-bit)
  
  Revision
  211d45a5b74b06d12bb016f3c4d54095faf2646f-refs/branch-heads/2704@{#696}
  
  OS    Android 6.0.1; E5823 Build/32.2.A.0.224


This is a screenshot of the pop-up:



How do I find out what caused this,  and how do I fix it? 

It happened again, this time without clicking a link. I was in reddit, it just popped up. 

URL: http://rcknmwcyct.pw/gaz6s9/x1psi.html?model=Xperia%20Z5%20Compact&amp;brand=Sony&amp;ip=86.181.166.144&amp;voluumdata=BASE64dmlkLi4wMDAwMDAwMi01MjQ2LTQwYTItODAwMC0wMDAwMDAwMDAwMDBfX3ZwaWQuLmFlZTQxMDAwLTNmZjgtMTFlNi04NWQyLTZiNmI2ZjViZDYwNV9fY2FpZC4uYjFmNjYxMTMtNjBiNy00OGNmLTk4ZDktZjdkNTU3MGY1NjdiX19ydC4uSEpfX2xpZC4uODVjNzVhMTctZjYxMi00MTBmLWJlZTMtODE1MmU3NmVjMjMxX19vaWQxLi4wNGM0OTMyYS00ZWE5LTQwYzMtYTBmNy0wYWQ4MGE1YTc1YWRfX3JkLi5fX2FpZC4uX19hYi4uX19zaWQuLg#

Here's the pages without the pop-up: 



When I try to click back,  I get to this page:



Which is something about appflood security. I haven't managed to teach it down to anything though.
I'm assuming this only happens in chrome and not any other browser or device. If it does happen on another device then the problem would be that a virus hijacked your router(on WiFi) and changed the DNS settings. Solution logon to your router and change the DNS settings to be automatically picked from your ISP. 

You could


Head to settings and disable Javascript. Which disables the redirect link from functioning as long as Javascript is off but is quite hectic since genuine websites will most likely require Javascript  to function.
Check your DNS settings and ensure that it's either set to automatically pick DNS settings from ISP or on a DNS server you know of such as googles DNS servers(8.8.8.8 and 8.8.4.4)
Root your phone and install Ad Blocker This would prevent the popup links from generating.