Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

This project outlines a scenario in which an IT employee’s machine is potentially compromised after using a virtual machine (VM) from a compromised Capture the Flag (CTF) site. The incident involves a series of tasks designed to investigate the potential breach by analyzing network traffic and the memory of the compromised machine using tools like Wireshark, Volatility, and others. Here's a step-by-step approach to completing the incident response investigation.

Step-by-Step Breakdown


1. Network Traffic Analysis with Wireshark

Objective: Analyze the network traffic captured in the provided pcap file to understand communication between the compromised machine and the attacker.

Steps:

  • Open Wireshark and load the provided .pcap file.
  • Filter the traffic using the suspected IP addresses:
    • Filter communication between the compromised machine (192.168.248.100) and the malicious IPs (192.168.248.217 and 192.168.248.200) using the filter:
      ip.src == 192.168.248.100 && (ip.dst == 192.168.248.217 || ip.dst == 192.168.248.200)
      
  • Analyze packet timestamps to identify the first connection between the victim and the malicious server.
    In this case, packet 30197 shows that the victim connected to the compromised VM (192.168.248.217).
  • Identify malicious traffic: Look for unusual connections (e.g., to port 8080 and 4444). These ports are commonly associated with backdoors or control mechanisms like Metasploit reverse shells.
  • Suspicious files: If you find files being transferred or downloaded (e.g., using HTTP), export the files for further analysis.

2. Memory Analysis with Volatility

Objective: Identify and analyze malicious processes running on the compromised machine using memory dump analysis.

Steps:

  • Load the memory dump into Volatility.

  • Check for running processes using the pslist or pstree plugins:

    volatility -f <memory_dump> pslist
    • From your investigation, some of the suspicious processes identified were:
      • ghost.exe
      • mXvtj.exe
      • HgTg.exe
  • Identify network connections: Use the netscan plugin to analyze network activity.

    volatility -f <memory_dump> netscan
    • This revealed connections to malicious IPs and ports (7777, 4444, 9999) associated with the attacker’s IP (192.168.248.200).
  • Malicious files identification: Use the filescan or malfind plugins to search for rogue files.

    volatility -f <memory_dump> filescan
    volatility -f <memory_dump> malfind
    • Export the suspicious files for further analysis using the procdump plugin:
      volatility -f <memory_dump> procdump --pid <PID> -D /path/to/export/

3. Analysis of Malicious Files

Objective: Examine the malicious files using tools like VirusTotal or other malware analysis tools to identify the exact threat.

Steps:

  • Submit the files extracted from the memory dump (e.g., ghost.exe, HgRgTVSdX.exe, etc.) to VirusTotal or a similar service for detailed analysis.
    Since these files are associated with attacker-controlled IPs, they are likely involved in maintaining access to the compromised machine.

  • Check for malware signatures: If VirusTotal or other tools recognize these files, they may provide information on whether these are known malware variants (e.g., Metasploit backdoors).


4. Privilege Escalation and System Compromise

Objective: Determine the attacker’s level of access and whether they achieved system-level privileges.

Steps:

  • Analyze system privileges using the getsids plugin to determine if the attacker has escalated their privileges.

    volatility -f <memory_dump> getsids
    • If the output shows the presence of high-privileged accounts (e.g., S-1-5-18), this indicates the attacker has gained system-level privileges.
  • Identify privilege escalation techniques: If Metasploit or similar tools were used, this might indicate how the attacker escalated privileges to gain full control of the system.


5. Report and Mitigation

Objective: Document findings and suggest mitigation steps.

Key Findings:

  • Attacker’s IP: 192.168.248.200
  • Victim’s machine: 192.168.248.100
  • Compromised VM hosting malicious site: 192.168.248.217
  • Malicious processes: ghost.exe, mXvtj.exe, HgTg.exe
  • Ports involved: 7777, 4444, 9999
  • Evidence of system-level privileges: Yes, based on the getsids output.

Recommendations:

  • Isolate the compromised machine: Immediately take the affected system offline to prevent further spread or control by the attacker.
  • Patch vulnerabilities: Ensure that any known vulnerabilities exploited during the attack (e.g., cross-site scripting) are patched.
  • Conduct forensic analysis: Perform a more thorough analysis to ensure no other machines were compromised via lateral movement.
  • Rebuild the compromised system: Once analysis is complete, rebuild the system from a clean image to remove any backdoors or persistent malware.
  • User training: Reinforce the importance of only downloading trusted VMs or other training materials to avoid compromised practice environments.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors