Detect malicious GIFs
GIFs are just a sequence of images

Given that you just need to find right quantification/pooling of these images to display a GIF. When you displayed a single GIF it will be a collection of different images, where flashing images will have sudden changes in pixel intensity, exactly that is what you want to catch in set of images=GIFs that are malicious.  You just need binary classification from there on.

have a look at here