Someone did write such a thing kill the blaster worm. Unfortunately it was so agressive, it would overload networks just from the sheer volume of scanning it was doing.
I think that may be welchia. I'm not in favor of much vigilante justice, there's enough lose cannons out there as it is. And there's a tremendous amount of bluring of the lines between the "black hats" and the "white hats" right now, including these 'security firms' that release newly found exploits straight onto the open internet without first notifying the vendors and giving them a chance to build a patch first. But you can't have a "mob rules" world out there, which it is turning into.