It would be a HARM, and it think the Russians have one that is long range, basically targets in an area of known SAMs and then pops up acquires target and bang.
Now they would have had some notice, probably very little but there is no such thing as complete stealth it cuts down the range of acquisition.
A S300 comprises a number of vehicles/systems, I assume they have radar spares? Usually they are used to degrade radar, you are going to hit the off switch is you detect one heading your way but then the modern ones will store the coordinates.
But the a S300 has short range systems around it to protect it from such threats and they did not work.