GistPin uses Amazon GuardDuty for continuous threat detection across the AWS environment. GuardDuty monitors S3 data events, EKS audit logs, CloudTrail management events, and VPC flow logs to identify malicious activity.
The GuardDuty detector is provisioned via Terraform (infrastructure/terraform/guardduty.tf). Configuration includes:
| Feature | Status | Details |
|---|---|---|
| S3 Protection | Enabled | Monitors S3 data events for suspicious access patterns |
| EKS Protection | Enabled | Analyzes Kubernetes audit logs for cluster threats |
| Finding frequency | 15 minutes | How often GuardDuty publishes findings |
aws_guardduty_detector.main— the primary detector with S3 and EKS data sourcesaws_guardduty_detector_feature.s3_protection— S3 data events monitoringaws_guardduty_detector_feature.eks_protection— EKS audit log monitoringaws_cloudwatch_event_rule.guardduty_finding— captures findings to CloudWatchaws_sns_topic.guardduty_alerts— SNS topic for alert distribution
| Finding Type | Description | Action |
|---|---|---|
UnauthorizedAccess:* |
Unauthorized API calls or resource access | Investigate immediately, rotate credentials |
PrivilegeEscalation:* |
IAM role escalation attempts | Disable compromised credentials, review IAM policies |
CredentialAccess:* |
Stolen or leaked credentials | Rotate all keys, audit CloudTrail |
CryptoCurrency:* |
Cryptocurrency mining activity | Terminate instances, isolate resources |
Policy:S3/BucketPublicAccessGranted |
S3 bucket made publicly accessible | Restrict bucket policy immediately |
| Finding Type | Description | Action |
|---|---|---|
Recon:* |
Port scanning or API enumeration | Block source IPs, review security groups |
Backdoor:* |
Reverse shell or C2 communication | Isolate resource, capture forensic data |
Behavior:* |
Anomalous IAM user behavior | Review recent API calls, verify with user |
Stealth:* |
Log tampering or CloudTrail disabling | Investigate IAM activity, re-enable logging |
| Finding Type | Description | Action |
|---|---|---|
Discovery:* |
Resource enumeration attempts | Review IAM permissions if legitimate |
PolicyViolation:* |
IAM role misuse or permission errors | Update IAM policies or educate users |
NetworkConnection:* |
Unusual outbound connections | Verify against known endpoints |
| Severity | Channel | Response Time | Escalation |
|---|---|---|---|
| CRITICAL | PagerDuty page | 15 minutes | VP of Engineering after 30 min |
| HIGH | Slack #security | 1 hour | Security lead after 4 hours |
| MEDIUM | Jira ticket | 24 hours | Review on next sprint |
Alert rules are defined in infrastructure/monitoring/guardduty-alerts.yml. Rules are grouped by severity with:
- Critical rules:
for: 1m— fast detection for immediate escalation - High rules:
for: 5m— confirm persistence before notifying - Medium rules:
for: 10m— reduce noise from transient findings - Burst detection: Alerts when finding rate exceeds 10 per minute
- Acknowledge the alert via the designated channel (PagerDuty / Slack)
- Identify the finding type and affected resource in the GuardDuty console
- Contain the threat based on finding type:
- S3 public access → apply bucket policy
- Compromised credentials → rotate keys
- Malicious EC2 instance → isolate via security group
- Investigate root cause via CloudTrail and VPC flow logs
- Remediate the underlying vulnerability
- Document findings in the incident report
Each alert annotation includes a runbook link pointing to this document. Specific runbooks are maintained in infrastructure/docs/runbooks/.
GuardDuty findings are published to CloudWatch metrics:
GuardDuty/CriticalFindings— count of severity ≥ 7 findingsGuardDuty/HighFindings— count of severity 4–7 findingsGuardDuty/MediumFindings— count of severity 1–4 findings
These metrics are visualized in the Grafana security dashboard and trigger the alert rules defined above.
GuardDuty updates threat intelligence feeds automatically. Review the following periodically:
- Quarterly: Review finding types and update alert routing
- Monthly: Verify CloudWatch metric filters and alarms
- After incidents: Update runbooks and response procedures