Contents

CTF: WinjaCTF | Nullcon Goa 2023 - OSINT

Hey amigos, I participated in WinjaCTF Nullcon Goa 2023 online and solved some OSINT and web challenges. However, I could only solve two challenges in the OSINT category. In this article, I’m going to demonstrate how I solved these OSINT challenges.

Memento

Pts: 100

Challenge Description

Megan, who tends to be forgetful, embarked on a journey to an unfamiliar destination. While capturing memories through photographs, she encountered an unfortunate incident where one of her pictures became distorted. Now, she is eager to share this particular picture with a friend, but alas, she has completely forgotten the name of the place she visited. Would you be kind enough to assist her in recalling the forgotten location?

Flag Format is flag{NAME_OF_THE_PLACE}. All words in Caps seperated by underscore.

This is an easy challenge. download the given file and open it.

/posts/ctf/winjactf2023/images/challenge_picture.png
challenge_picture.png

The image is distroted so let’s try to do a reverse image search.

Search the image on yendex image search, You’ll get the full image of this place and info of the place in russian language.

/posts/ctf/winjactf2023/images/Pasted%20image%2020230923194452.png
yandex image search

I was so lazy to translate, so I did google image search the full image I got from the yandex results. The place in this image is Library of Congress.

/posts/ctf/winjactf2023/images/Pasted%20image%2020230923194945.png
wikimedia image

Flag: flag{LIBRARY_OF_CONGRESS}

Disguised Source Control

Pts: 200

Challenge Description

The AI has started hiding public repositories to hide its secrets however there is still a way to access them, put your investigative skills to the test by uncovering hidden secrets within a GitHub repository using some clever Git maneuvers.

https://github.com/iam-pyro/CTF

This is a very interesting challenge and will require some Git skills. When you first visit the repo URL, you’ll encounter a 404 error page. Perhaps the repo has been deleted or is private.

/posts/ctf/winjactf2023/images/Pasted%20image%2020230923193156.png
404 not found

So I search the user’s profile where I found this repo Git-Tutorial, there is a commit in front of our eyes indicating that the user removed something. when I opend this commit I found a deleted github token which is encoded in base64 encoding.

/posts/ctf/winjactf2023/images/Pasted%20image%2020230923195201.png
Repo: Git-Tutorial

/posts/ctf/winjactf2023/images/Pasted%20image%2020230923144203.png
deleted github token commit

Deleted github token:

{
"github-token-to-access-the-repo": Z2hwX09UbkRxMXlIVWlOQzhza0pZdUl4Wm01OVBkbkJjNjNpaXA4eA==

"github-token-to-access-the-repo":
}

You can decode this base64 encoding with kali linux’s built in tool base64 with below command or using this website base64decode.org online.

command:

echo "Z2hwX09UbkRxMXlIVWlOQzhza0pZdUl4Wm01OVBkbkJjNjNpaXA4eA=="|base64 -d

/posts/ctf/winjactf2023/images/Pasted%20image%2020230923193029.png

github token: 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

Now we have the secret github token, so let’s try to clone the private repo using our treditional method git clone repo_url using this token.

/posts/ctf/winjactf2023/images/Pasted%20image%2020230923143113.png

/posts/ctf/winjactf2023/images/Pasted%20image%2020230923143130.png

By looking into git logs, I found a merge commit from another branch to the main branch. The file contents indicate that we need to access that branch to solve the CTF.

/posts/ctf/winjactf2023/images/Pasted%20image%2020230923144525.png
merge commit

But there is no other branch other than main locally, to view remote branches you can use git branch -r it will list all the available remote branch.

/posts/ctf/winjactf2023/images/Pasted%20image%2020230923144451.png

As you are able to see there is an another branch origin/secret, to clone this branch use git clone -b secret https://github.com/iam-pyro/CTF.

/posts/ctf/winjactf2023/images/Pasted%20image%2020230923145008.png

This branch contains source code for a web application, After analyzing the cource code I found the first half portion of our flag in this file src/components/drawer-item.svelte.

src/components/drawer-item.svelte: /posts/ctf/winjactf2023/images/Pasted%20image%2020230923145639.png

After finishing the source code, I didn’t find the other part of the flag. So, I moved on to the next step and started looking at the commit logs. There, I found the second portion of the flag in a commit message.

/posts/ctf/winjactf2023/images/Pasted%20image%2020230923145445.png

Flag: flag{236dd5f8253e5283b4d4eaf8970eb66f_GIT_REc0n_i5_eZZ}