I heard many people saying that they need not worry about security of their application (or it is automatically PCI compliant) just because the application is hosted in AWS EC2.
This was presented in AWS meetup to make it clear to audience that security is shared responsibility. While AWS takes care of security at L1 & L2 and provide tools for L3 & L4, we need to take care of security at L7 (Application layer)
2. Letās Know Each Other
ā¢ Do you work with AWS?
ā¢ Do you manage applications?
ā¢ What are your goals while managing application?
ā¢ Happy Users, Happy You (DevOps), Happy Servers
2@akshaymathu
3. Akshay Mathur
ā¢ 16+ years in IT industry
ā¢ Currently Product Manager at Appcito
ā¢ Mostly worked with Startups
ā¢ From Conceptualization to Stabilization
ā¢ At different functions i.e. development, testing, release, marketing, devops
ā¢ With multiple technologies
ā¢ Founding Team Member of
ā¢ ShopSocially (Enabling āsocialā for retailers)
ā¢ AirTight Neworks (Global leader of WIPS)
@akshaymathu 3
4. Ground Rules
ā¢ Tweet now: #AWS @akshaymathu @appcito @AWSStartups
ā¢ Disturb Everyone later
ā¢ Not by phone rings
ā¢ Not by local talks
ā¢ By more information
@akshaymathu 4
5. When an Application is Secure
ā¢ Controlled Access to Application
ā¢ Legitimate users are able to use the
application
ā¢ Illegitimate users are not able to use
the application
ā¢ No disruption of the service
ā¢ Resilient infrastructure
ā¢ Prevention from attacks
ā¢ Secure Data
ā¢ Secure communication
ā¢ Secure storage
@akshaymathu 5
7. Shared Responsibility of Security in Cloud
@akshaymathu 7
Donāt worry! AWS is there We need to take care of this
Not to worry! AWS is providing tools
8. Share Responsibility of Security in Cloud
@akshaymathu 8
Donāt worry! AWS is there
Understand the worries and
manage with the help of
partners
Not to worry! AWS is
providing tools
12. What AWS takes care
ā¢ AWS manages the security of the following assets:
ā¢ Global facilities (regions, availability zones, edge locations)
ā¢ Access to data centres
ā¢ Physical security of hardware (compute and storage)
ā¢ Network infrastructure
ā¢ Attacks at layer 2
ā¢ Virtualization infrastructure
@akshaymathu 12
20. Security Groups
ā¢ Security groups are like IP firewall
ā¢ Configure and attach proper security
group at every level (VPC, Subnet,
Instance etc.)
ā¢ Create both inbound as outbound
rules
ā¢ Close all not-in-use ports
ā¢ Use Bastion Host for managing
infrastructure
@akshaymathu 20
22. Top 10 AWS Security Best Practices
ā¢ Disable root API access key and secret key
ā¢ Enable MFA tokens everywhere
ā¢ Reduce number of IAM users with Admin rights
ā¢ Use Roles for EC2
ā¢ Least privilege: limit what IAM entities can do with
strong/explicit policies
ā¢ Rotate all the keys regularly
ā¢ Use AWS Key Management System and store keys in CloudHSM
ā¢ Use IAM roles with STS Assume Role where possible
ā¢ Use Auto Scaling to dampen DDoS effects
ā¢ Do not allow 0.0.0.0/0 in any EC2/ELB security group unless
you mean it
ā¢ Watch world-readable/listable S3 bucket policies
@akshaymathu 22
23. Think before you Do
ā¢ Do not share access and secret keys
with anyone
ā¢ Watch if the access credentials are
part of the code you are sharing
@akshaymathu 23
26. Share Responsibility of Security in Cloud
@akshaymathu 26
Understand the worries and
manage with the help of
partners
27. Our Responsibility in AWS
ā¢ Customer are responsible for the security of the following assets:
ā¢ Software
ā¢ Operating systems
ā¢ Applications (servers, frameworks, tools)
ā¢ Data and Access
ā¢ Data (in transit as well as at rest)
ā¢ Credentials
ā¢ Policies and configuration
ā¢ Application layer attacks
ā¢ OWASP top 10 (XSS, SQL injection etc.)
ā¢ DoS and DDoS
ā¢ Malware
ā¢ BOTs and BOTNets
@akshaymathu 27
28. Securing Software
ā¢ Start with known good base AMI
ā¢ Pick LTS OS versions
ā¢ Select a reliable provider
ā¢ Pay attention to the software you install
ā¢ Web/App Servers
ā¢ Runtime environments
ā¢ Libraries
ā¢ Avoid installing development environment
ā¢ Apply patches regularly
ā¢ Write good code
ā¢ Do not introduce vulnerability
ā¢ Scan and Fix regularly
@akshaymathu 28
29. Securing Data and Policies
ā¢ Data in transit
ā¢ Implement SSL for all communication
ā¢ Over the internet
ā¢ Within AWS network
ā¢ Implement access policies
ā¢ For users
ā¢ For applications
ā¢ For resources
ā¢ Data at rest
ā¢ Store encrypted data everywhere
ā¢ S3
ā¢ EBS
@akshaymathu 29
30. Avoiding BOT Traffic
ā¢ Traffic from bad BOTs is about 30%
ā¢ Amounts to 30% wastage of server
resources
ā¢ Various fingerprinting techniques
are there for identifying the BOTs
ā¢ IP reputation
ā¢ UA analysis
ā¢ Pattern analysis
ā¢ JS insertion
ā¢ Advance algorithms
@akshaymathu 30
31. Preventing Data Theft
ā¢ Typical ways are:
ā¢ SQL/object injection
ā¢ Cross Site Scripting (XSS)
ā¢ File include
ā¢ Malware inclusion
ā¢ Exploiting vulnerabilities of coding, framework,
language, platform
ā¢ Scan the deployment regularly
ā¢ Fix any vulnerability by applying patches
ā¢ Use elastic Web Application Firewall (WAF)
@akshaymathu 31
32. Preventing DDoS Attack
ā¢ Volumetric attack
ā¢ Many clients make connections with
server
ā¢ Clients send huge traffic to the server
ā¢ Traffic is typically bogus
ā¢ Prevention
ā¢ Rapidly increase scale to consume
connections/traffic
ā¢ Rate limit connections/requests
ā¢ Delay/Deny bogus traffic
ā¢ Blacklist BAD clients
ā¢ Protocol exploits
ā¢ Attacker crafts traffic knowing the
timeouts and limits of protocol
ā¢ Slow moving bogus traffic hogs
resources of server
ā¢ Prevention
ā¢ Setup policy to apply aggressive limits
and timeouts in case of heavy load
ā¢ Terminate connection when unusual
behavior is observed
ā¢ Blacklist BAD client
@akshaymathu 32
37. Application Front-End Architecture
CDN
Custom Scripts, Rules, Alert Management Aggregation across instances
ā¢ Spaghetti of point solutions
ā¢ Multiple points of failure, redundancy difficult to setup
ā¢ Not elastic and cloud native
@akshaymathu 37
38. Application Front-End Architecture with CAFE
CDN
ā¢ All services for application under one consolidated product
ā¢ Easy Activation of capabilities closer to application
ā¢ Application policy is coordinated across services and policy enforced
@akshaymathu 38
Availability Security Performance Continuous
Deployment
Appcito Cloud Application Front-End (CAFE)
42. Deployment with CAFE
Customerās Cloud
Customerās
End Users
app
server
app
server
Load
Balancer
app
server
Appcito Cloud
CAFE Barista
Management, Control, Analytics
DNS
CAFE
PEP
Network Subnet
Availability Zone
43. Purpose-Built Cloud Native Architecture
ā¢ Scalable architecture decouples control plane
(BARISTA) and data plane (PEP)
ā¢ BARISTA provides centralized policy control,
visibility and analytics.
ā¢ PEP (Policy Execution Proxy) provides full
proxy services for applications
ā¢ Traffic Management / Load balancing
ā¢ Application Visibility & Analytics
ā¢ Application Security
ā¢ System is DevOps Friendly
ā¢ API Driven & Programmable
ā¢ Integrates with DevOps tools & Processes
@akshaymathu 43
44. CAFE Configuration Model
ā¢ Think Out of the box (literally)
ā¢ Think in terms of
ā¢ Applications
ā¢ Traffic flow
ā¢ Request patterns
ā¢ Forget about
ā¢ Box provisioning
ā¢ Box configuration
ā¢ Networking flow
ā¢ L2/L3 access control
@akshaymathu 44
45. Application-Level Security
Web Application
Firewall (WAF)
ā¢ Protects against common attack vectors
ā¢ SQL Injection
ā¢ Cross-Site Scripting (XSS)
ā¢ Local and Remote File Includes
ā¢ One-click protection for popular web applications
ā¢ WordPress
ā¢ Joomla
ā¢ Drupal
DDoS & BOT Mitigation
ā¢ Maximize availability, even during attacks
ā¢ Minimize impact on cloud computing resources
ā¢ Analyze attack events with comprehensive metrics
ā¢ osCommerce
ā¢ vBulletin
ā¢ Microsoft SharePoint