Militante, der har svoret troskab til Islamisk Stat, har brændt huse ned og dræbt civile med macheter.