If I'm doing a lot, I'll boil them in a disposable aluminum turkey-roasting pan. Hit them with a mag/bottle brush or some rags on a stick to wipe out the excess cosmo. They'll be hot so they'll dry quickly. I'll then hit them with some
Hornady One Shot to protect the steel from corrosion.
If I'm just doing a couple, I use Hornady One Shot along with a brush and some rags or old t-shirts. That stuff does a very good job of dissolving cosmoline and it leaves a dry, protective, lubricating film behind. I'm in love with One Shot and I'd use it for everything were it not so expensive (relatively speaking), which is why I use boiling water if I'm doing a large number of mags.
Non-chlorinated brake cleaner is also very good at removing cosmoline (and just about anything else) and it's very cheap. It will strip all the oils out of the steel, however, so you'll need to apply some form of protectorant afterwards. Also, if you value your brain cells, only use brake cleaner in a well-ventilated area, preferably outdoors.