Before you begin you will need to copy everything you want to keep to an external hard drive, USB flash drive or a cloud storage service such as Dropbox or One Drive.
Also, find your software installation discs and licence keys.
Essentially, you have to wipe your hard disk and start from scratch.
So, yes it is possible, but it's not particularly convenient or easy.
On newer versions like Windows Vista, 7, 8.1 and 10, the March update tagged MS17-010 addresses the vulnerability it's exploiting (that was revealed earlier this year by "The Shadow Brokers" when they leaked a stolen cache of NSA tools).