Skip to content

Commit 2349ee3

Browse files
committed
trojan ctf files
1 parent 33e3b89 commit 2349ee3

File tree

16 files changed

+389
-0
lines changed

16 files changed

+389
-0
lines changed

content/ctfwriteups/knockknock.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
+++
2+
title = "knock knock - Writeup"
3+
draft = false
4+
ShowToc = false
5+
author = ["connar"]
6+
+++
7+
8+
This challenge provides us with a `pcap` file, a file that contains captured network traffic.
9+
10+
Opening this file in a program that can analyze network traffic, such as `Wireshark`, we can see the following traffic:
11+
12+
![alt text](/posts/writeups/trojan2025/knock-knock/image1.png)
13+
14+
15+
If we try to follow one of the TCP streams of whatever packet, we will end up in an empty packet (no content inside). Looking further for whatever useful information, we are led to a dead end.
16+
17+
The description of the challenge refers to hidden information inside the traffic, and we also notice that the challenge is called `knock-knock`. Could the hidden info be in the port numbers (and thus the title `knock-knock` refering to the port) ?
18+
19+
Looking at the port numbers, we see all are in the range of printable ascii characters (while normally port numbers can go up to 65535).
20+
21+
Just out of curiosity, we make the following python program that uses the `scapy` library to parce the port numbers of each packet. You could also just select and extract the port numbers to a list, and just use simple python:
22+
```py
23+
from scapy.all import *
24+
25+
packets = rdpcap("knock-knock.pcap")
26+
27+
for p in packets:
28+
if p.haslayer(TCP):
29+
dst_port = p[TCP].dport
30+
31+
# Converted to chr to get the ascii
32+
print(chr(dst_port), end='')
33+
```
34+
35+
Running the following program, we get:
36+
```sh
37+
└─$ python solver.py
38+
https://pastebin.com/raw/LCLSmQ8F
39+
```
40+
We get back a pastebin url. Simply put, pastebins are public or private posts that contain data. They can be used by attackets and malicious actors to store payloads, leaked data and more.
41+
42+
Visiting the pastebin, we get a base64 string:
43+
44+
![alt text](/posts/writeups/trojan2025/knock-knock/image2.png)
45+
46+
Decoding from base64, we get the flag for this one:
47+
48+
```sh
49+
└─$ echo "VHJvamFue2gxZDFuZ18xbmYwXzFuX3AwMjdfbnVtYjMyNX0=" | base64 -d
50+
Trojan{h1d1ng_1nf0_1n_p027_numb325}
51+
```
52+
53+
54+

content/ctfwriteups/persistentpopups.md

Lines changed: 94 additions & 0 deletions
Large diffs are not rendered by default.

content/ctfwriteups/schoolproject.md

Lines changed: 204 additions & 0 deletions
Large diffs are not rendered by default.

content/mychallenges.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,43 @@ These will mostly be based on stuff I read along the way and felt like they woul
205205
<strong>Tales for the Brave<br>Difficulty: Hard</strong> (<a href="#">Not available</a>/<a href="https://github.com/hackthebox/cyber-apocalypse-2025/blob/main/forensics/Tales%20for%20the%20Brave/README.md">Writeup</a>) <br> Description: <small>In Eldoria, a once-innocent website called “Tales for the Brave” has become the focus of unsettling rumors. Some claim it may secretly trap unsuspecting visitors, leading them into a complex phishing scheme. Investigators report signs of encrypted communications and stealthy data collection beneath its friendly exterior. You must uncover the truth, and protect Eldoria from a growing threat.</small>
206206
</td>
207207
</tr>
208+
<tr>
209+
<td>
210+
<figure class="align-center ">
211+
<img loading="lazy" src="/posts/myctfs/whitehats2025.png" />
212+
</figure>
213+
</td>
214+
<td>
215+
<strong>knock-knock<br>Difficulty: Easy</strong> (<a href="https://github.com/connar/myctfs/blob/main/trojan2025/knock-knock.pcap">Play</a>/<a href="https://connar.github.io/ctfwriteups/knockknock/">Writeup</a>) <br> Description: <small>Following suspicious activity from one of our company's computers, we recorded its network traffic. Analyzing the resulting file, we noticed that it is communicating with a specific address, but the packets it sends are empty. Our suspicion is that it is trying to secretly send data to this address. Can you confirm this?</small>
216+
</td>
217+
</tr>
218+
<tr>
219+
<td>
220+
<figure class="align-center ">
221+
<img loading="lazy" src="/posts/myctfs/whitehats2025.png" />
222+
</figure>
223+
</td>
224+
<td>
225+
<strong>school-project<br>Difficulty: Medium</strong> (<a href="https://github.com/connar/myctfs/blob/main/trojan2025/bubblesort.zip">Play</a>/<a href="https://connar.github.io/ctfwriteups/schoolproject/">Writeup</a>) <br> Description:
226+
<small>
227+
<details>
228+
<summary>
229+
It was a cloudy Sunday morning, and I was enjoying the soothing sounds of nature with a cold breeze hitting my window. After making some coffee, I sat at my PC and opened Stack Overflow, as I usually do. The first post I saw was about a code issue related
230+
</summary> to Bubble Sort. The code appeared flawless, but the user insisted that the problem was with VSCode, claiming the error was due to an unsupported version. The user seemed frustrated and offered a large bounty, so I decided to help. We continued the conversation in private messages. He mentioned a school project deadline for the next day and needed an urgent solution. He sent me the entire VSCode project, and I opened the .sln file to see if I could replicate the error. However, everything worked fine on my end, and I told him so. He didn't respond, and shortly after, the post was deleted. I felt scammed but moved on with my day. A week later, I noticed unusual activity on my machine. I have a suspicion it’s connected to that Bubble Sort project. Can you help?
231+
</details>
232+
</small>
233+
</td>
234+
</tr>
235+
<tr>
236+
<td>
237+
<figure class="align-center ">
238+
<img loading="lazy" src="/posts/myctfs/whitehats2025.png" />
239+
</figure>
240+
</td>
241+
<td>
242+
<strong>persistent-popups<br>Difficulty: Hard</strong> (<a href="#">Not available</a>/<a href="https://connar.github.io/ctfwriteups/persistentpopups/">Writeup</a>) <br> Description: <small>Mikey noticed out of the sudden that, whenever he reboots his PC, two CMD windows popup and close instantly. He informed me that this issue seems kind of persistent. I got an image from his machine to try and solve the mistery behind the CMD windows. Wanna help?</small>
243+
</td>
244+
</tr>
208245
</tbody>
209246
</table>
210247

59.5 KB
Loading
234 KB
Loading
16.9 KB
Loading
112 KB
Loading
31.7 KB
Loading
25.9 KB
Loading

0 commit comments

Comments
 (0)