Microsoft did issue an emergency XP patch for that Wannacry about 3 weeks ago. You should also be sure to turn off Remote Desktop …
To enable Remote Desktop, follow these steps:
Log on to your Windows XP Professional–based computer using an Administrator account.
Click Start, right-click My Computer, and then click Properties.
In the System Properties sheet, click the Remote tab.
Select the Do Not Allow users to connect remotely to this computer check box.