Image caption Childnet International say it is rare but webcams can be taken over without users being aware

Webcams should be covered when not in use because hackers could be using them to spy on people, a charity advises.

Childnet International says webcams should be disconnected when not in use, and teenagers should not leave webcams in bedrooms or other private areas.

A BBC Radio 5 live investigation found sites where hackers exchanged pictures and videos of people captured on their own webcams without their knowledge.

A police spokeswoman said webcam hackers would be prosecuted.

Commons Home Affairs Committee chairman Keith Vaz urged teachers to talk to pupils about the dangers of using webcams, and computer manufacturers to improve security for users.

But some experts have expressed doubts about how widespread webcam hacking is and stressed that anti-virus software plays a vital role in preventing it.

The BBC Radio 5 live team found a thriving black market where access to compromised computers was bought and sold for a few pence.

Media playback is unsupported on your device Media caption Rachel Hyndman tells 5 live she was 'horrified' by the incident

Student Rachel Hyndman, 20, from Glasgow, who has a part-time job in a computer shop, believes she was the victim of webcam hacking.

She spotted the camera on her laptop had switched itself on while she was watching a DVD in the bath.

She says: "I was sitting in the bath, trying to relax, and suddenly someone potentially has access to me in this incredibly private moment and it's horrifying.

"To have it happen to you without your consent is horribly violating."

Hackers are able to gain access to victims' computers using a piece of malicious software (malware) called a remote-access Trojan (Rat).

Many Rats now include a function allowing a hacker to access the victim's webcam without their knowledge.

The malware is spread in infected files or by tricking the victim - known as a "slave" or "bot" - into visiting a specific webpage.

Media playback is unsupported on your device Media caption How safe is your webcam?

The chief executive of Childnet International, Will Gardner, says it has anecdotal evidence of webcams being hacked, although it is rare.

"It's difficult to say how commonplace it is, but it can happen," he says.

"The key advice is not clicking on links or opening attachments from people you don't know.

"Pointing your webcam at a wall or covering it up can be good practice, and closing the laptop lid.

"There's a range of practical measures to make sure that if somebody did manage to infect it, they wouldn't be able to see anything."

A BBC Radio 5 live producer posing online as a computer security enthusiast made contact with several webcam hackers from the UK and around the world.

At least one of them has since been arrested on suspicion of cyber-offences.

The investigation uncovered websites where hackers share pictures and videos of their victims.

They include pages where hackers exchange photos of "ugly" slaves, and others where men swap pictures of female slaves.

John, 16, who lives near London, estimates he has hacked 100 computers and viewed webcams on almost half of them.

'I know it is illegal'

WEBCAM SAFETY TIPS Webcams can be affected by viruses so be wary of emails and social network messages from strangers

Make sure anti-virus and firewall protection is kept up to date

Avoid putting webcams in bedrooms or other private areas

Unplug the webcam, cover the lens or point it at a blank wall when it is not in use

Be sure you can trust the person you are chatting to and remember webcam footage can be recorded and potentially shared online

If you have been the victim of inappropriate sexual contact via webcam tell a trusted adult and report it to the police via the Child Exploitation and Online Protection centre (Ceop)

Source: ChildNet International and Ceop

He says: "I wasn't really looking for anything on their webcams, just their reactions. I'd open up random sites - shock sites - they'd see a scary picture or someone screaming, and you'd see they were scared. There are creepy people who post pictures of ugly or female slaves. I'm not really into that."

When challenged about invading people's privacy, John says he did not worry about getting found out: "Yeah, it is illegal. But the risk of getting caught, that someone would do something about you trolling people, isn't that much. It's just a bit of a laugh."

BBC Radio 5 live's investigation uncovered evidence of a black market in "slaves", where access to compromised computers is sold for small sums of money.

Matti, 17, from Finland, says he has hacked about 500 computers and obtained details which he sold on to others so they could install their own programs and control these computers and their webcams remotely.

He says: "There's always pervs on the internet who want to buy female 'bots', and most likely if they want a webcam they take photos and sell it."

He says access to a woman's webcam can be sold for $1 (64p), but the same amount could buy access to 100 computers owned by men.

When challenged about the legality of what he was doing Matti says: "I really don't care since if someone wants to do that then do it. If he pays me I'm OK with it."

The Commons Home Affairs Committee is coming to the end of an inquiry into e-crime.

Its chairman, Keith Vaz, told BBC Radio 5 live's Breakfast programme: "Because webcams are present in probably every home in the United Kingdom, what you have uncovered is pretty shocking and serious.

"What surprises me is the ages of the some of the people involved.

Media playback is unsupported on your device Media caption Teen hacker tells 5 live: "At the time you're having a laugh"

"This is an area that the committee didn't even look at as it didn't come to its attention until now.

"It is important that our teachers and the education system wakes up to the importance of advising young people on what could and couldn't happen.

"Manufacturers should look at the ways to ensure that computers and webcams themselves can alert people that they are still on - perhaps with a bleep - so that the users can realise it's still on, and make sure it's switched off."

Abusive messages

The chief executive of the government's Get Safe Online campaign, Tony Neate, says: "The most at-risk computers are those running older software which has not been updated, and those without up-to-date anti-virus software installed, making it even more crucial that people ensure their computer has the latest version of anti-security software installed across all devices."

An Association of Chief Police Officers representative said: "Police have come across webcam hacking through cyber investigations.

"Any unauthorised intrusion into an individual's computer is an offence under the Computer Misuse Act and the police are able to prosecute offenders. Ensuring anti-virus protection is in place is important to prevent illegal access of your computer."

Independent computer security expert Graham Cluley said: "This does happen and the police have arrested people and they have been monitoring dozens of webcams. But we should not go into a blind panic about this."

"There are 100,000 new virus threats created every day and it's really important to keep your security up to date because anti-virus software should protect you against most of these threats."

Joss Wright, a research fellow at the Oxford Internet Institute, said he was not aware of webcam hacking being widespread. Installing the latest software security updates should reduce whatever threat existed, he said - but bearing in mind that not everyone does this, he added, the warning was useful.

"The idea of sticking a piece of paper over your webcam is reasonably common among the more paranoid corners of the hacker community," he said. But it's not necessarily paranoid, it's useful to be aware."

Some of the names used in this article have been changed.

To listen to Andrew Silke's report catch BBC Radio 5 live's Breakfast programme on the iPlayer later.