Artificial Intelligence人工智能
How Amazon Bedrock catches AI-generated phishingAmazon Bedrock 如何拦截 AI 生成的钓鱼邮件
Social engineering through phishing remains one of the most common tactics for launching cyberattacks. AI-generated phishing email messages now pose a new challenge for security teams managing email systems, significantly raising the risk because of their advanced sophistication. Modern social engineers use generative AI and open source intelligence (OSINT) to craft thousands of unique messages with perfect grammar, appropriate context, and personalized details. Today, an indicator of a phishing email message might be a perfectly written, professionally formatted message.通过钓鱼邮件进行社会工程攻击,至今仍是发动网络攻击最常见的手段之一。AI 生成的钓鱼邮件给管理邮件系统的安全团队带来了新的挑战,因其高度复杂,风险显著增加。现代社会工程师利用生成式 AI 和开源情报(OSINT)来制作数千封语法完美、上下文恰当、细节个性化的邮件。如今,一封钓鱼邮件的标志,可能恰恰是它写得完美无缺、格式专业。
The evolution of phishing钓鱼攻击的演变
For someone like John, an IT security engineer at a mid-sized firm, the rules of phishing detection were once straightforward: flag the typos, catch the generic salutations, and quarantine anything with a mismatched sender domain. These were the defining characteristics of an earlier era of phishing, when attacks sent millions of generic, error-riddled email messages at scale, relying on volume rather than precision to find victims. Security filters were built exactly for these threats, and for years, they were effective. Poor grammar, generic greetings, and mismatched logos were indicators that gave attackers away.对于像 John 这样在一家中型公司担任 IT 安全工程师的人来说,检测钓鱼邮件的规则曾经很简单:标记拼写错误,抓住通用的称呼,隔离任何发件人域名不匹配的邮件。这些是早期钓鱼攻击的典型特征——那时攻击者大规模发送数百万封通用、错误百出的邮件,依靠数量而非精准度来寻找受害者。安全过滤器正是为应对这类威胁而设计的,多年来一直有效。语法错误、通用问候语、不匹配的标识,这些都会暴露攻击者。
The threat landscape John monitors today looks nothing like the ones those filters were designed to catch. Generative AI changed how phishing works. Attacks are now grammatically correct, contextually accurate, and personalized to the target. These messages don’t trigger traditional filters because those filters weren’t designed to catch them.John 今天监控的威胁环境,与那些过滤器原本设计要捕捉的威胁完全不同。生成式 AI 改变了钓鱼攻击的方式。现在的攻击语法正确、上下文准确,并且针对目标进行了个性化定制。这些邮件不会触发传统过滤器,因为那些过滤器本来就不是为捕捉它们而设计的。
The threat is no longer identifiable by what it looks like, but what it knows. Modern AI systems run OSINT operations that pull data from professional networks, corporate websites, and publicly available digital footprints to map out organizational hierarchies and relationships. With that intelligence, social engineers can process massive datasets at scale to generate contextually accurate messages personalized to your organization. These communications can even adapt in real time based on your responses, shifting tone or adjusting details to stay consistent with the conversation.威胁不再通过它的外观来识别,而是通过它所知道的信息来识别。现代 AI 系统运行 OSINT 操作,从专业网络、公司网站和公开可用的数字足迹中提取数据,绘制出组织层级和关系图。有了这些情报,社会工程师可以大规模处理海量数据集,生成针对你组织的上下文准确的个性化邮件。这些通信甚至可以根据你的回复实时调整,改变语气或调整细节以保持对话的一致性。
Amazon Bedrock is a fully managed service that makes high-performing foundation models (FMs) from leading AI companies available through a unified API, along with capabilities needed to build generative AI applications with security, privacy, and responsible AI. Amazon Bedrock adds an additional layer of analysis to your existing security infrastructure that goes beyond traditional surface-level filtering. It understands context and detects phishing attempts based on behavioral patterns, not grammar quality or formatting. To put that into practice, let’s break down how Amazon Bedrock analyzes an email from the moment it hits your inbox.Amazon Bedrock 是一项完全托管的服务,通过统一的 API 提供来自领先 AI 公司的高性能基础模型(FM),以及构建生成式 AI 应用所需的安全、隐私和负责任 AI 能力。Amazon Bedrock 为你现有的安全基础设施增加了一层额外的分析,超越了传统的表面过滤。它理解上下文,并根据行为模式(而非语法质量或格式)来检测钓鱼企图。为了付诸实践,让我们分解一下 Amazon Bedrock 如何从邮件到达你的收件箱的那一刻起对其进行分析。
Amazon Bedrock uses large-scale general-purpose AI models pre-trained on vast amounts of data. Foundation models can analyze behavioral patterns in email content, understand contextual relationships, and identify anomalies that signal a message might be a phishing attempt. In practice, these capabilities can be structured as a multi-stage analysis pipeline. Each email passes through authentication, behavior analysis, and risk scoring before reaching your users’ inboxes.Amazon Bedrock 使用在海量数据上预训练的大规模通用 AI 模型。基础模型可以分析邮件内容中的行为模式,理解上下文关系,并识别出表明邮件可能是钓鱼企图的异常。在实践中,这些能力可以构建成一个多阶段分析管道。每封邮件在到达用户收件箱之前,都要经过身份验证、行为分析和风险评分。
Amazon Bedrock offers two integrated capabilities to power your AI-driven phishing defense. Pre-trained foundation models bring sophisticated natural language understanding that can detect nuanced manipulation, contextual anomalies, and impersonation patterns invisible to rule-based systems. The second capability, Amazon Bedrock Guardrails, provides configurable safeguards that help align foundation model interactions with your organization’s responsible AI policies and application requirements, without requiring custom detection logic. Together, these capabilities can be integrated into a multi-stage email analysis pipeline.Amazon Bedrock 提供两种集成能力来驱动你的 AI 驱动的钓鱼防御。预训练的基础模型带来了复杂的自然语言理解能力,可以检测到基于规则的系统无法察觉的细微操纵、上下文异常和冒充模式。第二种能力,Amazon Bedrock Guardrails,提供了可配置的安全防护措施,帮助将基础模型的交互与你组织的负责任 AI 策略和应用要求对齐,无需自定义检测逻辑。这些能力可以集成到一个多阶段邮件分析管道中。
Amazon Bedrock workflow for intelligent phishing defenseAmazon Bedrock 智能钓鱼防御工作流
In the workflow solution, each message first undergoes standard authentication checks (Sender Policy Framework (SPF), DomainKeys Identified Mail (DKIM), Domain-based Message Authentication, Reporting and Conformance (DMARC)). These protocols confirm that the sending server is authorized to send on behalf of the domain and that the message hasn’t been tampered with in transit. The phishing detection workflow, powered by the Amazon Bedrock foundation models, analyzes the message against three key factors: word choice, communication style deviations, and contextual appropriateness of requests. Detecting these subtle inconsistencies in writing style and misaligned requests adds a deeper layer of analysis on top of traditional security controls. AI analysis also requires careful governance to confirm it operates responsibly and within your defined boundaries. Amazon Bedrock Guardrails help filter both input prompts and model outputs. They prevent responses that could inadvertently leak confidential data, and they check that analysis results adhere to the policies you set. Keep in mind that guardrails need careful configuration and calibration to meet your application requirements.在该工作流解决方案中,每封邮件首先经过标准的身份验证检查(SPF、DKIM、DMARC)。这些协议确认发送服务器有权代表该域名发送邮件,并且邮件在传输过程中未被篡改。由 Amazon Bedrock 基础模型驱动的钓鱼检测工作流,根据三个关键因素分析邮件:用词选择、沟通风格偏差以及请求的上下文适当性。检测这些写作风格上的细微不一致和错位的请求,在传统安全控制之上增加了一层更深入的分析。AI 分析还需要谨慎的治理,以确保其在你定义的边界内负责任地运行。Amazon Bedrock Guardrails 有助于过滤输入提示和模型输出。它们防止可能无意中泄露机密数据的响应,并检查分析结果是否符合你设定的策略。请记住,防护措施需要仔细配置和校准,以满足你的应用需求。
Implementing Amazon Bedrock Guardrails for analysis实施 Amazon Bedrock Guardrails 进行分析
Amazon Bedrock Guardrails give you granular control over how foundation models process email content through content filters, denied topics, word filters, and sensitive information filters. For example, John the security engineer can configure guardrails to automatically redact sensitive personally identifiable information (PII) discovered during email analysis, helping to prevent the foundation model from generating responses that could inadvertently leak confidential data.Amazon Bedrock Guardrails 通过内容过滤器、拒绝主题、单词过滤器和敏感信息过滤器,让你对基础模型如何处理邮件内容进行细粒度控制。例如,安全工程师 John 可以配置防护措施,自动编辑在邮件分析过程中发现的敏感个人身份信息(PII),帮助防止基础模型生成可能无意中泄露机密数据的响应。
However, guardrail configurations for security analysis require careful calibration. While content filters protect against inappropriate inputs and outputs, overly restrictive settings can prevent the model from analyzing suspicious content that legitimately needs to be evaluated. If a social engineer includes offensive language in an email message to bypass filters, your guardrails must allow the security system to analyze that content. At the same time, the guardrails must still protect against inappropriate inputs and outputs in other contexts. Guardrails also provide contextual grounding checks that keep model responses factually anchored to the email content being analyzed, reducing false positives caused by model hallucination. This allows the AI-powered analysis to operate within defined boundaries while still detecting intricate patterns.然而,用于安全分析的防护措施配置需要仔细校准。虽然内容过滤器可以防止不适当的输入和输出,但过于严格的设置可能会阻止模型分析那些确实需要评估的可疑内容。如果社会工程师在邮件中包含攻击性语言以绕过过滤器,你的防护措施必须允许安全系统分析该内容。同时,防护措施仍必须在其他上下文中防止不适当的输入和输出。防护措施还提供上下文基础检查,使模型响应在事实上锚定于正在分析的邮件内容,减少因模型幻觉导致的误报。这使得 AI 驱动的分析能够在定义的边界内运行,同时仍然检测到复杂的模式。
In this post, you will learn how to implement a multi-stage email analysis pipeline using Amazon Bedrock foundation models that evaluate sender behavior patterns, contextual appropriateness, and communication anomalies to identify AI-generated phishing attempts before they reach your users.在本文中,你将学习如何使用 Amazon Bedrock 基础模型实现一个多阶段邮件分析管道,该管道评估发件人行为模式、上下文适当性和通信异常,以在 AI 生成的钓鱼企图到达你的用户之前将其识别出来。
Implementation framework实施框架
The following framework shows how to put this into practice within your existing email security infrastructure, so that someone in John’s position can move from reactive filtering to proactive detection. After your standard authentication checks (SPF, DKIM, DMARC) confirm an email comes from a legitimate mail server, the phishing detection workflow goes a step further by layering in behavioral analysis. Your system moves from checking whether a server is authorized to evaluating whether a message matches how your coworker normally communicates.以下框架展示了如何在你现有的邮件安全基础设施中付诸实践,以便像 John 这样的人可以从被动过滤转向主动检测。在你的标准身份验证检查(SPF、DKIM、DMARC)确认邮件来自合法邮件服务器之后,钓鱼检测工作流更进一步,加入了行为分析。你的系统从检查服务器是否被授权,转向评估邮件是否与你同事的通常沟通方式相匹配。

