If you reset a router that's been hijacked to factory defaults with the inbuilt reset button, will that take care of the problem?
If your only problem is that the router is compromised than a reset to factory defaults will probably fix this problem. But make sure that you are really doing a factory reset and not a simple reset (restart) of the router.
If your problem is also that an attacker was able to compromise the router in the first place then this problem has not been solved by a factory reset. Maybe it can be resolved by updating the firmware, but if a fixed firmware is out there depends on the vendor. Also you cannot be sure that the firmware really fixes the problem even if it claims so, because some vendors just fix the one bug which got reported or seen in the wild and leave other unreported bugs open.
In short, probably not.
Resetting the router to default settings will likely remove the back-door or the privileged access gained while high-jacking the device. What resetting doesn't do is stop the initial vector that cause the high-jacking in the first place.
As a rule there are a few things you should do with new or recently reset home routers to mitigate security issues:
- Change the administrator password
- Enable security (WPA2) and disable broadcast beacons
- Disable remote administrator access (make sure an administrator can only login from the local network)
- Disable UPnP which is a common vector in high-jacking routers.
- Update your firmware to the latest available.
- Disable NetUSB if it's an available feature, it's another vector.
Basically, if the hole is still there you're open to another attack - internet scans are perpetually looking for vulnerable devices so it'll just be a matter of time because the router gets re-high-jacked.