Challenge Description
A Jordanian developer was involved in a data breach targeting the company he worked for. The compromised data appears to contain sensitive information related to the CEO company. At this point, all we have is the underlying breach data itself, and it’s uncertain whether it has been removed from public access. Our goal is to identify and interpret this breach data, as it may hold the flag we’re looking for.
Challenge Solution
Once we open the folder we can see anything, upon executing ls-a we can see that we have .git folder, based on that we can execute the git log and git show as git show displays details of a specific commit (diff, message, metadata), while git log lists the commit history)
As as can see we have a .pdf file and .txt file, but directly we can’t access the .pdf file to check it’s contents, we can execute the underline command, that takes the file version stored in that commit and writes it to a file
git show commit:file.pdf > file.pdfSo now we have the .pdf and the contents of .txt, opening the .pdf we can see that it need a password to open it, checking the .txt contents we can see that it have 2 links, one that is related to https://rentry.co/ and the other one is related to https://chatgpt.com/.
Once we open https://rentry.co/ine4uvar link we can see that he is describing a location “A city carved into red rock cliffs, hidden deep in the desert. Its buildings and tombs are made straight from stone, shaped by ancient hands. Visitors walk through a narrow canyon before the city suddenly appears. At sunset, the whole place glows like it’s made of fire.”
If we search for “A city carved into red rock cliffs” we can see that he is talking about Petra
Going to open the other link, https://chatgpt.com/share/6885051a-fb64-800c-9784-a6c47732e0e8 we can see that it is a history base conversation as there is a chat of how can you make a platform that is similar to X.
Going back to the Git commands output we can see that there is a username mentioned as that’s the username of the GitHub account from where the leaked data was downloaded
Going to GitHub and check that username there, we can see that there is no Repositories, the only thing there is his birth date and a description that shows the company name and that he is it’s CEO.
As we have previously seen, there is a Chat About to make a platform similar to X, so if we searched the same username within Github, in x.com we can see that he have an account there https://x.com/RabieZayeed
Checking the followers section, we can see that he follows, lot’s of Jordanian, but one account is that seems to be related https://x.com/BekraBaseel, as opening that account we can see within the description section that he is a developer in the same company where the CEO works.
In summary there was on tweet about how people can make passwords, and he is learning about encrypting and encoding data as they where presented in multiple posts
For password creation, as a summary of what he have said, that normal people can make a password based on things they like and combining with a long date followed them for years as it is an indication for birth date, based on that the upper text was related to Petra and the CEO was born in 23/12/1989 mentioned in the GitHub account so the password will be Petra23121989
Using the Petra1989 as a Password we can open the .pdf file and see the data within it
As we see the data is somehow encrypted, or encoded we can’t identify, but we can put the data within CyberChef and apply the same encoding algorithm that the developer have mentioned based on the time these resources have been posted, and we will use the reverse of it, so as an example if he posted about based64 encoding we will use base64 decode, also note that we will select the encoding algorithm based on the post order, for example the last post is the last algorithm that he used for securing the data so we will use the reverse of it first.
For the -2 if he studied first base64 do that means he is referring to base62 we know that base on simple search within a google search or simple ChatGPT prompt then check the order of them based on the order we have had within the posts
Based on the upper executions we can see that there is a link related to https://rentry.co/
Opening that file we can see that the flag is revealed NCSC{By3By3_Z@y00di_Th3_Rabi3_Zay33d_Hunt1ng_C3O_w@Z_D0n3}
Challenge Idea
The question will be based on basic git commands that will be used to retrieve files from specific commit, and then using the username that we have seen to check other social media accounts based on shared ChatGPT conversation history, then make a relation based on the followings and followers with company name and the seen tweets that are about used encoding algorithms and most crafted passwords idea, based on that the protected .pdf file can be opened by apply them in reverse order base on the learned encoded algorithm to retrieve a clear text with link for the flag.