YARA | TryHackMe — Walkthrough (2024)

YARA | TryHackMe — Walkthrough (1)

jcm3

·

Follow

11 min read

·

Feb 16, 2024

--

Hey all, this is the tenth installment in my walkthrough series on TryHackMe’s SOC Level 1 path and the fourth room in this module on OpenCTI, where we will learn about identifying and using available security knowledge to mitigate and manage potential adversary actions.

This room will provide an understanding of the OpenCTI Project.

Link: https://tryhackme.com/room/opencti

Leggo

Task 1: Room Overview

This room will cover the concepts and usage of OpenCTI, an open-source threat intelligence platform. The room will help you understand and answer the following questions:

  • What is OpenCTI and how is it used?
  • How would I navigate through the platform?
  • What functionalities will be important during a security threat analysis?

Prior to going through this room, we recommend checking out these rooms as prerequisites:

YARA | TryHackMe — Walkthrough (3)

Task 2: Introduction to OpenCTI

Cyber Threat Intelligence is typically a managerial mystery to handle, with organisations battling with how to input, digest, analyse and present threat data in a way that will make sense. From the rooms that have been linked on the overview, it is clear that there are numerous platforms that have been developed to tackle the juggernaut that is Threat Intelligence.

OpenCTI is another open-sourced platform designed to provide organisations with the means to manage CTI through the storage, analysis, visualisation and presentation of threat campaigns, malware and IOCs.

Developed by the collaboration of the French National cybersecurity agency (ANSSI), the platform’s main objective is to create a comprehensive tool that allows users to capitalise on technical and non-technical information while developing relationships between each piece of information and its primary source. The platform can use the MITRE ATT&CK framework to structure the data. Additionally, it can be integrated with other threat intel tools such as MISP and TheHive. Rooms to these tools have been linked in the overview.

YARA | TryHackMe — Walkthrough (4)

Task 3: OpenCTI Data Model

OpenCTI Data Model

OpenCTI uses a variety of knowledge schemas in structuring data, the main one being the Structured Threat Information Expression (STIX2) standards. STIX is a serialised and standardised language format used in threat intelligence exchange. It allows for the data to be implemented as entities and relationships, effectively tracing the origin of the provided information.

This data model is supported by how the platform’s architecture has been laid out. The image below gives an architectural structure for your know-how.

YARA | TryHackMe — Walkthrough (5)

Source: OpenCTI Public Knowledge Base

The highlight services include:

  • GraphQL API: The API connects clients to the database and the messaging system.
  • Write workers: Python processes utilised to write queries asynchronously from the RabbitMQ messaging system.
  • Connectors: Another set of Python processes used to ingest, enrich or export data on the platform. These connectors provide the application with a robust network of integrated systems and frameworks to create threat intelligence relations and allow users to improve their defence tactics.

According to OpenCTI, connectors fall under the following classes:

Class Description Examples External Input Connector Ingests information from external sources CVE, MISP, TheHive, MITRE Stream Connector Consumes platform data stream History, Tanium Internal Enrichment Connector Takes in new OpenCTI entities from user requests Observables enrichment Internal Import File Connector Extracts information from uploaded reports PDFs, STIX2 Import Internal Export File Connector Exports information from OpenCTI into different file formats CSV, STIX2 export, PDF

Refer to the connectors and data model documentation for more details on configuring connectors and the data schema.

Follow along with the task by launching the attached machine and using the credentials provided; log in to the OpenCTI Dashboard via the AttackBox on http://MACHINE_IP:8080/. Give the machine 10 minutes to start up, and using the AttackBox on fullscreen is advisable.

Username: info@tryhack.io

Password: TryHackMe1234

Once connected to the platform, the opening dashboard showcases various visual widgets summarising the threat data ingested into OpenCTI. Widgets on the dashboard showcase the current state of entities ingested on the platform via the total number of entities, relationships, reports and observables ingested, and changes to these properties noted within 24 hours.

YARA | TryHackMe — Walkthrough (6)

The OpenCTI categorises and presents entities under the Activities and Knowledge groups on the left-side panel. The activities section covers security incidents ingested onto the platform in the form of reports. It makes it easy for analysts to investigate these incidents. In contrast, the Knowledge section provides linked data related to the tools adversaries use, targeted victims and the type of threat actors and campaigns used.

Analysis

The Analysis tab contains the input entities in reports analysed and associated external references. Reports are central to OpenCTI as knowledge on threats and events are extracted and processed. They allow for easier identification of the source of information by analysts. Additionally, analysts can add their investigation notes and other external resources for knowledge enrichment. As displayed below, we can look at the Triton Software report published by MITRE ATT&CK and observe or add to the details provided.

YARA | TryHackMe — Walkthrough (7)

Events

Security analysts investigate and hunt for events involving suspicious and malicious activities across their organisational network. Within the Events tab, analysts can record their findings and enrich their threat intel by creating associations for their incidents.

YARA | TryHackMe — Walkthrough (8)

Observations

Technical elements, detection rules and artefacts identified during a cyber attack are listed under this tab: one or several identifiable makeup indicators. These elements assist analysts in mapping out threat events during a hunt and perform correlations between what they observe in their environments against the intel feeds.

YARA | TryHackMe — Walkthrough (9)

Threats

All information classified as threatening to an organisation or information would be classified under threats. These will include:

  • Threat Actors: An individual or group of attackers seeking to propagate malicious actions against a target.
  • Intrusion Sets: An array of TTPs, tools, malware and infrastructure used by a threat actor against targets who share some attributes. APTs and threat groups are listed under this category on the platform due to their known pattern of actions.
  • Campaigns: Series of attacks taking place within a given period and against specific victims initiated by advanced persistent threat actors who employ various TTPs. Campaigns usually have specified objectives and are orchestrated by threat actors from a nation-state, crime syndicate or other disreputable organisation.
YARA | TryHackMe — Walkthrough (10)

Arsenal

This tab lists all items related to an attack and any legitimate tools identified from the entities.

  • Malware: Known and active malware and trojan are listed with details of their identification and mapping based on the knowledge ingested into the platform. In our example, we analyse the 4H RAT malware and we can extract information and associations made about the malware.
  • Attack Patterns: Adversaries implement and use different TTPs to target, compromise, and achieve their objectives. Here, we can look at the details of the Command-Line Interface and make decisions based on the relationships established on the platform and navigate through an investigation associated with the technique.
  • Courses of Action: MITRE maps out concepts and technologies that can be used to prevent an attack technique from being employed successfully. These are represented as Courses of Action (CoA) against the TTPs.
  • Tools: Lists all legitimate tools and services developed for network maintenance, monitoring and management. Adversaries may also use these tools to achieve their objectives. For example, for the Command-Line Interface attack pattern, it is possible to narrow down that CMD would be used as an execution tool. As an analyst, one can investigate reports and instances associated with the use of the tool.
  • Vulnerabilities: Known software bugs, system weaknesses and exposures are listed to provide enrichment for what attackers may use to exploit and gain access to systems. The Common Vulnerabilities and Exposures (CVE) list maintained by MITRE is used and imported via a connector.
YARA | TryHackMe — Walkthrough (11)

Entities

This tab categorises all entities based on operational sectors, countries, organisations and individuals. This information allows for knowledge enrichment on attacks, organisations or intrusion sets.

YARA | TryHackMe — Walkthrough (12)

Answer the questions below:

4a. What is the name of the group that uses the 4H RAT malware?

After you deployed your VMs and either SSH in or login using the attackbox, navigate to the OpenCTI site: http://<IP ADDRESS>:8080/ where IP address is referring to the OpenCTI VM IP. We know from the task that malware is under Arsenal so let’s click the Arsenal tab on the left and I would say to search for “4H RAT” but it’s right there on the top row, click on it and we’ll go to the 4H RAT page where we’ll find the info, in the details pane on the right:

YARA | TryHackMe — Walkthrough (13)
YARA | TryHackMe — Walkthrough (14)

Answer: Putter Panda

4b. What kill-chain phase is linked with the Command-Line Interface Attack Pattern?

We know we’re looking for an attack pattern here and again, per the task, this is located under the Arsenal tab. Click Arsenal > Attack Pattern > Command-Line Interface

YARA | TryHackMe — Walkthrough (15)

We’ll find the kill chain phases associated with this attack pattern on the right under details:

YARA | TryHackMe — Walkthrough (16)

Answer: execution-ics

4c. Within the Activities category, which tab would house the Indicators?

We can find this info in the task description:

YARA | TryHackMe — Walkthrough (17)

Answer: Observations

The day-to-day usage of OpenCTI would involve navigating through different entities within the platform to understand and utilise the information for any threat analysis. We will be looking at the Cobalt Strike malware entity for our walkthrough, mainly found under the Arsenal tab we’ve covered previously. When you select an intelligence entity, the details are presented to the user through:

  • Overview Tab: Provides the general information about an entity being analysed and investigated. In our case, the dashboard will present you with the entity ID, confidence level, description, relations created based on threats, intrusion sets and attack patterns, reports mentioning the entity and any external references.
