Rio de Janeiro (CNN)In some ways, it made perfect sense for Milvvia Goncalves to offer up her home for rent on Airbnb.
More and more tourists are booking stays in Rio's hilltop favelas
1 of 6
2 of 6
3 of 6
4 of 6
5 of 6
6 of 6
It's a tidy two-bedroom apartment in a neighborhood overlooking some of Rio de Janeiro's most stunning beaches.
On the other hand, the hillside community called Cantagalo -- or "Rooster's Crow" -- with its stacks of brick and cement homes was dominated by violent drug gangs until just a couple of years ago.
In fact, for decades foreigners and Brazilians alike steered clear of Rio's so-called favelas.
That has begun to change.
"My boyfriend had the idea of renting my apartment, but I wasn't convinced," she says.
"I thought who's going to come to a favela? But it was nonsense! Tons of foreigners love to stay here."
In 2008, police and soldiers were sent into dozens of favelas to seize control from drug gangs and set up a permanent security presence.
They now have Police Pacification Units in 38 of more than 1,000 Rio favelas.
"I rent to a lot of foreigners now," she says, showing us around the modest third-story apartment which goes for 150 reais, or less than $50 a day, and comes with Internet and an electrical fan to cool off.
"I've had people from France, from New York, from England," she says.
Goncalves uses the money to pay for university classes.
Security is still an issue.
Although 2015 has been relatively peaceful, last year there was a string of shootouts between rival gangs and police that rattled residents in Cantagalo and raised questions about the effectiveness of the police "pacification" drive.
"I've never had any problems here," Goncalves says.
"It could be that at some point something happens, but you never know. Favelas are unstable. Right now it's peaceful."
Critics say the police campaign will never truly be successful without better police training to improve relations with residents and more state services to provide education and job opportunities in the communities.
Many residents complain that while security has brought tourists, it has also sparked a huge increase in real estate prices.
The most popular favela by far among tourists is Vidigal, a picturesque community perched on a steep hill overlooking Rio's exclusive Ipanema and Leblon beaches.
It has traditional hostels like the Hostel Alto Vidigal, which is covered in colorful murals.
A bed in a shared room starts at 21 reais, or $6 a night.
"The Olympics are still a year away, but we're completely full, with a waiting list," says manager Vicente Favorito.
Visitors are generally looking for a more authentic experience, and of course the cheap prices and great views.
On any given day, groups of tourists wander through the winding streets of Vidigal, pausing for selfies from the lookouts and admiring the handmade kites flown by children.
"This is my first time coming here in eight years of living in Brazil and I've enjoyed it very much," says Sherri Lewis Gikovate, taking her visiting parents on a tour of Vidigal.
Gikovate was born in St. Louis, but moved to Rio.
She says she wasn't worried at all about security.
"Even my daughter, she's seven years old and she's here with me in Vidigal, taking the tour and meeting some of the children, even playing together, so it's not been an issue for me at all. I haven't felt unsafe for one moment here."
Still, a lot will depend on the security situation over the next year.
Rio has a notoriously high homicide rate, but according to the state's security chief, the murder rate has fallen by 85% in favelas that now have a permanent police presence.
For those with a sense of adventure and a lot of money, there's even a luxury offering in Vidigal with glassed-in suites and a high-end restaurant.
A deluxe suite at Mirante do Arvrao costs at least 400 reais, or $113 per night.
"We really took a risk, believing in the potential here of this community," says the owner, Fernando Penteado.
"It's a place where people feel very safe and that has this privileged view that you can't get anywhere else in Rio de Janeiro."
But don't get your hopes up ... he's already negotiating with a group of Japanese businessmen who want to rent out the entire hotel during the Olympic Games.