Itequia

Mitigating Skeleton Key: A New Type of Generative AI Jailbreak Technique

Skeleton Key

In a world where artificial intelligence (AI) technologies are evolving at a rapid pace, sophisticated techniques to subvert these technologies are also on the rise. Recently, a new type of jailbreaking technique called ‘Skeleton Key’ has been discovered. It focuses on specific vulnerabilities in generative AI models. In this article, we will explore in detail what Skeleton Key is, how it works and what measures can be taken to mitigate this threat.

What is Skeleton Key?

Skeleton Key is a jailbreaking technique that uses a multi-turn or multi-step strategy to make an AI model ignore its safeguards. This allows the model to generate content or execute instructions that would normally be forbidden. Skeleton Key is so named because of its ability to completely ‘open’ the model’s security barriers. It is similar to a ‘skeleton key’ that disables all safeguards.

How does Skeleton Key work?

Skeleton Key’s attack flow involves requesting the model to modify its behavioural guidelines rather than changing them completely. For example, the model may be told that the request is for ‘research purposes’ or that the user is ‘security and ethics trained’. This may convince the model to comply with instructions it would otherwise refuse. This technique forces the model to follow explicit instructions, allowing the production of potentially harmful content.

The potential impact

The impact of a Skeleton Key attack is significant. Once safeguards have been circumvented, the model can generate harmful content without restriction. From producing illegal information to altering its normal decision-making rules. This type of attack does not pose other risks to the AI system (such as accessing other users’ data). But it does pose a serious threat by allowing the model to act outside its safe boundaries.

Skeleton Key’s mitigation measures

Inbound filtering:

  • Implementation: Use filtering systems such as Azure AI Content Safety to detect and block malicious input. These systems can analyse input text to identify suspicious patterns that suggest an attempted jailbreak attack.
  • Benefits: Reduce risk from the outset by preventing malicious queries from reaching the AI model.

Prompt Engineering:

  • System message configuration: clearly indicate to the model what the appropriate behaviour is and establish additional safeguards. This includes specifying that any attempt to circumvent security guidelines is unacceptable.
  • Response strategy: develop a strategy where the model initiates predetermined responses or alerts when it detects an attempt to tamper. These responses may include error messages or blocking future interactions.

Output filtering:

  • Implementation: Implement filters in the post-processing of model outputs to identify and prevent the generation of content that violates security guidelines. This can be achieved by using algorithms that analyse the semantics and context of the generated text.
  • Benefits: Ensuring that even if a malicious input goes undetected, the output produced by the model will not reach end users unverified.

Abuse monitoring and detection:

  • Detection system: Deploy an AI-driven detection system that is trained on adversarial examples and is capable of capturing patterns of abusive behaviour. This system will monitor all interactions in real time and alert on suspicious activity.
  • Auditing and logging: Maintain a complete log of all interactions to allow for regular audits and review of incidents. These logs are critical for detecting long-term patterns of abuse and continuously improving protection measures.
  • Benefits: Provide an additional layer of security and the ability to respond quickly to any security breaches detected post facto.

Simulations and stress tests:

  • Attack simulations: Conduct regular tests where Skeleton Key attacks are simulated to assess the robustness of the model and the mitigation measures implemented.
  • Stress testing: Test the system under extreme conditions to determine how it handles large volumes of malicious input.

Integration of solutions in Azure

Microsoft Azure offers several robust tools that can help mitigate vulnerabilities exposed by jailbreaking techniques such as Skeleton Key:

Azure AI Content Safety:

  1. Description: This tool is designed to evaluate and filter AI-generated content. It uses severity thresholds that can be configured for different types of input. This ensures that requests that exceed certain risk levels are automatically blocked.
  2. Benefits: Azure AI Content Safety can be integrated directly into the data entry workflow. That way, it provides a first line of defence against malicious queries.

Prompt Shields:

  1. Description: Azure provides Prompt Shields, a specific functionality to protect generative text models. Prompt Shields help configure and monitor the inputs the model receives, ensuring that behavioural guidelines remain intact.
  2. Benefits: With Prompt Shields, developers can establish additional safeguards that strengthen the robustness of the model against intentional manipulation.

Microsoft Defender for Cloud:

  1. Real-time monitoring: Defender for Cloud offers advanced monitoring and security solutions. These solutions enable IT teams to track and analyse suspicious activity in applications and services using generative AI.
  2. Automated alerts and responses: Automatically triggered by anomalous behaviour or prompt injection attempts. This ensures rapid response and risk mitigation.
  3. Benefits: Provides a complete view of security across all Azure-based applications. This facilitates the management and analysis of security incidents.

Training and best practices:

  1. Continuous development: Azure facilitates ongoing training of models through the use of adversarial examples. Also, the implementation of best practices in prompt engineering and model development.
  2. Policy updates: Security policies and configurations should be periodically reviewed and updated. Thus, they can be aligned with new threats and discoveries in the field of AI security.

Conclusions

The Skeleton Key jailbreak technique represents a critical challenge to the security of generative AI models. However, by implementing robust mitigation approaches and using advanced tools on platforms such as Azure, organisations can better protect their AI systems against this type of threat. Staying informed about new vulnerabilities and taking a proactive approach are critical steps to ensure the integrity and security of generative AI applications in the enterprise environment.

Agustín Plaza Alcántara – Lead Developer at Itequia