EC2 Security Groups act as virtual firewalls that manage inbound and outbound traffic rules for one or more EC2 instances. Typically, you will find that traffic to specific ports on an instance are white-listed to another IP range or Security Groups. All access is denied by default and access can be granted by creating new rules. As attackers, we can't bypass Security Group rules, but that doesn't mean that our access is completely blocked.
All we need to do is add our own Security Group rule to the target Security Groups. It will ideally be a rule that allows traffic from our IP address/range to a set of ports on the instances that the Security Group applies to. You might think that you want to just whitelist access for all ports (0-65535) and all protocols (TCP, UDP, and so on), but in general this is a bad idea because of some very...