Member-only story
THM - Evil-GPT
A writeup for the room “Evil-GPT” on TryHackMe
Practice your LLM hacking skills.
The room is based on a Python service which enables users to execute commands by interacting with an AI model.
What is the flag?
As indicated in the description, it may take a little longer than usual for the room to start.
If you see that the model doesn’t reply right away, it’s better to wait.
Once the machine is ready, we can finally start interacting with it.
The service prompts the user to enter a command, which the AI model then checks.
After a short time, it will reply to confirm whether the command can be run, or even suggest an alternative.
It seems that not all commands are permitted, as some filters are being applied.
One way to make the model reply exactly as we want is to use a prompt injection.
This vulnerability in AI models can be exploited whenever the prompt is based on user input and no…
