US researchers have found a way to flush out herpes viruses from hiding - offering a potential way to cure pesky and painful conditions from cold sores to shingles.

They discovered that a mysterious gene carried by the herpes simplex-1 virus - the one that causes cold sores - allows the virus to lay low in the nerves it infects. It does so via microRNAs, little pieces of genetic material that regulate the activity of many viruses, the researchers report in the journal Nature.

It may be possible to "wake up" the virus and then kill it with standard antiviral drugs such as acyclovir, said Jennifer Lin Umbach of Duke University in North Carolina, who worked on the study.

"We are trying to go into animal trials," Umbach said in a telephone interview.

The Duke team is discussing a potential collaboration with Regulus Therapeutics LLC, a joint venture between Alnylam Pharmaceuticals, Inc and Isis Pharmaceuticals, Inc that specialises in microRNAs.

Herpes viruses cause permanent infections. They head straight to nerve cells, where they stay latent for the life of an animal or person, often causing periodic outbreaks.

Herpes simplex 1 or HSV-1 causes cold sores, HSV-2 causes genital herpes, while varicella causes chicken pox and returns in middle or old age as herpes zoster to cause shingles.

Acyclovir and related drugs can suppress symptoms but only when the virus is active.

"Inactive virus is completely untouchable by any treatment we have. Unless you activate the virus, you can't kill it," said Bryan Cullen, who oversaw the research.