– Illicit ivory, kidnappings, piracy ransoms, smuggled charcoal, extorted payments from aid organizations and even fake charity drives pretending to collect money for the poor — the Al-Shabab militant group has shifted from one illegal business to another, drawing money from East Africa’s underworld to finance attacks like the recent deadly siege at a Nairobi shopping mall.

Now officials here and in the West are redoubling efforts to defeat or at least contain the group — with a watchful eye on its hydra-headed sources of money — before its fighters can strike again in Kenya or even the United States.

For years, U.S. officials have been deeply worried about the Somali militant Islamist group, which claimed responsibility for killing more than 60 men, women and children in the Sept. 21 mall attack. But despite comprehensive multiagency efforts to shut down its sources of money, the group still controls lucrative smuggling routes in southern Somalia, extracts protection money from a variety of Somali businesses and has raised hundreds of thousands, if not millions, of dollars abroad, part of it from the United States.

Somali elders say Al-Shabab employs a team of accountants — essentially white-collar militants — who have devised elaborate taxation schemes in Somalia, for instance $500 per farm per year or $2 for every sack of rice that passes through their checkpoints.

“They calculate your income, they do the math,” said Mohamed Aden, a former president of Himan and Heeb, a partly autonomous region of central Somalia near Al-Shabab territory. “And then you have to obey. Otherwise they kill you. That’s just how it is.”

The group has also proved adept at mixing its financing activities with Islamic charities. According to several Somali elders, Al-Shabab steals money from mosque-building projects and schools.

But Al-Shabab members are also known as savvy businessmen. After the group seized the port of Kismayo in southern Somalia, some car dealers as far as Mogadishu preferred importing vehicles there, instead of using the main government port, saying Al-Shabab ran a tighter operation with lower fees.

Though African Union forces have pushed the group out of Kismayo, its fighters still control the scratchy, sandy hinterland around the port, and Somali elders say it continues to tax items like T-shirts, sugar and soap.

“They have a diversified income stream,” said Jonathan Schanzer, the vice president for research at the Foundation for Defense of Democracies and a former counterterrorism official at the U.S. Treasury. “Sort of a perfect cocktail that created this nightmare scenario.”

Somalia’s perennial chaos makes Al-Shabab’s tendrils even more difficult to remove. Militant groups around the world dabble in the felonious, but the long history of anarchy in Somalia, whose central government imploded in 1991, creates the ideal environment for war profiteers.

Schanzer said the attack on the Nairobi mall probably cost “close to $100,000,” calculating the price of the automatic rifles, bullets and grenades that were used, along with training costs and possibly rent for a store in the mall that has been suspected of being used as a weapon depot before the attack.

Over the weekend, Kenya’s major newspapers reported that the country’s intelligence services had information about a potential strike on the mall but failed to act. U.S. officials said that the warning had been based on fragmentary information and that they had no “actionable” or specific intelligence about the attack.

President Hassan Sheik Mohamud of Somalia said in an interview that his country desperately needed to replace its informal money transfer business with a proper banking sector, but that it needed more time. The sudden shutdown of financial transfers could be disastrous, he said, especially now, when Somalia is struggling to recover from years of chaos and needs investment to keep the momentum going.

Cutting off the ability of Somali expatriates to send back money to relatives could make many people poorer and drive more jobless, disillusioned youths into Al- Shabab’s ranks, Mohamud said. “We need to break that vicious circle of generations losing hope.”