Militants attack security forces