Go to Home Depot or one of the other big box stores. Buy 2 cans of WD-40 - it will be inexpensive like $1.50 a can - if you can find the large can of WD-40, you will only need one can.
Get 2 rolls of paper towels. Spray the gun liberally with WD-40 and it will cut right throught the packing grease/cosmoline. Wipe off with the paper towels. I use this on machine tools and it is absolutely the fastest and easiest way to get through the gunk.
Far less expensive than the often recommended kerosene and just as fast if not faster. When you're done, you'll need to lubricate the gun as WD-40 is not a lubricant.
It will not hurt wood finishes, you just don't want to get it onto unfinished wood as it will soak in. Ultimately, even if you do get it on unfinished wood it will evaporate out of the wood. On wood areas, I would wet the paper towels with the WD-40 and wipe off the gunk, followed with a dry paper towel immediately to limit potential penetration into unfinished wood between the stock and receiver or forearm and barrel.