]> git.somenet.org - pub/jan/ctf-seminar.git/blob - writeups/matthias/ctfzone19.md
Add ctfzone19
[pub/jan/ctf-seminar.git] / writeups / matthias / ctfzone19.md
1 ## The CTF in retrospective
2 ---
3 I don't know exactly why but I didn't really warm up to the challenges in this CTF. It was the first time I saw challenges like OSINT/Forensics and decided to take a look at them. I spend about 15 hours for this CTF. 
4
5 ##misc/osint: Memology (solved)
6 ---
7 The challenge description was:
8 ```text
9 This is perhaps the moment you have been waiting for all your life - finally, you can put your meme expertise to good use. But first of all you have to find me — I have TheBestAccountOnTheInternet.
10 ```
11 I started, obviously, by searching that "TheBestAccountOnTheInternet". After a while, `https://namecheckup.com` pointed me to an Intsagram account with that name and the term `Memology` in its account description.
12 The account had uploaded 9 memes, each something about related to  computersience, and with an image  description of the form `#AnswerX is the ...` with `X` being a number between 1 and 9 and `...`being something related to the meme like `middle name of the person in the meme`. 
13
14 Five of those answers could be found in a comment, that either the account "TheBestAccountOnTheInternet" or a friend of the person behind this account had posted under an image of the Instagram profile of the real person behind the meme (once it was a fanpage of the person behind the meme).
15 As in the first image posted was linked another meme account, I assume this account as the friend. It turned out to be right.
16 So after a lot of googling and scrolling trough comments I found the five answers.
17
18 One Answer was located on the Wikipedia page of the meme character. I found it in the edit history.
19
20 One meme was from a anime series and the answer was the number of episodes of that series.
21
22 The meme with the description that says, that the answer is the middle name of the person in the meme was Robin Williams in Mrs. Doubtfire (a friend told me)
23
24 Until now, every picture used in the memes was quiete popular and therefore it was fairly easy to find information about it. But the last one wasn't. I had to find the YouTube channel of the person on the meme.
25 After a lot of searching (I found the same meme again on twitter, also the same image used in a different meme), I came across the Yandex search engine, which does also a reverse image search. The search found an article, which contains the original image used in the meme. The article has also linked the YouTube video from which the image was taken.
26
27 So I had all 9 answers. The Instagram Story of TheBestAccountOnTheInternet contained the information hot to generate the flag out of the answers: all answers in lowercase, "ctfzone{answer1, answer2, ..., answer9}".
28 Which is the following: ctfzone{hayes_48_funh0liday_r3ady_awesome777_smi1e_best3000_be1la_mclaurin}
29
30 ##osint/forensics: Honey is sweet but bees sting (not solved)
31 ---
32 ```text
33 Your tool is really awesome, and plugins you recommended to me were very helpfull, I appreciate your help. Can you please check this network dump?  Help me to catch him!
34 ```
35 In addition to this challengedescription there was a `.zip` file which contained the `.cap` file.
36
37 I started with opening the network dump in Wireshark and analyze the traffic.
38
39 The connection was initiated by `185.100.87.206`. After a while I found out that the IP belongs to a tor exit node.
40
41 Wireshark detected some MySQL traffic in the dump. But the traffic looked too strange to be only mysql. So i decided to go step by step trough the communication and try to get a high level overview what happened:
42 ```text
43 C= Client 185.100.87.206, S = Server 213.159.215.210
44 [C] opens tcp connection to server port 3306
45 [S] responds with mysql server greeting
46 [C] mysql login request user root
47 [S] responds ok
48 [C] query: select @@version_comment limit 1
49 [S] responds with some lind of payload that contains "/etc/passwd"
50 [C] sends the content of /etc/passwd
51 [S] responds ok
52 [C] query: show databases 
53 [S] responds with some lind of payload that contains "/etc/passwd"
54 [C] sends the content of /etc/passwd
55 [S] responds ok
56 [C] quit [tcp stream ends]
57 ```
58 The same happens again shortly after but this time the payload sent back from the server to the client contains `/var/log/wtmp`
59
60 So it seems, that the server is some kind of honeypot (it would match the challenge name) and I think we can call the client an attacker.
61 `/etc/passwd` ist a textfile. So the content of that file is readable in the dump. 
62 `/var/log/wtmp` is a binary file which contains a log of logins and logouts on the system. So the content isn't that easily readable. It contains the strings `pts/0` `ts/0user1`, `ts/0root` and `35.242.238.204`. From the `/etc/passwd` we know that `user1` and `root` are users on the attackers' system. The IP could mean that he logged in from there.
63
64 Googling the IP showed, that the IP belongs to Google and that its already known for "Abused VPN Service".
65
66 Mattermost user "pH" found a PasteBin document, which contained the ip and a link to `https://cleantalk.org/blacklists/35.242.238.204`. In the comments section of the cleantalk page someone called "secadmin" published the URL `dbnotes.site`
67 The website `http://dbnotes.site` seems to be part of the challenge. It contains a story about a person who has set up a honeypot and captured exactly the traffic we were provided. Additionally, the person says that she has contacted the owner of the abused VPN and got a screenshot of the logs. That screenshot additionally censored is there on the site. It contains a username `tumandakumar` - apparently the "him" we should catch.
68
69 We found a Bitbucket account with this username. It's a member of a team called `tumandk` together with another user named `Vadik P`
70
71 `tumandk` is also a `vk.com` account for a Person with name `Daniil Krizki`
72
73 The Bitbucket team `tumandk` has a Project called "PSN_sales_checker". So we tried to find PSN Accounts names `tumandk` or `tumandakumar` but without luck. At this point we got stuck.