A big Japanese carrier task force sailed halfway across the Pacific Ocean completely undetected to hit Pearl Harbor, so a single muslim terrorist sub could easily get to within a few miles of the US coastline and send terror squads ashore in small fast-moving rubber dinghies. America's Pacific and Atlantic coastlines are over 4000 thousand miles long (including Alaska) and the US Navy and coastguard can't cover every single mile.
Another scenario would be if terrorist mini-subs were carried in the holds of innocent-looking merchant ships and launched a hundred miles off the coast in international waters to make their way in submerged.
As I've said before, most muslim governments probably wouldn't do such a thing because of the fear of massive American retaliation, but small renegade extremist loose-cannon terror groups might.
Mini-subs are not a new idea, this one was used by Colombian drug smugglers-