Michael Cohen was under surveillance before these raids, where a device called Triggerfish was used to listen in on his communications.
https://assets.documentcloud.org/documents/5775620/cohen-raid-materials-release.pdf
https://en.wikipedia.org/wiki/Triggerfish_(surveillance)