Cosmoline

Cosmoline is the genericized trademark for a common class of brown wax-like petroleum-based corrosion inhibitors, typically conforming to United States Military Standard MIL-C-11796C Class 3. They are viscous when freshly applied, have a slight fluorescence, and solidify over time with exposure to air.
Description.
Cosmoline was developed by Houghton International in the late 1800s as a pharmaceutical product. The original Cosmoline was an ointment and was used for many different cosmetic and medical purposes. It was kept in homes to disinfect wounds and was used by veterinarians to treat cuts, abrasions, bruises and sprains. Cosmoline could even be found on farms, where it was used to relieve swelling in cow's udders. 
Cosmoline became an everyday name when it received a government specification as a rust preventive and began being used by the military to protect its equipment from rust and corrosion. Cosmoline could be found on military equipment in the Spanish–American War, World War I, World War II, and the Korean and Vietnam Wars. Cosmoline conforms to MIL-SPEC (MIL-C-11796C, Class 3) for Preservative and Sealing Compounds.
Chemically, cosmoline is a homogeneous mixture of oily and waxy long-chain, non-polar hydrocarbons. It is always brown in color, but can differ in viscosity and shear strength. Cosmoline melts at 113–125 °F (45–52 °C) and has a flash point of 365 °F (185 °C).
Use.
The most common use of Cosmoline is in the storage and preservation of some firearms, hand tools, machine tools and their tooling, and marine equipment. Entire vehicles can be preserved with cosmoline.
Cosmoline is also frequently applied to automotive disc brake rotors at the factory, to prevent corrosion inside the box before the rotor is placed into service on a vehicle. It is easily removed by spraying brake cleaner on the braking surfaces of the rotor.
During World War II cosmoline was used to coat weapons, including entire tanks, for long sea voyages, to prevent corrosion in salty maritime conditions. U.S. Coast Artillerymen serving the huge coastal artillery batteries were known as "Cosmoliners" as they were regularly assigned the task of "greasing down" their big guns.
Cosmoline was also used during the Pacific island campaigns in World War II by the United States Marines, who sang a song about it to the tune of the popular big-band hit Tangerine: "Cosmoline...keeps my rifle clean". Many felt that it had been invented not merely to prevent rust on their weapons but for making soldiers' lives miserable. Historical fiction author W.E.B. Griffin, in his 1986 novel "Semper Fi", describes in great detail the difficulties that cosmoline removal presented to a typical group of U.S. Marine Corps officer candidates in the months leading up to U.S. involvement in World War II.
Due to the difficulty of completely removing cosmoline from firearms, it is being extensively replaced with vacuum-pack PET film.
Aging and removal.
Freshly applied cosmoline, or that which is hermetically sealed in a plastic bag or shrink wrap, retains its grease-like viscosity and wipes near clean with a rag, leaving only a thin film behind. Older cosmoline which has had air exposure usually solidifies after a few years, once its volatile hydrocarbon fraction evaporates and leaves behind only the waxy remainder. This solid wax does not readily wipe off. It can be removed with laborious scraping but leaves crumbs to be swept or vacuumed away.
Application of gentle heat sufficient to melt the waxy hydrocarbons allows cosmoline to drip off. Penetrating oil (such as WD-40 or CRC 5-56 CLP) sprayed and allowed to soak in until cosmoline is restored to a viscous-fluid state allows it to be wiped off. A closed-cabinet parts washer may be used to power wash smaller items. An aqueous rather than petrochemical based wash requires high heat, the proper aqueous detergent, and the correct hydraulic impact pressure.
Soldiers in field conditions have often used gasoline or other handy petroleum-based solvent (such as kerosene) to clean cosmoline off stored weapons.
It is not recommended to use harsh chemical solvents that could strip paint, finishes, or other aesthetic/functional coatings from the gun's surface. A better solvent is Stoddard Solvent, or mineral spirits. Complete instructions can be found on Cosmoline's official site.
All cosmoline cleaning methods create hazardous waste that must be disposed of in the proper manner. Aqueous or solvent cleaning both have accepted methods to dispose of the "sludge" created. It has been reported that talcum powder can be used as an absorbent of Cosmoline by packing the powder around the item to be cleaned and applying sufficient heat to melt the solid film, allowing the compound to be wicked from the coated surface into the talcum, which can be scraped off more easily.
Cosmoline has been highly effectively cleaned from rifles using ultrasonic cleaning systems.