Abu Ghassan looks more like a hipster than a revolutionary. Decked out in a pink shirt and black jeans, he clutches a pack of cigarettes and begins to talk hesitantly about his activities. He is eager to get back to the beleaguered city of Homs in Syria but quickly warms to questions about how he learned to fight Bashar Assad with an AK-47, a video camera and the Internet—and how Americans helped turn him into a cyberwarrior.

Abu Ghassan (not his real name) told TIME on June 8 that he has been a two-fisted warrior for a while—with the scars to show for it. While filming an antiregime demonstration in December in Homs, he heard a blast and was told that two government tanks were headed toward the crowd. Abu Ghassan, 26, had to decide: Keep filming or pick up a weapon? He decided to do both, grabbing an AK-47 from his car and setting down his video camera in an elevated spot to catch the action. As he ran ahead, an armored Land Rover swerved in front of the crowd, and regime soldiers opened fire. Abu Ghassan and fighters with the Free Syrian Army, the rebel force protecting the demonstrators, fired back to allow the civilians to scramble for cover. As bullets whizzed back and forth, Abu Ghassan was clipped in the shoulder by shrapnel. “I don’t know how I didn’t get more injured or killed,” he says.

As the opposition was then just learning to do, Abu Ghassan uploaded the combat video to the Internet. Soon after, local dissident leaders picked the former engineer to go abroad for even-more-sophisticated training in computer encryption, circumvention of government firewalls and secure use of mobile phones—courtesy of the U.S. State Department. The training has helped give the rebels the upper hand in one front in the battle against Syria’s President. Even as the Assad regime’s army crushes the opposition on the ground, the dictator has been losing the war online.

In the process, the Obama Administration has tiptoed across an invisible line. Washington has said it will not actively support the Syrian opposition in its bid to oust Assad. Officially, the U.S. says it abides by the U.N. process led by Kofi Annan and does not condone arms sales to opposition groups as long as there are U.N. observers in Syria. Nevertheless, as U.S. officials have revealed to Time, the Obama Administration has been providing media-technology training and support to Syrian dissidents by way of small nonprofits like the Institute for War & Peace Reporting and Freedom House. Viral videos of alleged atrocities, like the footage Abu Ghassan produced, have made Assad one of the most reviled men on the planet, helping turn the Arab League against him and embarrassing his few remaining allies almost daily. “If the [U.S.] government is involved in Syria, the government isn’t going to take direct responsibility for it,” says Lawrence Lessig, director of Harvard’s Edmond J. Safra Center for Ethics. “The tools that you deploy in Internet freedom interfere with tools deployed by an existing government, and that can be perceived as an act of aggression.”

The program actually began four years ago with a different target: China. In 2008, Michael Horowitz, a longtime religious-liberty advocate, went to his friend Representative Frank Wolf, a Virginia Republican, and suggested setting aside funds to help Falun Gong, a religious group that Beijing has labeled a dangerous cult. The money was supposed to help the dissidents distribute software to jump China’s massive firewall and organize online as well as communicate freely with the outside world. Wolf succeeded in appropriating $15 million. But U.S. diplomats feared the move would derail relations with Beijing, and little money was spent. Then the 2009–10 Iranian protests and last year’s Arab Spring made Internet freedom a much more fashionable term in Washington. Congress soon forked over an additional $57 million to State to spend in the next three years. The money is split among three areas: education and training; anonymization, which masks users’ identities, usually through encryption; and circumvention technology, which allows users to overcome government censors so that their work—and that of repressive regimes—can be seen worldwide.

The funding comes from a warren of cubicles in the southeast corner of the seventh floor of the State Department’s Harry S. Truman building in Washington. There, a team of six people—two women and four men—doles out Internet Freedom Grants to nonprofit groups and software developers that help dissidents all over the world. Most of the team’s day is spent sifting through hundreds of grant proposals and reading expert opinions about which are most promising. “You won’t find commercial providers for this stuff because there’s no money in it. It’s all given away for free,” says Ben Scott, who works with the team at State. “There aren’t that many users in the world aware of—or sophisticated enough to develop—these technologies.” In all, more than 10,000 bloggers, journalists and activists have been trained in 10 languages through 50 programs, and hundreds of thousands more have accessed materials and guides published by the groups.

It’s a peculiar irony that a lot of the subversive know-how being exported to the Syrian opposition was originally developed to circumvent U.S. authorities. One group of American-backed instructors working in the Middle East, for example, trains activists in a tactic used by drug dealers and showcased on the hit show The Wire. In order to have truly secure phone conversations, activists are advised to use a SIM card registered to a dead person and place it in a cheap burner phone that can be easily discarded. Another circumvention technology, called Tor, that allows dissidents to get around Syria’s Internet censors is favored by narcotraffickers as well as by the hacker group Anonymous. Also being deployed against Assad: private e-mail- and messaging-board platforms similar to the one developed by RiseUp.net, a group of antigovernment protesters who’d been repeatedly targeted by the FBI.

Stealthier work-arounds are in the pipeline. The New America Foundation has a grant to develop what it describes as the “Internet in a suitcase,” which could provide access to the Web when local authorities have shut it down. One app downloads a panic button that dissidents can hit if they’re pulled over by the police or other security forces, instantly wiping all contacts and incriminating evidence from their smart phones. Another app presents a false screen when the wrong security code is entered. And still another blurs the faces of dissidents so that footage and photos of protests can be posted without exposing the people who are risking their lives by taking to the streets.

During his absence from Homs this winter, Abu Ghassan took a five-day Communication Security 101 course, which began with the most basic tool: a cell phone. The Syrian government controls the country’s cell networks and can triangulate dissidents’ positions, even using their own phones to bug them. Activists learn to remove the batteries when not using the phones, carry multiple phones and cycle through them as quickly as possible. Trainees are also taught how to encrypt their Internet chats, set up a secure connection and hide their files on a computer. Instructors warn that the Syrian government is engaged in cyberwar too. The police used apparently friendly e-mails to send out malware to everyone on one dissident’s contact list. Once a computer is infected, malware can track keystrokes so Big Brother in Damascus can see what a dissident is typing—and to whom—as well as every new password.

An ongoing challenge is that the flow of software goes to both sides. The regime has imported technology from the U.S. to track people online. “A lot of these technologies can be used for great good,” says Sascha Meinrath, who is leading the Internet-in-a-suitcase project, “but they are also a Faustian bargain.” The Obama Administration last month issued an Executive Order imposing sanctions on any company helping Syria or Iran commit human-rights abuses.

Washington’s high-tech campaign will not dethrone Assad. But it has given Syrian dissidents a measure of confidence as they face the regime’s advantage in firepower. In the months since finishing his training, Abu Ghassan has shot dozens of videos. Asked whether his AK-47 or his video camera is the more powerful weapon, Abu Ghassan laughs. “My AK!” he says. He pauses for a few seconds. “Actually, if there is an Internet connection, my camera is more powerful.” — with reporting by Babak Dehghanpisheh