This is how I believe it could happen:
Impeachment Trial of William Jefferson Clinton circa 1998. A terrorist organization uses a WMD on Washington DC, killing the House, Senate, President, Vice President, most of the Cabinet, and the Supreme Court.
The first 7 in the line of succession are dead, so someone else assumes the Presidency.
He does what he has to do and declares martial law. Ordering US airspace cleared, all ports closed etc. A working Senate could be made by those Governors able to appoint new Senators, however all states wouldn't be represented as all Governor's do not have that power and it will take months.
House Special Elections will take at least a year.
In effect whoever it is would be a defacto Dictator for at least a year, given the nature of the attack Americans would probably give a wide berth for the new President in order to safeguard against other attacks.
In order to preserve the Judicial system and in the absence of Congress being in recess due to its destruction he makes 9 recess appointments to the Supreme Court. All of course favorable to his policies and viewpoints before a Congress can fully be reformed.
He then makes recess appointments to all Cabinet positions, and a recess appointment to the office of Vice President. Even if anyone challenges them, he's already stacked the Supreme Court.....
He then issues a number of Presidential executive orders, essentially ruling by them in order to keep the country moving. To face the threat and to counter unemployment he institutes a draft forseeing the coming of war. Many young Americans taken in by the tragedy volunteer for service. A suitable terrorists nation would be chosen and invaded. Not like Iraq or Afghanistan, full blown invasion.
Life for the average American doesn't change greatly, yes there are military patrols in large cities, both air, sea and land but that's to be understood after the event. Life in rural parts really doesn't change much.
Once his government is in place and within the first month of the event ports and airports are reopened with heavy military security. Ships are subject to search and seizure by the military. People are randomly searched in airports, bus stations and train stations by military personal, and you thought the TSA was bad. But its understandable in this time of emergency.
He suspends the Presidential election in 2000 so that there is some continuity but calls for congressional elections and other elections to proceed. The cia carefully investigates all candidates for congress and governships. Leaks will makes sure that political enemies will not be able to win seats. (So now he's stacked the Congress and the Governorships). He promises a return to presidential elections in 2004 once the emergency has passed.
The foreign wars continue however they also claim some valuable resources for the United States, surely we deserve these oil fields and such due to the nature of attack on our country.
To help the citizens he passes a work progress bill to help the rebuilding and cleaning of Washington DC, while also giving improvements to critical infrastructure. In addition through executive order he passes educational funding for the poor and middle class.
By the time elections come in 2004 the American people have a favorable opinion of him. Congress, The Supreme Court and Governorships are stacked. He has control of the miltiary. Folks reelect him in thanks for stability. He suggests the repeal of presidential term limits and it passes the Congress and states.
Remember Hitler was an elected leader of Germany......