Figure 1 maps the five-step email security analysis workflow, from initial guardrail screening through AI analysis, risk scoring, and final routing decisions.图 1 展示了五步邮件安全分析工作流,从初始的防护措施筛选,到 AI 分析、风险评分,以及最终的路由决策。
Before diving into the implementation, let’s clarify what each component does. Behavioral analysis starts with a sender baseline tracker, which is a profile of each person who sends email to you. The sender baseline tracker logs how your employees normally write, so the Amazon Bedrock analysis pipeline has a reference point to compare against.在深入实施之前,让我们明确每个组件的作用。行为分析从一个发件人基线追踪器开始,这是一个关于每个向你发送邮件的人的档案。发件人基线追踪器记录你的员工通常如何写作,以便 Amazon Bedrock 分析管道有一个参考点进行比较。
Over continued use, the phishing detection workflow will understand the words your employees use, how formal or casual they are, what they usually ask for, and who they normally communicate with. Consider John’s environment: A coworker who usually sends quick one-liners suddenly writes a formal email requesting an urgent wire transfer. The analysis pipeline catches that shift and flags it for John’s team to take a closer look.随着持续使用,钓鱼检测工作流将了解你的员工使用的词汇、他们正式或随意的程度、他们通常要求什么,以及他们通常与谁通信。考虑 John 的环境:一个通常发送简短一句话的同事,突然写了一封正式的邮件,要求紧急电汇。分析管道捕捉到这种转变,并将其标记出来,供 John 的团队进一步检查。
This can help reduce false alarms and save time that John’s team might otherwise spend sorting through flagged email messages that turn out not to be real threats.这有助于减少误报,并节省 John 的团队可能花在分类被标记但最终并非真正威胁的邮件上的时间。
Here’s a high-level outline on how these components work together when an email enters your phishing detection workflow:以下是这些组件在邮件进入你的钓鱼检测工作流时如何协同工作的高级概述:
Step 1: Input guardrails and pre-processing步骤 1:输入防护措施和预处理
The phishing detection workflow first runs incoming email messages through Amazon Bedrock Guardrails, which screen for sensitive content and flag anything that should go to manual review before the analysis begins.钓鱼检测工作流首先将传入的邮件通过 Amazon Bedrock Guardrails 运行,这些防护措施会筛选敏感内容,并标记出任何应在分析开始前进行人工审查的内容。
Step 2: Prompt construction with context步骤 2:带上下文的提示构建
After an email clears that check, the workflow constructs an analysis prompt by combining the email’s content with the sender’s baseline communication patterns, organizational context, and known phishing examples by using Amazon Bedrock Knowledge Bases. That way, the model is evaluating the message against a full picture, not in a vacuum.邮件通过检查后,工作流通过将邮件内容与发件人的基线沟通模式、组织上下文以及已知的钓鱼示例(使用 Amazon Bedrock Knowledge Bases)相结合,构建一个分析提示。这样,模型是在一个完整的背景下评估邮件,而不是在真空中。
Step 3: AI-powered analysis with guardrails步骤 3:带防护措施的 AI 驱动分析
The foundation model processes the email using the constructed prompt while guardrails keep the analysis within your defined security boundaries. The foundation model can examine suspicious content thoroughly while the guardrails keep it from generating outputs that expose sensitive information in the process.基础模型使用构建的提示处理邮件,同时防护措施将分析保持在你定义的安全边界内。基础模型可以彻底检查可疑内容,而防护措施则防止它在此过程中生成暴露敏感信息的输出。
Step 4: Multi-factor risk scoring步骤 4:多因素风险评分
From that analysis, the Amazon Bedrock pipeline generates three scores: one for content anomalies, one for behavioral deviations, and one for contextual alignment. The pipeline combines them into a single risk score from 0–100, which determines where the email is routed.根据该分析,Amazon Bedrock 管道生成三个分数:一个用于内容异常,一个用于行为偏差,一个用于上下文对齐。管道将它们合并为一个 0–100 的风险评分,该评分决定邮件的路由位置。
Step 5: Classification and automated routing步骤 5:分类和自动路由
Safe messages land in your employees’ inboxes as usual. Suspicious email messages get quarantined for your security team to review. Dangerous messages are blocked outright.安全邮件照常进入员工的收件箱。可疑邮件被隔离,供安全团队审查。危险邮件则被直接阻止。
Continuous learning through feedback通过反馈持续学习
These steps happen in milliseconds as messages move through your routing system. Your existing infrastructure still handles message routing and delivery. The analysis runs alongside it as an inspection layer that evaluates behavioral risk before messages reach your users’ inboxes.这些步骤在邮件通过你的路由系统时以毫秒级完成。你现有的基础设施仍然处理邮件路由和投递。分析作为检查层与之并行运行,在邮件到达用户收件箱之前评估行为风险。
Over continued use, the phishing detection workflow improves its accuracy in making these calls through a few complementary techniques. Dynamic prompt engineering, the practice of iteratively refining the instructions sent to the foundation model based on real-world results, takes feedback from the security team and incorporates it directly into your analysis prompts, gradually fine-tuning how the model evaluates potential issues. That feedback loop also feeds into a growing knowledge base of validated examples, where confirmed phishing attempts and legitimate messages are cataloged and later used as few-shot learning demonstrations in future prompts. So, when a new email comes in, the model isn’t working from scratch. It references your real, previously verified examples that match similar patterns to make a more informed judgment.随着持续使用,钓鱼检测工作流通过几种互补技术提高了做出这些判断的准确性。动态提示工程——根据实际结果迭代优化发送给基础模型的指令的做法——接收来自安全团队的反馈,并将其直接纳入你的分析提示中,逐步微调模型评估潜在问题的方式。该反馈循环还反馈到一个不断增长的已验证示例知识库中,其中确认的钓鱼企图和合法邮件被编目,并在未来的提示中用作少样本学习演示。因此,当一封新邮件到来时,模型不是从头开始工作。它引用你真实的、先前验证的示例,这些示例匹配相似的模式,以做出更明智的判断。
Example: AI-generated phishing email analysis示例:AI 生成的钓鱼邮件分析
The following AI-generated phishing email message demonstrates modern phishing sophistication. Notice the perfect grammar, legitimate business context, and reference to a real purchase order (PO) format. None of these would trigger traditional spam filters. Following the email message is a simplified prompt structure showing how Amazon Bedrock analyzes messages against sender baselines and known phishing patterns. The prompt combines email content with historical context to support behavioral analysis beyond surface-level filtering. Last is a sample risk assessment output identifying a vendor impersonation attempt. The Amazon Bedrock pipeline flagged behavioral anomalies, including a first-ever payment change request, along with domain inconsistencies that traditional authentication checks missed.以下 AI 生成的钓鱼邮件展示了现代钓鱼攻击的复杂性。注意完美的语法、合法的业务上下文以及对真实采购订单(PO)格式的引用。这些都不会触发传统的垃圾邮件过滤器。在邮件之后是一个简化的提示结构,展示了 Amazon Bedrock 如何根据发件人基线和已知的钓鱼模式分析邮件。该提示将邮件内容与历史上下文相结合,以支持超越表面过滤的行为分析。最后是一个样本风险评估输出,识别出一个供应商冒充企图。Amazon Bedrock 管道标记了行为异常,包括首次付款变更请求,以及传统身份验证检查遗漏的域名不一致。
Sample phishing email示例钓鱼邮件
Prompt structure and risk assessment output提示结构和风险评估输出
The continuous feedback loop持续反馈循环
Behind these examples, the phishing detection system maintains dynamic sender baselines in a database that tracks each of your sender’s typical communication patterns, vocabulary, tone, and request types. False positives flagged by John’s security team are fed back into the phishing detection pipeline, updating baselines to account for legitimate variations in how senders communicate. Confirmed phishing patterns are cataloged alongside these baselines to enrich future prompt context with current intelligence. The result is a feedback loop where every correction and every confirmed threat make the analysis more accurate.在这些示例背后,钓鱼检测系统在数据库中维护动态的发件人基线,追踪每个发件人的典型沟通模式、词汇、语气和请求类型。John 的安全团队标记的误报被反馈到钓鱼检测管道中,更新基线以考虑发件人沟通方式的合法变化。确认的钓鱼模式与这些基线一起编目,以用当前情报丰富未来的提示上下文。结果是一个反馈循环,其中每一次纠正和每一个确认的威胁都使分析更加准确。