YARA | TryHackMe — Walkthrough (18)
  • Knowledge Tab: Presents linked information associated with the entity selected. This tab will include the associated reports, indicators, relations and attack pattern timeline of the entity. Additionally, an analyst can view fine-tuned details from the tabs on the right-hand pane, where information about the threats, attack vectors, events and observables used within the entity are presented.
YARA | TryHackMe — Walkthrough (19)
  • Analysis Tab: Provides the reports where the identified entry has been seen. The analysis provides usable information about a threat and guides investigation tasks.
YARA | TryHackMe — Walkthrough (20)
  • Indicators Tab: Provides information on IOC identified for all the threats and entities.
  • Data Tab: Contains the files uploaded or generated for export that are related to the entity. These assist in communicating information about threats being investigated in either technical or non-technical formats.
  • History Tab: Changes made to the element, attributes, and relations are tracked by the platform worker and this tab will outline the changes.

Answer the questions below:

5a. What Intrusion sets are associated with the Cobalt Strike malware with a Good confidence level? (Intrusion1, Intrusion2)

Let’s open up the Cobalt Strike malware: go to Arsenal > Malware > Cobalt Strike:

YARA | TryHackMe — Walkthrough (21)

Then we’ll click Knowledge > Intrusion Sets and our answer will be the resulting data:

YARA | TryHackMe — Walkthrough (22)

Answer: CopyKittens, FIN7

5b. Who is the author of the entity?

We;’ll find this on the overview tab:

YARA | TryHackMe — Walkthrough (23)

Answer: THE MITRE CORPORATION

As a SOC analyst, you have been tasked with investigations on malware and APT groups rampaging through the world. Your assignment is to look into the CaddyWiper malware and APT37 group. Gather information from OpenCTI to answer the following questions.

Answer the questions below:

6a. What is the earliest date recorded related to CaddyWiper? Format: YYYY/MM/DD

To get this info, I searched “caddy” under Analysis > Reports and clicked the ESET CaddyWiper report.

YARA | TryHackMe — Walkthrough (24)

Our info is in the entity details description:

YARA | TryHackMe — Walkthrough (25)

Answer: 2022/03/15

6b. Which Attack technique is used by the malware for execution?

Arsenal > Malware > Knowledge > Attack Patterns:

YARA | TryHackMe — Walkthrough (26)

Answer: Native API

6c. How many malware relations are linked to this Attack technique?

Click the answer in the matrix from last question and your answer will be on the next screen:

YARA | TryHackMe — Walkthrough (27)

Answer: 113

6d. Which 3 tools were used by the Attack Technique in 2016? (Ans: Tool1, Tool2, Tool3)

Click tools on the right and sort by date, they’ll be the three earliest results:

YARA | TryHackMe — Walkthrough (28)

Answer: BloodHound, Empire, ShimRatReporter

6e. What country is APT37 associated with?

Just searched apt37 in the top right, expanded the intrusion sets:

YARA | TryHackMe — Walkthrough (29)

Answer: north korea

6f. Which Attack techniques are used by the group for initial access? (Ans: Technique1, Technique2)

The way I did this was, from the APT37 page, click Attack Patterns, then scroll to initial access, open the two techniques and get their technique IDs:

Answer: T1189, T1566

Fantastic work on going through and completing the OpenCTI room.

In this room, we looked at the use of the OpenCTI platform when it comes to processing threat intel and assisting analysts in investigating incidents. Check out the documentation linked within the room to get more information about OpenCTI and the different tools and frameworks used.

This concludes the OpenCTI room on TryHackMe. This was a pretty fun room as well. I’m really enjoying the malware analysis side of things and tools that we’re being exposed to.

Thanks for joining me on this walkthrough and we’ll see you tomorrow in the next one where we will take a look at the threat sharing platform, MISP.

YARA | TryHackMe — Walkthrough (2024)
Top Articles
Latest Posts
Article information

Author: Francesca Jacobs Ret

Last Updated:

Views: 6078

Rating: 4.8 / 5 (48 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Francesca Jacobs Ret

Birthday: 1996-12-09

Address: Apt. 141 1406 Mitch Summit, New Teganshire, UT 82655-0699

Phone: +2296092334654

Job: Technology Architect

Hobby: Snowboarding, Scouting, Foreign language learning, Dowsing, Baton twirling, Sculpting, Cabaret

Introduction: My name is Francesca Jacobs Ret, I am a innocent, super, beautiful, charming, lucky, gentle, clever person who loves writing and wants to share my knowledge and understanding with you.