The US operates military satellites watching for that exact sort of thing. The launch of an ICBM, even from a sub, has a huge IR signal. It cannot be confused for a fast-moving jet, for instance.
Add to it, the US has a pretty good idea of where its own subs are, and a good track of where Russian and Chinese Boomers (ballistic-missile-armed subs) are operating. Everybody keeps a close watch on when everyone else’s subs leave port.
Then, there’s simple logic to understand: Only six countries have nuclear-missile-armed subs. One can easily rule out the USA, UK, and France.
That leaves India, China, Russia.
India has been trying to improve Western relations for a long time, it has not been easy while India continues buying military gear from Russia. Still, they are making headway, and the Quad is a very useful agreement for India. Including the US, Australia, Japan, and India. It’s a good counterbalance for India’s difficulties with China. India would not spoil that.
That leaves China and Russia.
China is much better at “soft power” than Russia. Soft power applies business practices to the diplomatic realm (e,g. “China’s Belt and Rail Initiative”). This is why China rarely gets involved in conflicts. It’s bad for business, and business is their greatest strength.
Launching on the US would spoil everything they’ve spent decades building.Thus, that only leaves Russia, who mostly understand “hard power.” That’s using military force to get what they want. Thus, the only truly plausible attacker would be Russia.
Knowing all this, and with satellites watching for launches, it is pretty easy to suss out who did it.
Heard about NORAD? The North American Aerospace Defense Command – NORAD is designed to track and identify, it’s a bi-national United States and Canadian organization charged with the missions of aerospace warning and aerospace control for North America. Through outstanding bi-national cooperation, NORAD has proven itself effective in its roles of watching, warning, and responding.
NORAD continues to play an important role in the defense of Canada and the U.S by evolving to meet the changing threat. The events of September 11, 2001 demonstrated NORAD’s continued relevance to North American security. Today, NORAD provides civil authorities with a potent military response capability to counter domestic airspace threats.
Then U.S won’t hesitate to send nukes on Russian soil.