The continuous feedback pipeline runs across five stages:持续反馈管道运行在五个阶段:
1. Analyze – The foundation model evaluates your incoming email messages using dynamic prompts built from accumulated phishing attempt intelligence and sender context.1. 分析 – 基础模型使用从累积的钓鱼企图情报和发件人上下文构建的动态提示,评估你传入的邮件。
2. Score – Based on that analysis, a risk score from 0–100 is assigned, and suspicious messages are quarantined for your security team’s review.2. 评分 – 根据该分析,分配一个 0–100 的风险评分,可疑邮件被隔离供安全团队审查。
3. Review – Flagged messages get classified as either a confirmed phishing attempt or a false positive.3. 审查 – 被标记的邮件被分类为确认的钓鱼企图或误报。
4. Learn – Those classifications feed back into your system, updating the example library, sender behavior baselines, and emerging patterns catalog.4. 学习 – 这些分类反馈到你的系统中,更新示例库、发件人行为基线和新兴模式目录。
5. Enhance – New examples and confirmed phishing attempt patterns get incorporated into the analysis prompts, improving detection accuracy for the next cycle.5. 增强 – 新的示例和确认的钓鱼企图模式被纳入分析提示中,提高下一个周期的检测准确性。
Early cycles will require more hands-on review as your system creates its baseline understanding. For John, that means his team initially spends more time classifying flagged messages, but the investment pays off quickly. As the example library and sender profiles grow, the model becomes progressively more accurate at distinguishing legitimate communications from phishing attempts. John stays in the loop throughout, but his attention shifts from sifting through noise to focusing on genuinely suspicious messages.早期周期需要更多的手动审查,因为你的系统正在创建其基线理解。对 John 来说,这意味着他的团队最初花费更多时间分类被标记的邮件,但这种投入很快得到回报。随着示例库和发件人档案的增长,模型在区分合法通信和钓鱼企图方面变得越来越准确。John 始终参与其中,但他的注意力从筛选噪音转移到关注真正可疑的邮件上。
Each cycle through this loop creates a stronger, more adaptive defense that evolves alongside the phishing attempts it was designed to catch. That continuous improvement is what separates this feedback-driven detection model from static, signature-based detection.通过这个循环的每一次迭代,都会创建一个更强、更具适应性的防御,与它旨在捕捉的钓鱼企图共同进化。这种持续改进,正是这种反馈驱动的检测模型与静态的基于签名的检测之间的区别。
Conclusion结论
Phishing detection can no longer rely on surface-level indicators such as typos and awkward phrasing. The framework in this post addresses that shift by combining the Amazon Bedrock foundation models with behavioral analysis, contextual grounding, and a continuous feedback loop that improves accuracy over time. Amazon Bedrock catches subtle manipulation attempts that trained eyes might miss, while your existing infrastructure keeps doing what it was built to do.钓鱼检测不能再依赖拼写错误和措辞笨拙等表面指标。本文中的框架通过将 Amazon Bedrock 基础模型与行为分析、上下文基础以及随时间提高准确性的持续反馈循环相结合,应对了这一转变。Amazon Bedrock 能够捕捉训练有素的眼睛可能遗漏的细微操纵企图,而你现有的基础设施则继续做它原本要做的事情。
Pair these defenses with solid verification processes, healthy skepticism toward unexpected requests, and a security culture that keeps your teams moving confidently. Employee awareness still matters, but now generative AI works with you to identify and help prevent impersonation attempts. AI made phishing harder to detect. The same technology, applied defensively, makes it harder to succeed.将这些防御措施与可靠的验证流程、对意外请求的健康怀疑态度以及让你的团队自信行动的安全文化相结合。员工意识仍然重要,但现在生成式 AI 与你合作,识别并帮助防止冒充企图。AI 让钓鱼攻击更难检测。同样的技术,用于防御,则让攻击更难成功。
To begin implementing these defenses, start by visiting the Amazon Bedrock console. You can configure Amazon Bedrock Guardrails for your email flow and follow this tutorial to build your own email phishing detection pipeline. Share your experience with AI-powered security in the comments.要开始实施这些防御措施,请先访问 Amazon Bedrock 控制台。你可以为你的邮件流配置 Amazon Bedrock Guardrails,并按照本教程构建你自己的邮件钓鱼检测管道。在评论区分享你使用 AI 驱动安全的经验。