Organizations commonly use web-based email applications to access, read, and manage messages received through organizational or service-based mail infrastructure.
If deceptive email content reaches a user's mailbox without sufficient detection, an attacker may attempt to manipulate the recipient into trusting fraudulent messages, following malicious instructions, disclosing credentials, or accessing attacker-controlled resources. Such weaknesses can expose users and organizations to phishing attacks.
In this use case, the existing Roundcube Webmail application is deployed in an isolated Ubuntu virtual machine. The application provides the target webmail interface used to receive and display controlled phishing email messages.
Kali Linux is used as the controlled security-testing system.
A controlled Phishing Email Content Attack assessment is performed against the authorized laboratory Roundcube Webmail environment. The assessment first establishes normal email communication and then introduces controlled phishing-style email content into the isolated mailbox.
A publicly available phishing email dataset is used as the source for training the AI classification component. The dataset contains labeled legitimate and phishing email samples that can be processed for Transformer-based text classification.
DistilBERT is used as the AI classification model because it can process contextual relationships within email text and classify email content according to learned phishing and legitimate patterns.
Python and the required Transformer and machine-learning libraries are used for dataset preprocessing, model fine-tuning, evaluation, and inference.
The controlled phishing email is then delivered through the isolated mail infrastructure and displayed through Roundcube. The received email content is extracted and provided to the trained DistilBERT model for classification.
The complete security-validation workflow is:
Public Phishing Email Dataset
→
Email Preprocessing
→
DistilBERT Tokenization
→
DistilBERT Model Training
→
Model Evaluation
→
Roundcube Webmail Deployment
→
Controlled Phishing Email Preparation
→
Phishing Email Delivery
→
Roundcube Email Reception
→
Email Content Extraction
→
AI-Based Classification
→
Phishing Detection
→
Before/After Security Comparison
→
Security Validation