Countrywide Home Loans Inc. put Ambac Assurance Corp. on the hook for $2.7 billion by secretly churning out shoddy residential mortgage-backed securities in the "worst of the worst" of pre-2008 loan practices, the insurer's counsel told a Manhattan judge on the first day of a long-awaited trial Wednesday.