I'm assuming you're behind NAT? How did the ports for RDP get forwarded to the outside world?
I don't think there's a short answer to this. First and foremost, close the barn door. Reset your router to the factory settings and put a strong password on the router's admin account. Make sure that no ports are being forwarded.
After that, it becomes a question of whether you want to try to salvage the compromised system or just cut your losses. Honestly, in most cases, its probably better to just nuke it all from orbit unless you have a really strong background in Windows security. And even then...most security experts would rather scrub the system and restore from known clean backups than try to "close the holes" after the fact.
If you want to try to fix the system, the only thing I can recommend is to go over the logs with a fine-toothed comb, and try to figure out how the system was compromised. Unfortunately, it's not really possible to write a how-to for that. And, of course, run a full battery of anti-malware/anti-trojan/etc. software. You should especially run some rootkit detectors since you know that someone got in. Odds are they planted at least one backdoor, and if they were smart, they hid it with a rootkit.
Personally, I'd scrub it all. If you have more than one computer on your network, assume they've all been compromised. Disconnect them all from the network (physically) and then connect up one at a time for reformatting + reinstallation. Do not let the cleanly reinstalled machines have *any* contact with the others until they've all been reinstalled. It's best if you can do all of this without any of them being connected to the public internet, but you may have to make some allowances to grab security updates/patches. If you can fetch them (from a clean network) and stick them on a thumbdrive or something before the install, that would be best. At a bare minimum, I would install the latest service pack from off-network before letting any of them touch the internet.
Whichever way you go about getting back to a clean state, I'd recommend that you google "windows hardening" and try to lock your system down a little tighter to prevent future intrusions.
Edit: Oh, and hopefully this goes without saying, but if you wind up doing a reinstall, be *very* careful about importing any data from the old system. If it's not irreplaceable, just trash it and get a clean copy from the source. For irreplaceable data (ex. personal documents), I'd keep them quarantined until you're absolutely certain they aren't infected with anything.
_________________ Sail forth! steer for the deep waters only! Reckless, O soul, exploring, I with thee, and thou with me; For we are bound where mariner has not yet dared to go, And we will risk the ship, ourselves and all.
|