VPC flow logs rejection
Commande de Contrôle :
aws logs filter-log-events --log-group-name /vpc/flowlogs --filter-pattern "[..., action=REJECT, ... $TARGET_IP]"État Cible Attendu : All lateral flows originating from instance marked REJECT.
Bascule dynamiquement une machine virtuelle ou un conteneur compromis dans un Security Group SDN de quarantaine isolée, bloquant tout mouvement latéral et activant la mise en miroir forensique.
aws ec2 modify-instance-attribute \ --instance-id $TARGET_INSTANCE_ID \ --groups sg-0quarantine-isolate-001aws ec2 create-traffic-mirror-session \ --network-interface-id $TARGET_ENI_ID \ --traffic-mirror-target-id tmt-0forensic-sink \ --traffic-mirror-filter-id tmf-0capture-all \ --session-number 1Groups attribute modified to sg-0quarantine-isolate-001 and mirror session active.cat << 'EOF' | kubectl apply -f -apiVersion: networking.k8s.io/v1kind: NetworkPolicymetadata: name: emergency-pod-quarantine namespace: defaultspec: podSelector: matchLabels: security.hermes/incident: "quarantine" policyTypes: - Ingress - Egress ingress: [] egress: []EOFkubectl label pod $TARGET_POD security.hermes/incident=quarantine --overwriteNetworkPolicy applied; pod network isolated.VPC flow logs rejection
Commande de Contrôle :
aws logs filter-log-events --log-group-name /vpc/flowlogs --filter-pattern "[..., action=REJECT, ... $TARGET_IP]"État Cible Attendu : All lateral flows originating from instance marked REJECT.
Validation : Verify standard pod-to-pod ingress communication.