Mr Panetta said that following the killing of Osama Bin Laden, key leaders in Pakistan, Yemen and elsewhere had been identified and would be targeted.
He offered the upbeat assessment during his first visit to Afghanistan since taking over at the Pentagon last week.
Earlier, a member of Afghanistan's intelligence service shot dead two US soldiers in the Panjshir valley.
The National Directorate of Security (NDS) officer, a bodyguard for its deputy director, was killed when another US soldier returned fire.
The soldiers were accompanying a Provincial Reconstruction Team when they were stopped by the officer. It is believed there was an argument when they asked him to remove his vehicle from a bridge.
He had been on holiday in the north-eastern area at the time.
Afghan soldiers and police have turned on Nato-led troops in the past, but it is thought to be the first such incident involving an NDS official. (read more)