In this paper we propose a novel distributed local interaction protocol for networks of multi-agent systems (MASs) in a multi-dimensional space under directed time-varying graph with the objective to achieve secure rendezvous or static containment within the convex hull of a set of leader agents. We consider the scenario where a set of anonymous adversarial agents may intrude the network (or may be hijacked by a cyber-attack) and show that the proposed strategy guarantees the achievement of the global objective despite the continued influence of the adversaries which cannot be detected nor identified by the collaborative agents. We characterize the convergence properties of the proposed protocol in terms of the characteristics of the underlying network topology of the multi-agent system. Numerical simulations and examples corroborate the theoretical results.