Creation & Usage Of IOCs
1. Understanding IOCs and Their Importance
Purpose: To define and document indicators of compromise (IOCs) that represent artifacts of a security incident.
Why: IOCs are critical for detecting malicious activity, correlating events, and guiding the investigation process. They provide a structured way to identify and respond to threats.
Examples of IOCs:
IP Addresses:
192.168.1.100
File Hashes: MD5:
abc123
, SHA256:def456
File Names:
malicious_tool.exe
Domain Names:
malicious-domain.com
2. Documenting IOCs Using Standards
Purpose: To standardize the creation and sharing of IOCs for consistency and interoperability.
Why: Standardized formats like OpenIOC and Yara enable organizations to share IOCs across teams and with third parties effectively.
Technical Example:
Create an IOC Using OpenIOC:
Use tools like Mandiant's IOC Editor to create structured IOCs:
Write a Yara Rule:
Define a Yara rule to detect malicious files:
3. Deploying IOC-Searching Tools
Purpose: To search for IOCs across systems and logs to identify compromised assets.
Why: Leveraging tools to scan for IOCs at scale ensures comprehensive coverage and accelerates the investigation process.
Technical Example:
Search for IOCs Using PowerShell:
Query Windows Event Logs for specific IOCs:
Search for file hashes on endpoints:
Use WMI for IOC Searches:
Query remote systems for suspicious processes:
4. Preventing Credential Caching During Investigations
Purpose: To avoid exposing privileged credentials when connecting to potentially compromised systems.
Why: Cached credentials can be harvested by attackers, leading to further compromise.
Technical Example:
Use WinRM for Secure Connections:
Connect to remote systems using WinRM, which does not cache credentials:
Avoid Tools That Cache Credentials:
Be cautious with tools like PsExec, which may cache credentials if used improperly:
Verify Logon Types:
Ensure connections use logon type 3 (Network Logon), which avoids credential caching:
5. Obtaining IOCs from Third Parties
Purpose: To leverage external intelligence for known adversaries or attacks.
Why: Third-party IOCs can provide valuable context and help identify related activity.
Technical Example:
Query Threat Intelligence Feeds:
Use APIs to retrieve IOCs from threat intelligence platforms:
Integrate IOCs into SIEM tools for real-time detection:
Conclusion
Indicators of compromise (IOCs) are foundational to effective incident investigations. By documenting IOCs using standardized formats like OpenIOC and Yara, organizations can ensure consistency and interoperability. Deploying tools like PowerShell and WMI enables scalable IOC searches, while careful tool selection prevents credential exposure during investigations.
Last updated