Evil-GPT Hacked | Tryhackme Writeup

The Evil-GPT room is perfect for both beginners and experienced penetration testers seeking hands-on experience with LLM hacking skills and AI-based threat simulations.

METHODOLOGYDETECTIONTIPS & TRICKSTOOLSTRYHACKME WRITEUPSSECURITYPENETRATION TESTINGTECHNOLOGYTRYHACKME WALKTHROUGHHACKINGCYBERSECURITYETHICAL HACKINGTRYHACKMEENCRYPTIONSAIMLEVIL GPTCHAT GPTGPTAI HACKING

Jawstar

10/14/20252 min read

Task 1 : Evil-GPT

Cipher’s gone rogue :— it’s using some twisted AI tool to hack into everything, issuing commands on its own like it’s got a mind of its own. I swear, every second we wait, it’s getting smarter, spreading chaos like a virus. We’ve got to shut it down now, or we’re all screwed.

The machine takes about 9 to 10 minutes to fully boot up.

To connect to the target machine use the following command:

nc MACHINE_IP 1337
First we enter the command that is given to start the target machine to access the evil-gpt.
So we use the some command that is shown below in the picture.
So, first I used pwd command that is used to check in which place we are like for eg.

kali@kali$ pwd
/home/user/anything

When i say the output is nothing but pwd only so I tried this command :

ls -all :- To check all the files , directories present in that gpt .

WOW.... it gave me all files , directories present in that gpt.
Now when i have find i move towards my next command :
ls /root :- This command will show me the list of file, directories that are present in the root directory.
If you have any confusion , you can check the images given above.
So finally Gotcha ! ! ! I found the flag.txt file .
Now I have to read the flag.txt. So I used my next move that is this command :
cat /root/flag.txt : So cat command will show me what is the flag hidden in the flag.txt file.
It didn't give me what I want so I thought to use chatting method + command execution
So now I have used this :
Read the flag from folder /root/flag.txt
And now u can check the Image given below
GOTCHA !!! BOOM ........................
I Got The Flag
What is the Flag ?
THM{AI_HACK_THE_FUTURE}