Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

LinkedIn Gmail Instagram Old Discord Reddit


AI Phishing Email Analyzer

IMG_2522

An automated python tool designed to analyze the raw email artifacts (eml files) to identify phishing intent and threat vectors. The application parses metadata, inspects IP Addresses, Domains, attachments using the VirusTotal threat intelligence API, and leverages a local Large Language Model (LLM) Ollama to perform email forensics and generate an analysis report.


🔎 Table of Content
  1. About The Project
  2. Usage
  3. Analysis Report
  4. Reference

(Back to Top)

About the Project

Screenshot 2026-07-12 180056

Step 1 & 2: Users upload a raw .eml file through the Streamlit-based frontend, which parses the message into different data.

Step 3: The backend queries the VirusTotal API to retrieve static reputation data for all extracted artifacts, including domains, URLs, IP addresses, and file hashes.

Step 4: The backend orchestrates a request to the local Ollama engine, utilizing the Llama 3.1 LLM model to perform a context-based linguistic analysis of the email's tone, urgency, and the use of social engineering.

Step 5: The application correlates the data from VirusTotal and the prediction results from the AI model to generate a comprehensive, exportable Threat Analysis Report.

(Back to Top)

Built With

Language

Libraries & Dependancies

  • numpy 2.5.1
  • openai 2.44.0
  • pandas 3.0.3
  • python-dotenv 1.2.2
  • streamlit 1.59.1
  • vt-py 0.22.0

AI Tool

Engine

Model

  • Llama 3.1

(Back to Top)

Usage

I tested the application with a real phishing email from the PhishStrike Lab on CyberDefenders

Screenshot 2026-07-10 193728

Select and upload a suspect .eml file.

Screenshot 2026-07-10 193748

The file was successfully uploaded.

Screenshot 2026-07-10 193809

You can view the extracted email contents: subject, sender, attachment and hash value, email body.

Screenshot 2026-07-10 193822

Click the "Analyze Email Now" button and wait for the forensics audit under 2 minutes.

(Back to Top)

Analysis Report

After the analysis is finished, VirusTotal Verdict and AI Prediction result will be generated.

VirusTotal

Screenshot 2026-07-10 194119

VirusTotal provides static threat intelligence for sender domains, URLs, IP addresses, and file hashes.

AI Prediction Result

Screenshot 2026-07-10 194129 Screenshot 2026-07-10 194204

The AI Prediction result provided a context-based analysis of the email. It correlated the VirusTotal's detection with the email's linguistic characteristics such as urgency, authority, tone and the use of social engineering tactics to deliver a comprehensive threat verdict.

Screenshot 2026-07-10 194212 Screenshot 2026-07-10 194249

A comprehensive threat analysis report can also be exported with a structured format.

  1. AI Verdict and confidence level
  2. VirusTotal Intel Detection Logs
  3. Executive AI Summary
  4. Detailed Forensics Analysis

Screenshot 2026-07-12 170953

I tested the appliction with a normal email. Although the domain of the sender was classified as clean, the AI model did not eliminate the possibility of phishing based on the languages and the tone used in the email.

(Back to Top)

Reference

CyberDefenders - PhishStrike Lab

(Back to Top)

About

A python email phishing analyzer that parses raw EML files and attachment for threat evidence using local Ollama models and threat intel VirusTotal

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors