AWS Security - Best Practices (in light of a recent breach)

As of the date that I am creating this, the (actual) details have not been released regarding the 2019 Recent breach involving a WAF exploitation and S3 exfiltration.

A particular thread I had reviewed indicated that a 3rd-party WAF was exploited, which implies that it was likely to have been running on an EC2 instance.  This EC2 instance "metadata service" was then exploited by that WAF appliance software.

I think there are several potential opportunities to improve the security posture..

  • IAM
  • SCPs
  • Security Groups
  • S3 access policy


  • defense in depth
  • least privilege



One thing that was a concern to me,;preventing access to the "metadata service" (from a host with Internet access), I would like to explore the impact of the following:

iptables -A OUTPUT -m owner ! --uid-owner root -d 169.254.169.254 -j DROP

I was initially surprised to learn that VPC Flow Logs do not capture the traffic destined for the instance metadata endpoint (but then realized, that is not a VPC communication - makes sense).
https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html
Flow logs do not capture all IP traffic. The following types of traffic are not logged:
  • Traffic generated by instances when they contact the Amazon DNS server. If you use your own DNS server, then all traffic to that DNS server is logged.
  • Traffic generated by a Windows instance for Amazon Windows license activation.
  • Traffic to and from 169.254.169.254 for instance metadata.

References:

Comments

Popular posts from this blog

Apple OSX Catalina and VMware vCenter Server Appliance.. ugh

HomeLab - Sophos XG SSL VPN and Comcast

Software RAID via kickstart (not cloud, sorry)