Anyone know how a Pegasus infection is detected? I never see detection advise in these articles.

There is the MVT project on GitHub. caveat emptor, it comes with apt warnings but the documentation helps.

https://github.com/mvt-project/mvt