aiskillstore/marketplace/forensics-osquery
Claude Code and agent skill by aiskillstore/marketplace
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Author "aiskillstore" has blocked skill(s)
SQL-powered forensic investigation and system interrogation using osquery to query operating systems as relational databases. Enables rapid evidence collection, threat hunting, and incident response across Linux, macOS, and Windows endpoints. Use when: (1) Investigating security incidents and collecting forensic artifacts, (2) Threat hunting across endpoints for suspicious activity, (3) Analyzing running processes, network connections, and persistence mechanisms, (4) Collecting system state during incident response, (5) Querying file hashes, user activity, and system configuration for compromise indicators, (6) Building detection queries for continuous monitoring with osqueryd.
Install
npx vskill@latest install aiskillstore/marketplace/forensics-osquerySemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as aiskillstore/marketplace/forensics-osquery.
osquery Forensics & Incident Response
Overview
osquery transforms operating systems into queryable relational databases, enabling security analysts to investigate compromises using SQL rather than traditional CLI tools. This skill provides forensic investigation workflows, common detection queries, and incident response patterns for rapid evidence collection across Linux, macOS, and Windows endpoints.
Core capabilities:
- SQL-based system interrogation for process, network, file, and user analysis
- Cross-platform forensic artifact collection (Linux, macOS, Windows)
- Live system analysis without deploying heavyweight forensic tools
- Threat hunting queries mapped to MITRE ATT&CK techniques
- Scheduled monitoring with osqueryd for continuous detection
- Integration with SIEM and incident response platforms
Quick Start
Interactive Investigation (osqueryi)
One-Liner Forensic Queries
Core Workflows
Workflow 1: Initial Incident Response Triage
For rapid assessment of potentially compromised systems:
Progress: [ ] 1. Collect running processes and command lines [ ] 2. Identify network connections and listening ports [ ] 3. Check user accounts and recent logins [ ] 4. Examine persistence mechanisms (scheduled tasks, startup items) [ ] 5. Review suspicious file modifications and executions [ ] 6. Document findings with timestamps and process ancestry [ ] 7. Export evidence to JSON for preservation
Work through each step systematically. Use bundled triage script for automated collection.
Execute triage: ./scripts/osquery_triage.sh > incident_triage_$(date +%Y%m%d_%H%M%S).json
Workflow 2: Threat Hunting for Specific TTPs
When hunting for specific MITRE ATT&CK techniques:
- Select Target Technique
- Identify technique from threat intelligence (e.g., T1055 - Process Injection)
- Map technique to observable system artifacts
- See references/mitre-attack-queries.md for pre-built queries
- Build Detection Query
- Identify relevant osquery tables (processes, file_events, registry, etc.)
- Join tables to correlate related artifacts
- Use references/table-guide.md for schema reference
- Execute Hunt
``sql -- Example: Hunt for credential dumping (T1003) SELECT p.pid, p.name, p.cmdline, p.path, p.parent, pm.permissions FROM processes p JOIN process_memory_map pm ON p.pid = pm.pid WHERE p.name IN ('mimikatz.exe', 'procdump.exe', 'pwdump.exe') OR p.cmdline LIKE '%sekurlsa%' OR (pm.path = '/etc/shadow' OR pm.path LIKE '%SAM%'); ``
- Analyze Results
- Review process ancestry and command-line arguments
- Check file hashes against threat intelligence
- Document timeline of suspicious activity
- Pivot Investigation
- Use findings to identify additional indicators
- Query related artifacts (network connections, files, registry)
- Expand hunt scope if compromise confirmed
Workflow 3: Persistence Mechanism Analysis
Detecting persistence across platforms:
Linux/macOS Persistence:
Windows Persistence:
Review results for:
- Unusual executables in startup locations
- Base64-encoded or obfuscated commands
- Executables in temporary or user-writable directories
- Recently modified persistence mechanisms
Workflow 4: Network Connection Analysis
Investigating suspicious network activity:
Investigation checklist:
- [ ] Identify non-standard listening ports (not 80, 443, 22, 3389)
- [ ] Check processes with external connections
- [ ] Review destination IPs against threat intelligence
- [ ] Correlate connections with process execution timeline
- [ ] Validate legitimate business purpose for connections
Workflow 5: File System Forensics
Analyzing file modifications and suspicious files:
File analysis workflow:
- Identify suspicious files by location and timestamp
- Extract file hashes (MD5, SHA256) for threat intel lookup
- Review file permissions and ownership
- Check for living-off-the-land binaries (LOLBins) abuse
- Document file metadata for forensic timeline
Forensic Query Patterns
Pattern 1: Process Analysis
Standard process investigation queries:
Pattern 2: User Activity Monitoring
Track user accounts and authentication:
Pattern 3: System Configuration Review
Identify configuration changes:
Security Considerations
- Sensitive Data Handling: osquery can access sensitive system information (password hashes, private keys, process memory). Limit access to forensic analysts and incident responders. Export query results to encrypted storage. Sanitize logs before sharing with third parties.
- Access Control: Requires root/administrator privileges on investigated systems. Use dedicated forensic user accounts with audit logging. Restrict osqueryd configuration files (osquery.conf) to prevent query tampering. Implement least-privilege access to query results.
- Audit Logging: Log all osquery executions for forensic chain-of-custody. Record analyst username, timestamp, queries executed, and systems queried. Maintain immutable audit logs for compliance and legal requirements. Use
osqueryd --auditflag for detailed logging.
- Compliance: osquery supports NIST SP 800-53 AU (Audit and Accountability) controls and NIST Cybersecurity Framework detection capabilities. Enables evidence collection for GDPR data breach investigations (Article 33). Query results constitute forensic evidence - maintain integrity and chain-of-custody.
- Safe Defaults: Use read-only queries during investigations to avoid system modification. Test complex queries in lab environments before production use. Monitor osqueryd resource consumption to prevent denial of service. Disable dangerous tables (e.g.,
curl,yara) in osqueryd configurations unless explicitly needed.
Bundled Resources
Scripts
scripts/osquery_triage.sh- Automated triage collection script for rapid incident responsescripts/osquery_hunt.py- Threat hunting query executor with MITRE ATT&CK mappingscripts/parse_osquery_json.py- Parse and analyze osquery JSON outputscripts/osquery_to_timeline.py- Generate forensic timelines from osquery results
References
references/table-guide.md- Comprehensive osquery table reference for forensic investigationsreferences/mitre-attack-queries.md- Pre-built queries mapped to MITRE ATT&CK techniquesreferences/platform-differences.md- Platform-specific tables and query variations (Linux/macOS/Windows)references/osqueryd-deployment.md- Deploy osqueryd for continuous monitoring and fleet management
Assets
assets/osquery.conf- Production osqueryd configuration template for security monitoringassets/forensic-packs/- Query packs for incident response scenariosir-triage.conf- Initial triage queriespersistence-hunt.conf- Persistence mechanism detectionlateral-movement.conf- Lateral movement indicatorscredential-access.conf- Credential dumping detection
Common Investigation Scenarios
Scenario 1: Webshell Detection
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/agentsecops/forensics-osquery/SKILL.md
Popularity
- Repository stars
- 429
- Repository forks
- 45
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
pluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aiskillstore/marketplace/forensics-osquery)