darkmailr
Darkmailr 是一款自托管的离线钓鱼模拟工具,利用开源大语言模型生成现实且有针对性的钓鱼邮件,适用于安全测试和培训。它支持本地网络访问、多种模型选择及自定义提示功能。 2025-7-7 14:15:5 Author: infosecwriteups.com(查看原文) 阅读量:14 收藏

january1073

darkmailr is a self-hosted, offline phishing simulation tool that uses open-source LLMs (via Ollama) to generate realistic, context-aware phishing emails for red team exercises, security awareness training, and prompt injection testing.

Important: This tool is for educational and authorized testing purposes only. Users are solely responsible for ensuring compliance with all applicable laws and regulations.

  • Offline Operation — No data leaves your network
  • LAN Accessible — Use from any device on your network
  • Open Source LLMs — Powered by Ollama (Mistral, Llama, etc.)
  • Context-Aware — Generates realistic, targeted phishing emails
  • Export Functionality — Save results for training purposes
  • Easy Setup — Single command installation
  • Debian 10+ (or similar Linux distribution)
  • Python 3.9+
  • 4GB+ RAM (for LLM models)
  • Network access for initial setup

Step 1: Install and run Ollama, e.g., with Mistral

curl -fsSL https://ollama.com/install.sh | sh
ollama run mistral # Or any other model that runs on Ollama
ollama serve &

Step 2: Clone and run darkmailr

git clone https://github.com/darkmailr/darkmailr.git
cd darkmailr
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.py

Step 3: Access via web browser

  • From the same machine: http://localhost:5000
  • From another machine in the same local network: http://<local_ip>:5000

In darkmailr’s UI, you first fill in the sender information, like sex, name, company, etc.

Then you fill in the receiver information, topic of the phishing email, choose the attack vectors — phone number, web link, and/or attachment —, and click on “GENERATE PHISHING EMAIL”.

After some time, which depends on the processing power of your server machine, darkmailr outputs a phishing email based on your input.

Quite convincing, I think.

Changing the LLM Model

Edit app.py and modify the model name:

"model": "mistral",  # Change to: llama2, codellama, etc.

Customizing Prompts

Modify the prompt template in app.py:

prompt = f"""Your custom prompt template here..."""

darkmailr is an open source project and the first version has just been released. Contributions to improve and further develop the tool are highly welcome. Please see the CONTRIBUTING.md for guidelines.


文章来源: https://infosecwriteups.com/darkmailr-generate-realistic-context-aware-phishing-emails-air-gapped-d3cc88457dab?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh