It's not attacking with microbes or chemicals, no. That's the mesenterial filaments, which are, as the person above me said, full of stinging cells. It's making sure nothing is on the rock that will cause it problems, and/or this is an instinctive reaction to a possible competitor being too close. I'm not sure if it's possible to check whether the coral is trying to clean the rock of competition, or just thinks the rock is another coral.