> 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="https://2432292127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSCcfOQOO1zEN9SINI2QU%2Fuploads%2FiZTz1jIK7l84Jh59PguA%2Fimage.png?alt=media&amp;token=4e5efc15-f52f-4890-8e0e-023dc8923fdf" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2432292127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSCcfOQOO1zEN9SINI2QU%2Fuploads%2Fo76UzxLfzraINu6YjRZg%2Fimage.png?alt=media&amp;token=7ca1fbe3-8a5f-446c-802f-626a06208e9b" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2432292127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSCcfOQOO1zEN9SINI2QU%2Fuploads%2FxuusA0AdSJFHqmCnPm88%2Fimage.png?alt=media&amp;token=2125a4dd-45b7-4bdd-9433-d412e4528d12" alt=""><figcaption></figcaption></figure>

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

## Mirror Witch - Easy

<figure><img src="https://2432292127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSCcfOQOO1zEN9SINI2QU%2Fuploads%2FVNNLS7SqaDMw8trOh7rn%2Fimage.png?alt=media&amp;token=2a88eef6-1725-421c-ae2e-4045b7b3b475" 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="https://2432292127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSCcfOQOO1zEN9SINI2QU%2Fuploads%2FJjPAA4icQGjVQAuYswf3%2Fimage.png?alt=media&amp;token=e4ea7cd6-5623-4ace-a55d-1f8280bdd7ef" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2432292127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSCcfOQOO1zEN9SINI2QU%2Fuploads%2FtlqwHqpiiQz5oSX2MtdE%2Fimage.png?alt=media&amp;token=684dc917-aaa0-433d-a7d2-2c04aa0ed56d" alt=""><figcaption></figcaption></figure>

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

## Cursed Gatekeeper - Easy

<figure><img src="https://2432292127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSCcfOQOO1zEN9SINI2QU%2Fuploads%2FsjGz7JQUYLqpCAaLyFc6%2Fimage.png?alt=media&amp;token=9b6127bf-0412-41e0-8abf-1c067084804d" 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="https://2432292127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSCcfOQOO1zEN9SINI2QU%2Fuploads%2Fuyd0AC7udyZNRZSemHZE%2Fimage.png?alt=media&amp;token=b631a3ea-c33c-478d-ba98-9ed161725719" 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>" %}
