DDoS and DoS attacks have been growing in size and number over the last decade. Existing solutions employed to mitigate these attacks have proven to be inefﬁcient in combating the problem. Compared to other types of malicious computer network trafﬁc, DDoS and DoS attacks are particularly difﬁcult to mitigate. With their ability to mask themselves as legitimate trafﬁc, developing methods to detect attacks on a packet or ﬂow level, has proven itself to be a difﬁcult challenge. Two methods based on the ability of a Variational Autoencoder to learn useful latent representations from network trafﬁc ﬂows are proposed, to differentiate between normal and malicious trafﬁc. The ﬁrst method is implemented as a classiﬁer on the latent encodings of the Variational Autoencoder. The classiﬁer learns through the abstract feature space of the encoder, based on input features extracted from pre-generated trafﬁc ﬂows. In the second method, the Variational Autoencoder is used to learn the abstract feature representations of exclusively legitimate trafﬁc. Then anomalies are ﬁltered out through the reconstructed output of a Variational Autoencoder, based on their dissimilarities from the normal trafﬁc probability distribution. Both proposed methods have been thoroughly tested on two separate datasets with a similar feature space. The results show that the ﬁrst method is able to successfully detect individual trafﬁc ﬂows with high precision on the training and validation data, slightly less successfully on the test data. For the second method, the Variational Autoencoder will require further adjustments to be able to sufﬁciently ﬁlter out anomalies from network trafﬁc ﬂows.