It's the first time the agents sabotaged the English-language magazine linked to U.S.-born Yemeni cleric Anwar al-Awlaki, an extremist accused in several recent terror plots.
The quarterly online magazine, which is sent to websites and email addresses as a pdf file, had offered an original page titled "Make a Bomb in the Kitchen of Your Mom" in one of its editions last year. The magazine's pages were corrupted, however, and the instructions replaced with the cupcake recipe.
"We're increasingly using cybertools as part of our work," a British government official who spoke on condition of anonymity to discuss intelligence matters said Friday, confirming that the Inspire magazine had been successfully attacked.
The hackers were reportedly working for Britain's eavesdropping agency, GCHQ, which has boosted its resources in the past several years.
Despite sharp cuts to defense and intelligence agency budgets, Britain last year authorized an extra 500 million pounds ($815 million) in funding on cyber-related projects. In London talks last month, Prime Minister David Cameron and U.S. President Barack Obama also pledged to work more closely on cyber research.
Agents from GCHQ have also started to embed themselves with military units on the battlefield, allowing troops to intercept communications, track individuals and providing the military -- and governments -- with real-time intelligence.
Christopher Painter, the U.S. State Department co-ordinator for cyber issues, said at a cybersecurity conference in London that one of the biggest problems was identifying hackers -- whether they be from foreign governments trying to steal secrets or lone hackers.
But choosing to hack into al-Qaida-affiliated websites or other systems is also risky business for intelligence agencies. Infiltrating a site can often expose sources and methods, a second British official said, also speaking on condition of anonymity to discuss cybersecurity matters. He would not specify how Inspire was hacked.
British officials consider al-Qaida in the Arabian Pensinsula to be a significant threat to U.K. interests.
Al-Awlaki, thought to be hiding in Yemen, is believed to have inspired and even plotted or helped coordinate recent attacks on the U.S. Those include the failed December 2009 bombing of a Detroit-bound airliner and the unsuccessful plot to send mail bombs on planes from Yemen to the U.S. Al-Awlaki also is believed to have inspired the 2009 shooting at Fort Hood, Texas, and had ties to some of the 9/11 hijackers.
Roshonara Choudhry, a student who was jailed after she stabbed a British lawmaker last May, told police she had listened to 100 hours of al-Awlaki's online lectures.
Awlaki is a regular contributor to Inspire, offering advice on everything from spiritual questions to recruiting.
"A recipe for cupcakes is better than a recipe for bombs, but it would been more productive if they had put up counter-arguments to al-Qaida," said James Brandon with the London-based Quilliam Foundation, an anti-extremist organization. "They could have also attacked Awlaki himself. It should be about discrediting these individuals."
Extremists are increasingly turning to cyberspace to spread their message.
Individuals who say they are affiliated with the Taliban in Afghanistan or Pakistan have started using Twitter. Several other Internet forums also operate in the UK for jihadist groups, such as Islamic Awakening. Many sites have been left alone so message traffic can be monitored.
Governments around the world are now considering how cybercrimes can be prosecuted under existing international laws and whether a cyberattack could someday be considered an act of war.