WASHINGTON — In a direct attack on one of President Obama’s political strengths, a group of former special operations and C.I.A. officers started a campaign on Tuesday night accusing Mr. Obama of recklessly leaking information about the raid that killed Osama bin Laden and other security matters to gain political advantage.

The new group, called the Special Operations Opsec Education Fund, using shorthand for “operational security,” describes itself as nonpartisan, but some of its leaders have been involved in Republican campaigns and Tea Party groups. A 22-minute video called “Dishonorable Disclosures” featured on its Web site appears to be aimed squarely at the president, echoing charges made previously by Mitt Romney and other Republicans.

The Obama campaign immediately compared the effort to the “Swift Boat” advertisements against Senator John Kerry in the 2004 presidential campaign. Like that effort, which attacked Mr. Kerry’s military record in Vietnam, the Opsec site goes after Mr. Obama’s strong points on national security — specifically his role in overseeing the military-Central Intelligence Agency raid that killed Bin Laden, the founder of Al Qaeda, in May 2011.

Security officials and members of both parties in Congress have sharply criticized leaks about classified operations under Mr. Obama, and some Republicans have complained about news briefings on the Bin Laden raid and assistance to filmmakers making a movie about the operation. But the administration has also overseen an unprecedented number of prosecutions for press disclosures, and in June, Attorney General Eric H. Holder Jr. directed two United States attorneys to investigate leaks discussed in the Opsec video.