Location Research Breakthrough Possible @S-Logix pro@slogix.in

Detecting Malicious Command-and-Control Infrastructure Targeting GitLab Servers Through Threat Intelligence IOC Correlation and Network Behavior Analysis

Description

Enterprise organizations may deploy GitLab as a self-hosted platform for source-code management, CI/CD, project collaboration, and software development operations. Because GitLab can be a critical internal application, compromise of the server or its surrounding infrastructure can create significant security risk.

Attackers may use external Command-and-Control (C2) infrastructure to maintain communication with compromised servers. If a GitLab server communicates with infrastructure associated with malicious activity, the communication may indicate a potential compromise or unauthorized outbound activity.

Traditional network monitoring can identify connections but may not provide enough context to determine whether the destination is associated with known malicious infrastructure.

Cyber Threat Intelligence addresses this problem by collecting known malicious indicators, enriching them with external intelligence, storing them in a centralized intelligence platform, and correlating them with internal network activity.

In this use case, an enterprise-like self-hosted GitLab server is deployed on Ubuntu inside an isolated laboratory. Zeek monitors the network traffic generated by the GitLab environment.

MISP acts as the central Cyber Threat Intelligence platform for collecting, storing, enriching, and correlating Indicators of Compromise (IOCs).

Open-source threat-intelligence sources such as URLhaus and AbuseIPDB are used to obtain and enrich malicious IP and domain indicators.

A controlled C2 communication scenario is safely reproduced inside the isolated laboratory. The laboratory does not connect to real malicious infrastructure. Instead, a controlled test indicator is used to represent malicious C2 infrastructure.

Zeek records the network activity, while MISP provides the associated threat-intelligence context. The network activity is then correlated with the known IOC to identify potential C2 communication involving the GitLab environment.

OpenSearch is used to visualize and investigate the correlated network activity and associated threat intelligence.

The Workflow is: GitLab Server → Controlled C2 Communication → Zeek Network Telemetry → IOC Matching → MISP Threat Intelligence → Threat Context Enrichment → Potential C2 Detection → Investigation → Risk Assessment → Intelligence Update

Existing Security Problem

Application: GitLab

GitLab is the target application in this use case. It is deployed as a self-hosted application within the controlled enterprise-like environment. It may contain source-code repositories, CI/CD configurations, project information, development credentials and configuration references, application metadata, and internal development information. Because of its importance, unexpected communication between the GitLab server and known malicious infrastructure should be investigated.

The organization may have external threat intelligence identifying malicious IP addresses and domains, but that intelligence may remain separate from internal monitoring systems. As a result, a GitLab server communicating with malicious infrastructure could appear as an ordinary network connection.

Existing Problem:

The security problem is that external threat intelligence and known malicious IOCs may not be correlated with internal GitLab network activity. Without internal correlation, outbound communication from the GitLab server toward potential C2 infrastructure may remain undetected.

The security problem is therefore:

External Threat Intelligence → Known Malicious IOC → No Internal Correlation → GitLab Server → Outbound Network Communication → Potential C2 Infrastructure → Suspicious Activity May Remain Undetected

The proposed solution introduces threat intelligence collection, IOC validation, IOC enrichment, MISP-based intelligence management, GitLab network monitoring, IOC correlation, C2 communication identification, threat-context analysis, risk-based investigation, and intelligence-driven security response.

Attack

Specific Attack: Malicious C2 Communication Targeting GitLab

The controlled scenario evaluates whether network communication involving the GitLab server can be correlated with a known malicious C2 indicator. The assessment does not connect the laboratory to real malicious infrastructure. Instead, a controlled test environment is used to reproduce the characteristics of communication with a known malicious IOC.

The detection focuses on identifying network activity involving the GitLab server and determining whether the destination corresponds to a known malicious IP address or domain. The assessment considers IOC source, IOC reliability, indicator type, threat reputation, indicator confidence, GitLab server activity, destination IP/domain, connection frequency, connection timestamps, associated threat context, and potential impact to the GitLab environment.

Attack Behavior:
Threat Intelligence Source
Malicious C2 Indicator
MISP
Controlled Test Indicator
GitLab Server Network Activity
Zeek Telemetry
IOC Correlation
Potential C2 Detection
Investigation

Security Concept

Threat Intelligence–Driven Detection:

The primary security concept is Threat Intelligence–Driven Detection.

The objective is to convert external threat intelligence into actionable security information for the GitLab environment. The assessment considers IOC source, IOC reliability, indicator type, threat reputation, indicator confidence, GitLab server activity, destination IP/domain, connection frequency, connection timestamps, associated threat context, and potential impact to the GitLab environment.

The secure processing flow is:

Threat Intelligence Collection
IOC Validation
IOC Enrichment
MISP Intelligence Management
GitLab Network Monitoring
IOC Correlation
C2 Detection
Threat Investigation
Risk Assessment
Security Response

Defensive Mechanism

Threat Intelligence Collection

Malicious infrastructure indicators are collected from open-source intelligence sources.

Purpose

Obtain information about known malicious infrastructure.

IOC Validation

Collected indicators are reviewed before being used for detection.

Purpose

Reduce false positives caused by unreliable or outdated intelligence.

IOC Enrichment

Indicators are enriched with available reputation and threat information.

Purpose

Provide additional context about the potential threat.

Centralized CTI Management

MISP stores and manages the collected threat intelligence.

Purpose

Provide visibility into GitLab-related network communication.

IOC Correlation

Internal GitLab network activity is compared against known malicious indicators.

Purpose

Identify potential communication with malicious infrastructure.

Threat Context Analysis

The matched IOC is reviewed together with its external intelligence.

Purpose

Determine the significance of the detected communication.

Security Investigation

OpenSearch provides centralized visibility into the relevant network events.

Purpose

Allow analysts to investigate suspicious GitLab communication.

Risk-Based Prioritization

Detected events are prioritized according to IOC confidence, affected system, and potential impact.

Purpose

Focus investigation on meaningful threats.

Intelligence Feedback

Validated findings are incorporated into the CTI repository.

Purpose

Improve future detection and threat-intelligence quality.

Security Tools

Primary Cyber Threat Intelligence Platform: MISP

MISP is the core CTI platform.

Purpose
  • Collect IOCs.
  • Store threat intelligence.
  • Enrich indicators.
  • Correlate related indicators.
  • Maintain threat context.
  • Support intelligence-driven detection.

Threat Intelligence Source: URLhaus

URLhaus provides open-source intelligence related to malicious URLs and malware infrastructure.

Purpose
  • Obtain malicious URL/domain indicators.
  • Support IOC collection.
  • Provide threat context.
  • Enrich indicators.

IP Reputation Source: AbuseIPDB

AbuseIPDB provides reputation information about IP addresses associated with abusive activity.

Purpose
  • Enrich IP indicators.
  • Review reported malicious activity.
  • Support IOC validation.
  • Provide additional reputation context.

Primary Network Monitoring Tool: Zeek

Zeek monitors the network activity associated with the GitLab environment.

Purpose
  • Monitor network connections.
  • Generate connection logs.
  • Monitor DNS activity.
  • Record network metadata.
  • Provide telemetry for IOC correlation.

Security Investigation Platform: OpenSearch

OpenSearch is used to investigate and visualize the correlated events.

Purpose
  • Centralize security telemetry.
  • Search GitLab network activity.
  • Visualize suspicious communication.
  • Investigate IOC matches.
  • Support security analysis.

Target Application: GitLab

GitLab is the application being monitored.

Purpose
  • Provide the self-hosted enterprise application.
  • Generate legitimate application-related network activity.
  • Serve as the protected asset in the CTI scenario.

Target Platform: Ubuntu Linux

Ubuntu hosts the self-hosted GitLab environment.

Purpose
  • Host GitLab.
  • Provide the controlled enterprise-like application environment.
  • Generate controlled network activity.
  • Support the CTI detection scenario.

Security Testing Platform: Kali Linux

Kali Linux provides the controlled security-testing environment.

Purpose
  • Generate safe test activity.
  • Validate the CTI detection workflow.
  • Test IOC correlation.
  • Support post-detection validation.

Virtualization Platform: VirtualBox

VirtualBox provides the isolated laboratory environment.

Purpose
  • Host GitLab/Ubuntu.
  • Host Kali Linux.
  • Isolate the test network.
  • Prevent interaction with real malicious infrastructure.

Process

STEP 01

Prepare the Isolated GitLab Environment

  • Create an isolated cybersecurity laboratory using VirtualBox.
  • Deploy Ubuntu as the GitLab server.
  • Deploy Kali Linux as the security-testing system.
  • Configure the isolated virtual network.
  • Assign stable laboratory IP addresses.
  • Verify communication between authorized laboratory systems.
  • Confirm that the laboratory cannot communicate with real malicious infrastructure.
Tools: VirtualBox + Ubuntu + Kali Linux
STEP 02

Deploy the GitLab Application

  • Install the self-hosted GitLab application on Ubuntu.
  • Start the GitLab services.
  • Verify that the GitLab web interface is operational.
  • Create a controlled test project.
  • Generate normal GitLab application activity.
  • Verify legitimate application functionality.
Tools: GitLab + Ubuntu
STEP 03

Establish the GitLab Network Baseline

  • Access the GitLab application from an authorized laboratory client.
  • Perform normal application operations.
  • Generate legitimate GitLab traffic.
  • Observe the network communication.
  • Record normal connection patterns.
  • Preserve the baseline for later comparison.
Tools: GitLab + Zeek + Ubuntu
STEP 04

Deploy MISP

  • Deploy the MISP platform in the controlled environment.
  • Configure the MISP instance.
  • Create the required CTI organization.
  • Configure the IOC management structure.
  • Verify that MISP is operational.
  • Prepare the platform for indicator ingestion.
Tools: MISP
STEP 05

Collect Open-Source Threat Intelligence

  • Identify relevant malicious infrastructure indicators from open-source sources.
  • Obtain suitable IP/domain indicators from URLhaus and AbuseIPDB.
  • Review the available indicator information.
  • Record the source of each indicator.
  • Record available reputation information.
  • Import appropriate indicators into the controlled MISP environment.
Tools: URLhaus + AbuseIPDB + MISP
STEP 06

Validate and Enrich the IOCs

  • Review each collected indicator.
  • Verify the source.
  • Review reputation information.
  • Identify available threat context.
  • Determine indicator confidence.
  • Remove irrelevant indicators.
  • Add contextual information to MISP.
  • Preserve the validated IOC set.
Tools: MISP + URLhaus + AbuseIPDB
STEP 07

Organize the Intelligence in MISP

  • Create the relevant MISP event.
  • Add the validated malicious indicators.
  • Categorize indicators according to type.
  • Add threat context.
  • Record intelligence sources.
  • Record confidence information.
  • Establish relationships between relevant indicators.
  • Prepare the intelligence for correlation.
Tools: MISP
STEP 08

Deploy Zeek Monitoring

  • Install Zeek in the isolated GitLab network.
  • Configure the appropriate monitoring interface.
  • Start Zeek network monitoring.
  • Verify that connection logs are generated.
  • Verify DNS telemetry where applicable.
  • Confirm that GitLab network traffic is being captured.
Tools: Zeek
STEP 09

Establish Normal GitLab Network Behavior

  • Perform normal GitLab application operations.
  • Access repositories.
  • Perform controlled project activity.
  • Generate legitimate application requests.
  • Observe the resulting Zeek telemetry.
  • Confirm that normal GitLab traffic is correctly recorded.
  • Preserve the normal-activity baseline.
Tools: GitLab + Zeek
STEP 10

Create the Controlled C2 Communication Scenario

  • Use only the isolated laboratory environment.
  • Do not connect GitLab to real malicious infrastructure.
  • Create a controlled test destination representing the malicious C2 indicator.
  • Generate safe network communication from the laboratory GitLab environment toward the controlled destination.
  • Ensure that all traffic remains within the isolated environment.
  • Record the generated network activity.
Tools: GitLab/Ubuntu + Kali Linux + Zeek
STEP 11

Correlate GitLab Network Activity with MISP Intelligence

  • Collect the relevant Zeek telemetry.
  • Identify the destination IP or domain.
  • Compare the observed destination against the MISP IOC repository.
  • Identify matching indicators.
  • Retrieve the associated threat context.
  • Determine the confidence of the IOC match.
  • Generate a potential C2 communication finding.
