Tor is an overlay network that enables anonymous communication between applications that communicate over TCP. This network serves hundreds of thousands of users, allowing them to decide when they wish to be identified, thus keeping their online data from being tracked and protecting the privacy of their activities against third party tracking attempts. Despite being used mainly to avoid online censorship in countries under dictatorial regimes, in a way, this anonymity network supports hidden services and allows drugs dealing, pedophilia, human trafficking, protecting botnets, sending SPAM, DDoS attacks, and other cybercrimes. In this context, the project seeks to provide a solution to the growing traffic of malicious code that is being sent over this network. The goal of the proposal is to research methods and techniques for protecting the Tor network against malicious traffic, while maintaining the privacy and anonymity of harmless traffic.