the bug / back door has been planted.
any IP device you get reset to factory to settings for you not who know had before you, also hook device to PC thats not internet accessable and main control PC.
use the router web interface http://192.168.0.1 , 192.168.0.1 or what manual say to use
Enter the default username and password for your router's configuration page from manual. then set your own user/pwd
using min, of 12 character's any letter, combined any symbols.
and write it down and save it. set-up PPPoE (ISP) or Network (your the Admin) info.
Then connect internet to router. set up all your rules wanted, check all is workin if is then take a image of router configuration and save it on HDD or USB flash
TLCB hope you got rid of the spamware in the process