This depends on several issues:
1. Does the router have flash-based firmware? If it doesn't, forget the whole thing because you will have to solder and unsolder rom chips (and only if they are not embedded) and find a way to debug with this constraint.
2. How much free flash space is available? You will have to add a firmware patch, so there must be enough free space to add your patch.
3. Can you figure out how and where to patch? You must be able to analyze the machine language code to figure out where and how to install your patch.
4. You must have a small-footprint web server that you can cross-compile for the router's cpu.
All in all, this sounds like a formidable project!