Washington (CNN) -- Another attempted terrorist attack on the United States in coming months is "certain," the heads of major U.S intelligence agencies told a Senate committee Tuesday.
Al Qaeda remains the top security threat to the United States, but a growing cyber-security threat also must be addressed by the U.S. intelligence community, the heads of the CIA, the FBI and other agencies told the Senate Intelligence Committee.
The hearing covered a range of security issues and became contentious, with Republicans on the committee arguing with Democratic counterparts and the intelligence chiefs on how the Obama administration has handled terrorism suspects such as the failed Christmas Day bomber of a U.S. airliner.
Asked by committee chair Sen. Dianne Feinstein, D-California, of the likelihood of another attempted terror attack on the United States in the next three to six months, the officials agreed with Director of National Intelligence Dennis Blair's initial answer of "certain."
While none of the intelligence chiefs, who included CIA Director Leon Panetta, FBI Director Robert Mueller and others, cited a specific pending threat, their testimony made clear that an evolving al Qaeda remains their top concern.
"My greatest concern, and what keeps me awake at night, is that al Qaeda and its terrorist allies and affiliates could very well attack the United States," Panetta said.
Al Qaeda is adapting methods to make their plots more difficult to detect, shifting from large attacks with multiple players to using individuals without any background in terrorism, Panetta said.
He noted the Christmas Day attempt as an example, saying the suspect had a U.S. visa but little history of involvement with terrorist groups.
"Obviously, they decided to make use of someone like that within a very short period of time" of the suspect coming into contact with al Qaeda, Panetta said.
Blair also said that deciding whether to prosecute terrorist suspects in a criminal court or by a military commission should be decided on a case-by-case basis.
The question involved the handling of Umar Farouk AbdulMutallab, the suspect in the failed Christmas Day bombing of a U.S. airliner.
Republicans have criticized security officials for charging the suspect in criminal court instead of treating him as an enemy combatant to be prosecuted by a military commission.
Sen. Kit Bond, R-Missouri, said it was a mistake for security officials to have read AbdulMutallab his Miranda rights on the night he was arrested, instead of first conducting further interrogation.
Blair, however, said the handling of terror suspects requires flexibility to allow for the appropriate response in each case. FBI Director Robert Mueller agreed, saying that providing a suspect with Miranda rights can bring better information than traditional military or intelligence interrogation.
Mueller noted that incentive agreements with suspects have many times resulted in gaining "actionable intelligence" that otherwise might never have come forward.
Republican Sens. Olympia Snowe of Maine and James Risch of Idaho, asked why AbdulMutallab was read his Miranda rights so quickly. Mueller said the decision must be considered in the context of the full investigation.
"You're looking at it through the rear-view mirror," Mueller said.
"Do not discount what has happened or what does happen after that in terms of gaining intelligence."
Later Tuesday, a law enforcement official told CNN AbdulMutallab had been talking to investigators since last week and providing useful, current and actionable intelligence -- leads that the FBI and intelligence officials have been actively following up.
The official was not authorized to speak for attribution because the case remains under investigation. Mueller said none of the intelligence chiefs at Tuesday's hearing were consulted about the decision to read AbdulMutallab his Miranda rights. That decision was made by the chief security interrogator at the scene in consultation with the Department of Justice, Mueller said.
The discussion included a harsh exchange among committee members, with Democratic Sens. Feinstein, Jay Rockefeller of West Virginia and Sheldon Whitehouse of Rhode Island accusing Republican Sens. Bond and Orrin Hatch of Utah of politicizing the issue.
Feinstein noted the policy of charging terrorists in U.S. criminal courts dates back to the Reagan administration, while Whitehouse called Republican framing of the issue "fallacious."
Hatch also asked Blair if any evidence showed that President Obama's plan to close the Guantanamo Bay, Cuba, detention facility for terrorism suspects would reduce the terrorist threat against the United States.
Hatch and Bond said they opposed the plan because it would bring terrorism suspects to U.S. soil.
Blair responded that Guantanamo has become a major recruiting tool for al Qaeda, setting off an exchange with Hatch that concluded with Blair saying: "Guantanamo has achieved a sort of mythic quality that helps al Qaeda."
In his written testimony to the committee, Blair said it would take the capture or deaths of al Qaeda's top two leaders -- Osama bin Laden and Ayman al Zawahiri -- to possibly end the group's intent to attack the United States.
On the cyber-security threat, Blair's written testimony described an inability to contend with attacks using computer networks and telecommunications systems.
"Sensitive information is stolen daily from both government and private sector networks, undermining confidence in our information systems, and in the very information these systems were intended to convey," Blair wrote. "We often find persistent, unauthorized, and at times, unattributable presences on exploited networks, the hallmark of an unknown adversary intending to do far more than merely demonstrate skill or mock a vulnerability."
Feinstein agreed with Blair's assessment that the nation was unprepared for the kinds of possible cyber attacks it could face.
"The need to develop an overall cyber-security strategy is very clear," Feinstein said.