Tools: Zeek + MISP
STEP 12

Centralize Events in OpenSearch

  • Forward relevant Zeek telemetry to OpenSearch.
  • Organize the data for investigation.
  • Create searches for IOC matches.
  • Visualize suspicious GitLab network connections.
  • Identify the affected GitLab server.
  • Review the associated timestamps and network information.
Tools: OpenSearch + Zeek
STEP 13

Investigate the Potential C2 Event

  • Review the matched IOC.
  • Review its intelligence source.
  • Review reputation information.
  • Identify the affected GitLab server.
  • Review connection timestamps.
  • Review DNS activity where applicable.
  • Review connection frequency.
  • Determine whether the activity represents a meaningful security event.
Tools: OpenSearch + MISP + Zeek
STEP 14

Validate the CTI Finding

  • Compare the detected network indicator with the MISP IOC.
  • Confirm that the indicator values match.
  • Confirm the indicator type.
  • Review the intelligence confidence.
  • Verify the corresponding internal network event.
  • Determine whether the event is a true positive within the controlled scenario.
  • Preserve the validation evidence.
Tools: MISP + Zeek + OpenSearch
STEP 15

Assess Threat Context and Risk

  • Review the intelligence associated with the matched indicator.
  • Determine the nature of the malicious infrastructure.
  • Evaluate the affected GitLab server.
  • Consider the importance of the GitLab application.
  • Evaluate IOC confidence.
  • Review connection frequency.
  • Assess potential business impact.
  • Determine the investigation priority.
Tools: MISP + OpenSearch
STEP 16

Update the Threat Intelligence Repository

  • Record the validated internal observation in MISP.
  • Associate the observed indicator with the relevant threat event.
  • Add appropriate internal context.
  • Update confidence information where justified.
  • Record the affected GitLab environment.
  • Preserve the intelligence relationship for future correlation.
Tools: MISP
STEP 17

Validate the Detection Workflow

  • Repeat the controlled C2 communication scenario inside the isolated laboratory.
  • Verify that Zeek generates the expected network telemetry.
  • Confirm that the destination matches the MISP IOC.
  • Verify that the correlated event is visible in OpenSearch.
  • Confirm that the threat context is available through MISP.
  • Compare the result with the initial detection.
Tools: Zeek + MISP + OpenSearch
STEP 18

Perform Final CTI Assessment and Strategic Review

  • Review the complete GitLab CTI detection workflow.
  • Review collected threat intelligence.
  • Review IOC enrichment.
  • Review MISP correlation results.
  • Review Zeek network telemetry.
  • Review OpenSearch investigation results.
  • Identify intelligence gaps.
  • Recommend periodic IOC validation.
  • Recommend removal of outdated indicators.
  • Recommend continuous integration of relevant CTI into security monitoring.
  • Finalize the Cyber Threat Intelligence assessment.
Tools: MISP + Zeek + OpenSearch

Outcome

  1. A self-hosted GitLab application is successfully deployed in an isolated enterprise-like environment and used as the protected application for the CTI scenario.
  2. Relevant malicious IP and domain indicators are collected from open-source threat-intelligence sources and centralized within MISP.
  3. Threat indicators are validated and enriched with reputation and contextual information, improving their reliability for security detection.
  4. MISP provides centralized management and correlation of the collected threat intelligence, creating a structured CTI repository.
  5. Zeek monitors network activity associated with the GitLab environment, providing the telemetry required for IOC correlation.
  6. A controlled C2 communication scenario is safely reproduced inside the isolated laboratory without connecting to real malicious infrastructure, allowing the detection workflow to be validated safely.
  7. GitLab network activity is correlated with known malicious indicators, enabling potential C2 communication to be identified.
  8. OpenSearch provides centralized investigation and visualization of the correlated GitLab network event, allowing analysts to review the affected system, timing, communication, and threat context.
  9. Validated internal observations are incorporated into MISP, improving the organization's reusable threat intelligence and supporting future detection activities.
  10. The complete GitLab-focused threat intelligence collection, IOC validation, enrichment, MISP management, network monitoring, C2 indicator correlation, threat detection, investigation, risk assessment, intelligence updating, and strategic CTI workflow is successfully demonstrated.