Threads (@bytesundries)
security-privacyai-tools
Original source

Google Magika — AI-Powered File Content Type Detection

Summary

Google open-sourced Magika, an AI-powered tool that detects the true content type of files regardless of file extension. Catches disguised malicious PDFs, hidden scripts, etc.

Technical details:

  • Deep learning model trained on ~100 million samples
  • Supports 200+ file types
  • Millisecond-level detection speed
  • ~99% accuracy
  • Install: pip install magika
  • 11K GitHub stars

Production usage:

Already deployed at Google scale for:

  • Gmail attachment scanning
  • Google Drive file scanning
  • Safe Browsing file checks

Use cases for developers:

  • Detect disguised/malicious files (wrong extension hiding real content)
  • Security pipeline integration
  • File upload validation
  • Malware analysis preprocessing