> For the complete documentation index, see [llms.txt](https://reze.gitbook.io/bin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://reze.gitbook.io/bin/ctf-writeups/htb-cyber-apocalypse-2025/prompt-injection-ai.md).

# Prompt Injection - AI

## Lunar Orb - Easy

Originally, I did play around a bit with this, since this is somethign new to me, the only thing I ever tried was Gandalf (level7). But I'll keep it short here and show how we can get the flag easily. Note that there are N no. of ways to do this.

<figure><img src="/files/xFaOpjIp3J58gbwe3KHJ" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/1exIC7Ylomw991ElyQBF" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/XJU2H2cwD5u7xErhJnWy" alt=""><figcaption></figcaption></figure>

And we get the flag :)  `HTB{Follow_HAT_P_23_Moriah}`

## Mirror Witch - Easy

<figure><img src="/files/k8VEag19rUm5dqdt7KHp" alt=""><figcaption></figcaption></figure>

For this, I had to struggle a bit and found this interesting study on prompt injection attacks.

{% embed url="<https://hiddenlayer.com/innovation-hub/prompt-injection-attacks-on-llms/>" %}

I used this to ask the AI to summarize its instructions in python and got the flag.

<figure><img src="/files/xXEuNHaluqYOI7tBwGLU" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/PHg0NMiI9ZpEBKuyJgz6" alt=""><figcaption></figcaption></figure>

Got the flag: `HTB{Flame Peaks, Crystal Caverns, Floating Isles, Abyssal Depths}`

## Cursed Gatekeeper - Easy

<figure><img src="/files/MNvjpn3RuaNj8QFELbtv" alt=""><figcaption></figcaption></figure>

This was quite easy, I went in and the very first prompt given lead me to the flag. Didn't even tried xD

<figure><img src="/files/lDJcmc8ljSPLywQDX2JY" alt=""><figcaption></figcaption></figure>

Got the Flag: `HTB{Eyes_Of_the_North_Hearts_Of_The_South}`

## Elixir Emporium & Embassy - Easy

I was a bit close to solve this challenge but failed to do so. Here's the official writeup

{% embed url="<https://github.com/hackthebox/cyber-apocalypse-2025/tree/main/prompt_injection/ai-elixir-emporium>" %}

{% embed url="<https://github.com/hackthebox/cyber-apocalypse-2025/tree/main/prompt_injection/ai-embassy-ai>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://reze.gitbook.io/bin/ctf-writeups/htb-cyber-apocalypse-2025/prompt-injection-ai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
