AttackCapture Code Search Helps Threat Hunters Find C2 Profiles, Reverse Shells and Exploit Code

· Original article ↗

Summary

Hunt.io demonstrates AttackCapture Code Search queries for finding Cobalt Strike profiles, EagleSpy artifacts, Covenant implants, reverse shells, and exploit code in open directories.

Key points

  • Code Search scans files in AttackCapture collections for indicators such as exploit code, reverse shells, malware, and C2 configurations.
  • Example queries target distinctive Cobalt Strike Malleable C2 profiles, including profiles associated with geacon_plus.
  • A full-text EagleSpy query can find HTML files containing the malware’s distinctive identifier and exposed panels.
  • Other examples search for Covenant Grunt implants and Python or Bash reverse shells in open directories.
  • Queries target RegreSSHion exploit code associated with CVE-2024-6387 and Cacti command-injection exploit code associated with CVE-2024-29895.
  • The article presents the tool as a way for defenders to identify attacker techniques and inform threat hunting and preparation.

Article Details

Defense Focus
Use Code Search in AttackCapture to find and analyze exploit code, reverse shells, C2 profiles, and exposed implants in indexed files and open directories.
Detection Methods
  • Search for distinctive strings and combinations of code tokens associated with Cobalt Strike Malleable C2 profiles, including URI, HTTP header, and certificate-field patterns.
  • Search for the @EagleSpy identifier in HTML files to locate EagleSpy-related panels or code.
  • Search for Grunt.GruntStager to find exposed Covenant implants.
  • Combine socket, subprocess, shell-path, and interactive-shell strings to identify Python reverse-shell code; search for sh -i together with /dev/tcp to identify Bash reverse shells.
  • Search for the filename 7etsuo-regreSSHion.c and for /cacti/cmd_realtime.php to locate exploit code associated with the cited vulnerabilities.
  • Use unique TLS certificate fields to help identify geacon_plus infrastructure during network scans.
Data Sources
  • Files and code snippets indexed from open directories
  • HTML files
  • Cobalt Strike Malleable C2 profile configuration strings
  • TLS certificate fields
  • Network-scan results
Rule Types
  • AttackCapture Code Search queries using keywords, AND/OR operators, and parentheses
Platforms
  • AttackCapture
Defensive Actions
  • Use Code Search to locate and review suspicious exploit code, reverse shells, C2 configurations, and exposed implants.
  • Use unique TLS certificate fields to identify geacon_plus-related infrastructure during network scans.
  • Review discovered exploit code and assess exposure to the associated vulnerabilities.

MITRE ATT&CK

CVE

People

Malware

Products

Tools

Related Articles