How I Convinced an AI to Hack Itself: Prompt Injection to XSS ️
好,我现在要帮用户总结这篇文章的内容。用户的要求是用中文,控制在100字以内,不需要特定的开头。首先,我需要仔细阅读文章内容,抓住关键点。 文章讲的是一个安全研究人员在测试一个企业级网络应用(Target-X)时,发现了一个AI聊天助手存在XSS漏洞。这个AI原本设计上是不应该生成代码或脚本的,但研究人员通过诱导AI生成恶意JavaScript代码,成功实现了XSS攻击。攻击过程持续了两天,最终导致了跨站脚本漏洞的触发。 接下来,我需要将这些关键点浓缩到100字以内。要确保包含主要元素:研究人员、AI聊天助手、XSS漏洞、诱导生成恶意代码、两天时间、漏洞触发。 然后,组织语言使其简洁明了。可能的结构是:研究人员测试应用发现AI聊天助手存在XSS漏洞,通过诱导生成恶意代码,在两天内触发漏洞。 最后检查字数是否符合要求,并确保没有使用不需要的开头词。 </think> 研究人员在测试企业级网络应用时发现其AI聊天助手存在XSS漏洞。尽管该AI设计上不应生成恶意代码,但通过诱导其生成恶意JavaScript,在两天内成功触发跨站脚本攻击。 2026-1-25 14:15:41 Author: infosecwriteups.com(查看原文) 阅读量:1 收藏

Mahendra Purbia (Mah3Sec)

Press enter or click to view image in full size

Free Link🔗

TL;DR

Found XSS in an AI chat feature by manipulating the AI to generate malicious JavaScript. The AI became my unwilling accomplice in hacking the application. Spider-Sense: activated 🕸️

The Discovery

Testing an enterprise web app (let’s call it Target-X), I found their AI chat assistant. This wasn’t some developer-focused coding AI — this was a productivity assistant for meetings, scheduling, and general workplace tasks (think Copilot for Outlook vibes).

Important Context: This AI was specifically designed to NOT generate code, scripts, or technical payloads. It’s supposed to help you write meeting notes, not write XSS payloads.

Like any researcher with trust issues, I immediately tried injecting in my messages.

Me: <script>alert('XSS')</script>

Result: Properly escaped. User input was sanitized. ✅

But then I thought… what if I manipulate the AI to generate the payload for me, even though it’s not supposed to?

The Attack: 2 Days of AI Gaslighting

Day 1: Normal Conversation (Building Trust)


文章来源: https://infosecwriteups.com/how-i-convinced-an-ai-to-hack-itself-prompt-injection-to-xss-%EF%B8%8F-dab60010e40d?source=rss----7b722bfd1b8d--bug_bounty
如有侵权请联系:admin#unsafe.sh