A number of relatively unnoticed articles on the web suggest that the line between the militias and the fluid Libyan officialdom was blurred and porous. That may have made it possible for al-Qaeda to turn "allies" of the State Department into infiltrators; creating the ultimate Green on Blue opportunity to attack the US consulate in Benghazi.
Walid Shoebat cites Libyan sources who allege that some of the locals entrusted with consular security had ties to al-Qaeda. "The National Transitional Council, which represented the political apparatus that opposed Gadhafi in 2011 and served as the interim government after his removal, made an extremely curious appointment in August of 2011. That appointment was none other than Abdel Hakim Belhaj, an Al-Qaeda ally and ‘brother’". In other words the post Khadaffy government put a cat among the pigeons. The appointment of Belhaj reads:
We would like to inform you that you have been commissioned to the duties and responsibilities of the military committee of the city of Tripoli. These include taking all necessary procedures to secure the safety of the Capital and its citizens, its public and private property, and institutions, to include all international embassies. To coordinate with the local community of the city of Tripoli and the security assembly and defense on a national level.
Another clue is from a video featured on an Egyptian site reported by the Long War Journal showing Muhammad Jamal al Kashef (a.k.a. Abu Ahmed) who is "suspected of training some of the terrorists responsible for the consulate assault, during which Ambassador J. Christopher Stevens and three other Americans were killed" giving an interview boasting of his ties to al-Qaeda.
It is not clear where or when the interview was filmed, but Jamal says he "always came to this place inside a State Security vehicle, and this is the first time" he did not. Jamal does not add much more.
That would presumably be an Egyptian State Security vehicle. The Wall Street Journal says of Kashef (aka Ahmad):
On returning to Egypt in the 1990s, a former U.S. official said, Mr. Ahmad became head of the operational wing of Egyptian Islamic Jihad, which was then headed by Ayman al-Zawahiri, a physician who is now the chief of al Qaeda. Associates of Mr. Ahmad agree he was part of Egyptian Islamic Jihad but say he wasn't among its leaders ...
Freed last year, Mr. Ahmad is building his own terror group, say Western officials, who call it the Jamal Network. They say he appears to be trying to tap former fellow inmates such as Murjan Salim, a man who, like Mr. Ahmad, has ties to al Qaeda's Dr. Zawahiri. Former associates of Mr. Ahmad said Mr. Salim is directing aspiring jihadis to Mr. Ahmad's camps in Libya.
While these are only fragmentary reports, they suggest that the Libyan militia scene -- and the post-Arab Spring Egyptian security establishment -- were like post-war Berlin; full of double agents, provocateurs, posers and con men. If that scene was penetrated by al-Qaeda agents and active Jihadists, who were building an army in camps across North Africa and far to the south in Mali, then Stevens was basically sitting on a volcano getting ready to erupt.
This makes it easier to understand how and why the consulate was attacked and its supposed safe houses detected. It suggests how the "video" story crossed from Egypt to Libya and why that bizarre narrative became prominent in American official statements. Why? Because it was told them by a 'trusted source' -- disinformation planted by an Arab secret service under the control or influence of al-Qaeda. Washington bought it, or found it convenient to buy and they clung to it for dear life as they saw their plans fall to pieces before their eyes.
It may also shed some light on why the US response was so tentative. The administration was being double-crossed at the moment of attack and they may have hesitated to fire on persons they were not sure were friend or foe, who may have been in possession of US weapons and even known to possess MANPADs. Maybe they still don't know.