If you want to protect yourself
If you haven’t been affected by MacDender and want it to stay that way, simply uncheck the “open safe files after downloading” option by going to Safari, Preferences, and then General.
You could also use an alternative browser. Another option is to defer to running in Standard of Managed mode, versus as an Administrator. this just keeps viruses from being able to access every nook and cranny of your system.
If you’ve been infected
If your system has already been infected, The Next Web explains how you can fairly easily get rid of MacDefender.
Go to Applications, and then Utilities to check the Activity Monitor. Disable anything with “MacDefender” in the name.
Go to Library, Startup Items, and in there look for in LaunchAgents and LaunchDaemons for anything with “MacDefender” in the name. Quit any running applications.
Go back to the Applications folder and drag and drop MacDefender from there to the trash. Delete trash.
Search for anything on your system with “MacDefender” in the name and delete anything returned.