sounds like a michael chrichton (sp?) book or movie
Prey
‘Swarm’ was Crichton’s book on just this subject. A good read.
The original story was written by a friend, Jerome Bixby. He disavowed the movie version because the Producers insisted on having a villain. He didn’t believe one, other than the Human body, itself, was required.