Try Hack me — Advent Of Cyber 2023 Day 8 Write Up — She sells C# shells by the C2shore
2023-12-11 11:58:39 Author: infosecwriteups.com(查看原文) 阅读量:10 收藏

Leendert Coenen

InfoSec Write-ups

Room: Advent of Cyber 2023 Day 9

C&C or C2, reffers to command and control servers. This is a server that acts like a proxy between a hacker and it’s victim.

Anonymity, command execution, data exfiltration and botnet coordination are just a few examples where a C2 server can play a crucual roll.

Using it for mind control however is something entirely new to me, but fun nonetheless.

The User-Agent request header is a characteristic string that lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.

We can find the User-Agent in the “GetIt” Function.

Answer Task 1

Again reffering to Mozilla documentation, where you can find all possible HTTP requests. Get and Post are used most often.

The “CreateEncryptor” method uses the variable “bytes” as the encryption key. The answer to Task 3 is the string that gets encoded when creating the variable “bytes”.

Answer Task 3
Answer Task 4

In the main function we can find the first HTTP URL. Which gets concatenated with “/reg”

I made a typo, but TryHackMe still decided the answer was ok. 🤓

Wrong answer turns

The .Sleeper function takes “count” as an argument. Which is set a few lines above.

As the hint suggests, the answer has to be in seconds. Not milliseconds

Answer Task 5
Answer Task 6 v1

If the command is shell, we drop into the part of the code that does the ExecuteCommand function.

Answer Task 6 v2

The ExecuteCommand function is what the attacker uses to execute commands on the device of the victim.

Note that the ProcessWindowStyle is “Hidden”, so the victim will not notice that commands are being executed.

Answer Task 7

We can find the answer to Task 7 in the Implant method in the main function.

Happy Hacking!


文章来源: https://infosecwriteups.com/try-hack-me-advent-of-cyber-2023-day-8-write-up-she-sells-c-shells-by-the-c2shore-080ba26f4011?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh