First, I remove all i can superficially using rags, q-tips, whatever.
For metal parts, I've used odorless mineral spirits. Doesn't take a lot, you can reuse it later if you save it. Get one of those disposable tupperware containers. Soak the parts, let them sit a little bit, then wipe off the cosmo with an old toothbrush or gun cleaning brush. Then oil the parts well (the mineral spirits will pull all oil off of the metal - so oil immediately). I actually use two containers - one to soak in mineral spirits, one to spray oil onto the parts when clean (Rem Oil spray bottle).
For wood, I've done one of two things:
Put it out in the hot sun on a black garbage bag in the backyard. When it weeps, wipe it with a rag you don't care about. Eventually it will stop weeping.
I've also used a small, weak space heater from Walmart that just barely got to the melting point of cosmoline. I held the stock in front of the heater, and gradually got it closer until the heater was warm enough to make the cosmo weep out. For my cheap $14 heater, that meant 1" away from the heater. I then wiped what wept, and moved section by section until it stopped weeping.
Cosmoline was typically warmed up, then applied to guns. Warming it up again and wiping it off "reverses" the process without unintentional harm using other cleaners and stuff. Wood does soak it up, so heating makes the cosmo weep back out. Heating makes the cosmo liquid again, and the wood will weep it out.
However, basically if you cut the greasey petroleum jelly-like substance with any degreaser, you'll get it cleaned off. Just remember to oil well with a rust protective oil.