GREP Command Reference
Basic Usage
Common Options
Wildcards & Quantifiers
Position Anchors
Character Classes
🔐 Personal Information Patterns
🛡️ Security & Forensics Patterns
Security & Networking Use Cases
Interactive GREP Simulator
Real-World Examples for IT Students
🔍 Log Analysis
Search system logs for errors, failed logins, and security events
🌐 Network Monitoring
Monitor network connections and identify suspicious activity
🔒 Security Auditing
Find failed authentication attempts and security breaches
⚙️ Configuration Files
Search configuration files for specific settings
💻 Process Management
Find specific processes and their resource usage
🔢 IP Address Validation
Extract and validate IP addresses from logs
🔐 PII/PHI Detection
Identify sensitive personal and protected health information
🦠 Malware Detection
Detect malicious activity and suspicious processes
🌍 Web Server Analysis
Analyze HTTP logs for attacks and anomalies
🗄️ Database Monitoring
Monitor database performance and security issues
🐳 Container Logs
Monitor Docker containers and microservices
🪟 Windows Events
Analyze Windows Event Log for security events
📊 JSON/API Logs
Parse structured JSON logs from modern applications
⚡ Performance Monitor
Track system performance metrics and alerts
Common Patterns for IT Professionals
| Use Case | Pattern | Description |
|---|---|---|
| Email Addresses | [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} | Match valid email formats |
| IP Addresses | \b([0-9]{1,3}\.){3}[0-9]{1,3}\b | Match IPv4 addresses |
| MAC Addresses | ([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2}) | Match MAC address formats |
| URLs | https?://[^\s]+ | Match HTTP/HTTPS URLs |
| Port Numbers | :(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|[1-9][0-9]{0,3}) | Match valid port ranges |
| Social Security Numbers | [0-9]{3}-[0-9]{2}-[0-9]{4} | Match SSN format XXX-XX-XXXX |
| Phone Numbers | \([0-9]{3}\) [0-9]{3}-[0-9]{4} | Match phone format (XXX) XXX-XXXX |
| Credit Cards | [0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{4} | Match credit card format |
| MD5 Hashes | [A-Fa-f0-9]{32} | Match 32-character MD5 hashes |
| SHA256 Hashes | [A-Fa-f0-9]{64} | Match 64-character SHA256 hashes |