I'm currently studing how OS assign ephemeral ports.
I know that years ago on application's requests, the OS used to open ephemeral ports progressively, but now due to a too easy detection for packet injection it has changed.
My question is, how the OS is currently choosing which ephemeral port to open? Is it still possibile a packet injection without brute forcing all the possible ports? (if yes, how?)
Thanks