Officers have been attacked while responding to violence targeting homes believed to be housing asylum seekers.