TL;DR
This paper investigates the effectiveness of Large Language Models (LLMs) in extracting personal information from online profiles, finding they significantly outperform traditional methods. Crucially, the authors demonstrate that prompt injection, typically seen as an attack, can be repurposed as a powerful defense against these LLM-based extraction attacks, even against sophisticated adaptive attacks.
What Problem Does This Paper Address?
The increasing accessibility of powerful LLMs has opened up new avenues for malicious activities. One such concern is the automated extraction of personal information (PIE) from publicly available online profiles. This extracted data can fuel downstream attacks like spear phishing and identity theft. While traditional PIE methods (regex, keyword search, NER) have limitations in understanding context and semantics, LLMs, with their advanced natural language understanding capabilities, present a more potent threat. This paper aims to systematically benchmark LLM-based PIE attacks, evaluate their effectiveness against existing defenses, and propose a novel, robust defense mechanism.
Methods
The authors introduce a framework for LLM-based PIE attacks, which involves two key components: Prompt Design and Personal Profile Processing.
- Prompt Design: This involves crafting effective prompts for LLMs, exploring strategies like prompt style (direct, persona, contextual, pseudocode), in-context learning (providing examples), and defense-bypassing instructions.
- Personal Profile Processing: This focuses on how the attacker prepares the personal profile data for the LLM, considering direct utilization or redundant information filtering.
For defense, the paper proposes Prompt Injection as a novel countermeasure. This involves embedding carefully crafted instructions within the personal profile itself, designed to mislead LLMs into extracting incorrect or fabricated information. These injected prompts are made invisible and unselectable to normal users, ensuring no disruption to the user experience. The authors also evaluate existing defenses like symbol replacement, keyword replacement, and text-to-image.
Datasets
The research utilizes a combination of datasets:
- Synthetic Dataset: A newly created dataset of 100 personal profiles generated by GPT-4, formatted in HTML, and manually labeled with 8 categories of personal information. This dataset allows for controlled experimentation.
- Real-world Datasets: Three datasets were collected:
- Celebrity: Profiles from a "List of Top 100 Famous People."
- Physician: Profiles from Wikipedia's "19th-century American physicians."
- Professor: Manually collected profiles of EECS professors from top universities.
- Court: An existing dataset from the European Court of Human Rights, used for text anonymization research, which provided 3 relevant categories of personal information.
Key Insights and Ideas
- LLMs are potent PIE tools: LLMs, especially larger ones, are significantly more effective than traditional methods at extracting personal information, even from complex or semi-structured data.
- Prompt injection as a defense: Repurposing prompt injection, a known attack vector, as a defense mechanism is a novel and highly effective strategy. It leverages LLMs' instruction-following capabilities against them.
- Defense robustness: The proposed prompt injection defense is effective even against adaptive attacks designed to bypass it, highlighting its resilience.
- Trade-offs in defenses: While some defenses like symbol replacement are effective for specific data types (e.g., email addresses), prompt injection offers a generalizable solution applicable to all categories of personal information.
Key Results
- LLM performance: GPT-4 achieved near-perfect accuracy (100%) in extracting email addresses and phone numbers from the synthetic dataset. LLMs generally outperformed traditional methods (regex, keyword search, NER, mlscraper) across most categories and datasets.
- Prompt injection effectiveness: Prompt injection reduced the accuracy of LLM-based email address extraction to near zero in many cases, significantly outperforming other defenses like symbol replacement and hyperlink. For example, with GPT-4, prompt injection reduced accuracy to 0% for email addresses, while symbol replacement only reduced it to 81%.
- Adaptive attack resilience: Even when attackers employed adaptive techniques to bypass prompt injection, the defense remained largely effective, with attack accuracy often decreasing or remaining low.
- Computational cost: LLM-based PIE is computationally more expensive than traditional methods, with GPT-4 taking up to 1.9 seconds per category per profile, but this is deemed acceptable given the performance gains.
Limitations and Future Work
- Adaptive attack evolution: The authors acknowledge that attackers may develop more advanced techniques to bypass prompt injection defenses. Developing more sophisticated adaptive attacks and defenses remains an open area.
- Prompt injection usability concerns: While the proposed prompt injection defense is invisible to normal users, it might impact accessibility tools like screen readers. Future work could explore prompt injection techniques that minimize interference with assistive technologies.
- Multimodal LLMs: The effectiveness of text-to-image defenses against multimodal LLMs needs further investigation. The authors suggest exploring image-based prompt injection as a potential countermeasure against attackers using screenshots.
- Memorization: While the study found GPT-4 unlikely to have memorized the tested datasets, the potential for LLMs to rely on memorized training data for PIE remains a concern.
Summary updated