Skip to content
Go back

Defense In Depth

Concept

For the web app when deployed in the cloud, we want defense in depth. Basically, multiple safeguards at various layers so that attackers have to navigate a labyrinth of defenses.

OSI model

To model the function of a computing or telecom system, there are 7 layers to consider:

  1. Application - The user layer. It manages protocols like HTTP/HTTPS, DNS and FTP.
  1. Presentation

This layer handles data encryption, compression, formatting so the application and understand it.

  1. Session

This layer establishes, manages, and terminates connections (sessions) between local/remote applications

  1. Transport

This layer handles logistics of moving data. TCP and UDP live here.

  1. Network

This layer is the GPS of the internet. THe IP Addresses and figuring out the routing to the address desired.

  1. Data Link

This layer handles data transfer between nodes. MAC addresses and switches

  1. Physical

The physical material itself and its configurations.

Defense Concepts

Identity is one of the primary tool.

IAM

Compartments - You want some organization in your cloud or setup. You have the root compartment which has super access and everything at its disposal.

Paired with identity, policies can provide least privilege to ensure that identities can only access what they need.

DDOS Protection

Consider volumetric attacks, where an attacker will send a ton of packets to your cloud setup. The packets first hit the edge infrastructure (the range of cloud IP addresses and nodes and switches). Typically, this stuff will have its own volumetric analysis and detect an attack and drop packets. If the attack still persists (i.e. high volume but not high enough), the packets get routed to the Internet Gateway of your virtual cloud network. The security lists and network security groups act here to decide what packets get dropped. Then it hits the Network load balancer (NLB) which is a fast checker since it ONLY looks at the 5-tuple (source IP, Destination IP, Protocol, Source Port, Destination Port). In effect, the NLB primarily is the sorter. The load balancer itself is the smart router.

Network security groups, zero trust routing SSL network toplogy layout IAM

Packet Walkthrough

A packet is spawned by the user’s browser to access some web app on the cloud.

  1. It hits the OCI Edge Node as the end server is inside of the OCI network fabric. So the packet will hit the OCI Edge if it is to reach the web app at all.

Edge nodes will run some protections:

You can run it via the edge nodes which will do the compute there OR by default the regional WAF in which the compute is done on the load balancer.

  1. The packet is further subjected to the WAF policy enforced by the load balancer.

This is where the access control rules, the protection control rules, and the rate limiting are validated against.

  1. NSG, ZTR,

  2. Network layout with additional network guards against who can access what.


Share this post on:

Previous Post
Rapid Deployment
Next Post
Web App Design