Whoami
  • Welcome
  • Home Lab: C2 Detection, Ransomware Defense & YARA Automation
    • SOC Lab – What is this Lab about ?
    • Part 1 - Setting Up the Environment
    • Part 2 - Detecting C2 Activity
    • Part 3 - Credential Dumping & Threat Detection
    • Part 4 - Blocking Ransomware
    • Part 5 - Reducing False Positives
    • Part 6 - Automated YARA Scanning
  • Automation Lab - Home Project
    • Sysmon Installation
    • Wazuh & TheHive: Installation, Configuration, and Optimization
    • Tracking Mimikatz Activity with Wazuh & Sysmon Logs
    • End-to-End Alert Automation: Wazuh → Shuffle → TheHive
  • Active Directory Attack Lab: Recon-to-Root
    • Reconnaissance Phase
      • 1. Full TCP Port Scan on Target Host
      • 2. Service and Version Detection
      • 3. Null Session SMB Enumeration
      • 4. LDAP Anonymous Bind Check
      • 5. Kerberos Username Enumeration
      • 6. Password Brute Force via SMB Login
    • Exploitation Phase
      • 7. Dump Domain Information via LDAP
      • 8. Perform Remote AD Recon with BloodHound
      • 9. Set Up Neo4j and Launch BloodHound GUI
      • 10. Abuse ForceChangePassword Right via RPC
      • 11. Validate New Credentials via WinRM
      • 12. Enumerate Local Privileges and AutoLogon
      • 13. Reuse Administrator Credentials
      • 14. Capture the User Flag
  • QRadar101 Lab Challenge
    • Scenario and Instructions
    • The Walkthrough
Powered by GitBook
On this page
  • Now We'll Get Adversarial
  • Setting Up the Attack
  • Dump LSASS Process (Credential Theft)
  • Detecting the Attack
  • Validating the Detection
  1. Home Lab: C2 Detection, Ransomware Defense & YARA Automation

Part 3 - Credential Dumping & Threat Detection

Simulating adversary tactics in a SOC lab by using Sliver C2 to dump LSASS credentials, analyzing telemetry in LimaCharlie, and creating detection rules to identify credential theft attempts.

Now We'll Get Adversarial

Setting Up the Attack

Access Sliver C2

  1. Open an SSH session on your Linux VM.

  2. Drop into a C2 session on your victim host.

  3. If needed, retrace your steps from Part 2.

Check Privileges

  1. Run the following command to check permissions:

    getprivs
  2. Look for SeDebugPrivilege (required for advanced actions).

  3. If missing, relaunch your C2 implant with admin rights.


Dump LSASS Process (Credential Theft)

Why?

Attackers dump the LSASS process to steal passwords and hashes stored in memory. These credentials can be used to access other systems.

How?

They use tools like: 🔹 Procdump – A legit Microsoft tool misused for dumping LSASS.

Run the following command to dump LSASS:

procdump -n lsass.exe -s lsass.dmp

📌 This will save the dump on your Sliver C2 server. ❗ If the command fails, telemetry may still have been generated, allowing for detection.


Detecting the Attack

Analyze Telemetry in LimaCharlie

  1. Open the LimaCharlie web UI.

  2. Navigate to Timeline on your Windows VM sensor.

    1. Use Event Type Filters to search for SENSITIVE_PROCESS_ACCESS.

      Key Observations

      Source Process

      • File Path: C:\Users\User\Downloads\FORTHCOMING_FLASH.exe

      • Command Line Execution: "C:\Users\User\Downloads\FORTHCOMING_FLASH.exe"

      • Unsigned Binary: Yes (Potentially Untrusted)

      • Hash: 6923c3553a1909b58c3b512be64a2e6113e998319ce39352c616f0219cb35

      Target Process

      • File Path: C:\Windows\System32\lsass.exe

      • Command Line Execution: "C:\Windows\System32\lsass.exe"

      • Signed Binary: Yes (Legitimate System File)

      Security Concern

      • Potential Credential Dumping: The unsigned binary attempted access to lsass.exe, a critical authentication process.

      • Possible Malware Activity: Credential theft tactics often target lsass.exe.

  3. Identify the event related to LSASS access.

Create a Detection & Response (D&R) Rule

  1. Click Create Rule based on the detected event.

  2. Replace the Detect section with:

    event: SENSITIVE_PROCESS_ACCESS
    op: ends with
    path: event/*/TARGET/FILE_PATH
    value: lsass.exe
  3. Replace the Respond section with:

    - action: report
      name: LSASS access
  1. Save the rule as "LSASS Accessed" and enable it.

Test the Detection Rule

  1. Click Target Event to see the raw event.

  2. Scroll to the bottom and click Test Event.

  3. If a "Match" appears, the rule is correctly detecting LSASS access.


Validating the Detection

Re-run the Attack

  1. Return to your Sliver server and rerun:

    procdump -n lsass.exe -s lsass.dmp
  2. If your C2 session dies, relaunch the malware.

Check for Detections

  1. Open LimaCharlie and go to the Detections tab.

  2. Click "Back to Sensors" if needed.

  3. Expand the detection entry to view the raw event.

  4. Click View Event Timeline to analyze when and how the attack occurred.

PreviousPart 2 - Detecting C2 ActivityNextPart 4 - Blocking Ransomware

Last updated 3 months ago