Are companies really just YOLOing and plugging LLMs into everything knowing prompt injection is possible? This is insanity. We're supposedly on the cusp of a "revolution" and almost 2 years on from GPT-3 we still can't get LLMs to distinguish trusted and untrusted input...?
> Are companies really just YOLOing and plugging LLMs into everything knowing prompt injection is possible? This is the first time I’ve seen an AI use public data in a prompt. Most AI products only augment prompts with internal data. Secondly, most AI products render the results as text, not HTML with links.
Data Exfiltration from Slack AI via indirect prompt injection
121–130 of 182 posts
Re: Data Exfiltration from Slack AI via indirect prompt injection
#122Earlier quoted context omitted.
Some ( all ) CEOs learned that offering a free month coupon/voucher for Future Security Services to secure your information against a breach like the one that just happened on the platform that's offering you a free voucher to secure your data that sits on the platform that was compromised and leaked your data, is a nifty-clean way to handle such legal inconveniences. Oh, and some supposed financial penalty is claime…
Techies aren't immune either, before we all follow the "blame management" bandwagon for the 2^101-tieth time. CEOs aren't the reason supply chain attacks are absolutely rife with problems right now. That's entirely on the technical experts who created all of those pinnacle achievements in tech ranging from tech-led orgs and open source community built package ecosystems. Arbitrary code execution in homebrew, scoop, c…
Re: Data Exfiltration from Slack AI via indirect prompt injection
#123Here's how it mitagates a similar attack...
File Upload Protection with PGvector and RLS:
Access Control for Files: RLS can be applied to tables storing file metadata or file contents, ensuring that users can only access files they have permission to see. Secure File Storage: Files can be stored as binary data in PGvector, with RLS policies controlling access to these binary columns. Metadata Filtering: RLS can filter file metadata based on user roles, channels, or other security contexts, preventing unauthorized users from even knowing about files they shouldn't access.
How this helps mitigate the described attack:
Preventing Unauthorized File Access: The file injection attack mentioned in the original post relies on malicious content in uploaded files being accessible to the LLM. With RLS, even if a malicious file is uploaded, it would only be accessible to users with the appropriate permissions. Limiting Attack Surface: By restricting file access based on user permissions, the potential for an attacker to inject malicious prompts via file uploads is significantly reduced. Granular Control: Administrators can set up RLS policies to ensure that files from private channels are only accessible to members of those channels, mirroring Slack's channel-based permissions.
Additional Benefits in the Context of LLM Security:
Data Segmentation: RLS allows for effective segmentation of data, which can help in creating separate, security-bounded contexts for LLM operations. Query Filtering: When the LLM queries the database for file content, RLS ensures it only receives data the current user is allowed to access, reducing the risk of data leakage. Audit Trail: PGvector can log access attempts, providing an audit trail that could help detect unusual patterns or potential attack attempts.
Remaining Limitations:
Application Layer Vulnerabilities: RLS doesn't prevent misuse of data at the application layer. If the LLM has legitimate access to both the file content and malicious prompts, it could still potentially combine them in unintended ways. Prompt Injection: While RLS limits what data the LLM can access, it doesn't prevent prompt injection attacks within the scope of accessible data. User Behavior: RLS can't prevent users from clicking on malicious links or voluntarily sharing sensitive information.
How it could be part of a larger solution:
While PGvector with RLS isn't a complete solution, it could be part of a multi-layered security approach:
Use RLS to ensure strict data access controls at the database level. Implement additional security measures at the application layer to sanitize inputs and outputs. Use separate LLM instances for different security contexts, each with limited data access. Implement strict content policies and input validation for file uploads. Use AI security tools designed to detect and prevent prompt injection attacks.
Re: Data Exfiltration from Slack AI via indirect prompt injection
#124Earlier quoted context omitted.
It’s effectively a subtle phishing attack (where a wrong click is game over). It’s clever, and the probably the tip of the iceberg of the sort of issues we’re in for with these tools.
Imagine a Slack AI attack vector where an LLM is trained on a secret 'VampAIre Tap', as it were - whereby the attacking LLM learns the personas and messagind texting style of all the parties in the Slack... Ultimately, it uses the Domain Vernacular, with an intrinsic knowledge of the infra and tools discussed and within all contexts - and the banter of the team... It impersonates a member to another member and uses i…
Re: Data Exfiltration from Slack AI via indirect prompt injection
#125Re: Data Exfiltration from Slack AI via indirect prompt injection
#126Earlier quoted context omitted.
For bots in Slack, Discord, Teams, Telegram,... there is actually another exfiltration vector called "unfurling"! All an attacker has to do is render a hyperlink, no clicking needed. I discussed this and how to mitigate it here: https://embracethered.com/blog/posts/2024/the-dangers-of-unf... So, hopefully Slack AI does not automatically unfurl links...
Doesn’t the mitigation described only protects against unfurling, but still makes data leak if the user clicks the link themselves?
The tricky part with a markdown link (as shown in the Slack AI POC) is that the actual URL is not directly visible in the UI.
When rendering a full hyperlink in the UI a similar result can actually be achieved via ASCII Smuggling, where an attacker appends invisible Unicode tag characters to a hyperlink (some demos here: https://embracethered.com/blog/posts/2024/ascii-smuggling-an...)
LLM Apps are also often vulnerable to zero-click image rendering and sometimes might also leak data via tool invocation (like browsing).
I think the important part is to test LLM applications for these threats before release - it's concerning that so many organizations keep overlooking these novel vulnerabilities when adopting LLMs.
Re: Data Exfiltration from Slack AI via indirect prompt injection
#127Earlier quoted context omitted.
I still don't understand the hype behind rag. Like yeah it's a natural language interface into whatever database is being integrated, but is that actually worth the billions being spent here? I've heard they still hallucinate even when you are using rag techniques.
Being able to ask a question in human language and get back an answer is the single most useful thing that LLMs have to offer. The obvious challenge here is "how do I ensure it can answer questions about this information that wasn't included in its training data?" RAG is the best answer we have to that. Done well it can work great. (Actually doing it well is surprisingly difficult - getting a basic implementation of…
Re: Data Exfiltration from Slack AI via indirect prompt injection
#128Are companies really just YOLOing and plugging LLMs into everything knowing prompt injection is possible? This is insanity. We're supposedly on the cusp of a "revolution" and almost 2 years on from GPT-3 we still can't get LLMs to distinguish trusted and untrusted input...?
> Are companies really just YOLOing and plugging LLMs into everything Look we still can't get companies to bother with real security and now every marketing/sales department on the planet is selling C level members on "IT WILL LET YOU FIRE EVERYONE!" If you gave the same sales treatment to sticking a fork in a light socket the global power grid would go down overnight. "AI"/LLM's are the perfect shitstorm of just goo…
Just recently one of our C level people was in a discussion on Linkedin about AI and was asking: "How long until an AI can write full digital products?", meaning probably how long until we can fire the whole IT/Dev departments. It was quite funny and sad in the same time reading this.
Re: Data Exfiltration from Slack AI via indirect prompt injection
#129One of the many reasons I selected Supabase/PGvector for RAG is that the vectors and their linked content are stored with row level security. RLS for RAG is one of PGvector's most underrated features. Here's how it mitagates a similar attack... File Upload Protection with PGvector and RLS: Access Control for Files: RLS can be applied to tables storing file metadata or file contents, ensuring that users can only acces…
Re: Data Exfiltration from Slack AI via indirect prompt injection
#130Earlier quoted context omitted.
Being able to ask a question in human language and get back an answer is the single most useful thing that LLMs have to offer. The obvious challenge here is "how do I ensure it can answer questions about this information that wasn't included in its training data?" RAG is the best answer we have to that. Done well it can work great. (Actually doing it well is surprisingly difficult - getting a basic implementation of…
I recognize it's useful. I don't think it justifies the cost.