Generalized Single Packet Authorization for Cloud Computing Environments



Similar documents
Chapter 11 Cloud Application Development

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

Don't Get Owned at DEF CON

Recommended IP Telephony Architecture

Network Security and Firewall 1

Linux Network Security

Network Penetration Testing and Ethical Hacking Scanning/Penetration Testing. SANS Security Sans Mentor: Daryl Fallin

athenahealth Interface Connectivity SSH Implementation Guide

CS 356 Lecture 25 and 26 Operating System Security. Spring 2013

Information Technology Career Cluster Introduction to Cybersecurity Course Number:

How to Grow and Transform your Security Program into the Cloud

Security in IPv6. Basic Security Requirements and Techniques. Confidentiality. Integrity

Firewalls and VPNs. Principles of Information Security, 5th Edition 1

Definition of firewall

Virtual private network. Network security protocols VPN VPN. Instead of a dedicated data link Packets securely sent over a shared network Internet VPN

Network Defense Tools

Executive Summary and Purpose

Network Configuration Settings

Firewalls. Chapter 3

PCI COMPLIANCE ON AWS: HOW TREND MICRO CAN HELP

A SURVEY OF CLOUD COMPUTING: NETWORK BASED ISSUES PERFORMANCE AND ANALYSIS

An Introduction to Cloud Computing Concepts

Appendix A: Configuring Firewalls for a VPN Server Running Windows Server 2003

Vulnerability Assessment and Penetration Testing

Corporate VPN Using Mikrotik Cloud Feature. By SOUMIL GUPTA BHAYA Mikortik Certified Trainer

Guidelines for Website Security and Security Counter Measures for e-e Governance Project

How To Understand A Firewall

Securing the Microsoft Platform on Amazon Web Services

Industrial Network Security for SCADA, Automation, Process Control and PLC Systems. Contents. 1 An Introduction to Industrial Network Security 1

NETWORK SECURITY HACKS

CS 665: Computer System Security. Network Security. Usage environment. Sources of vulnerabilities. Information Assurance Module

INFORMATION SECURITY TRAINING CATALOG (2015)

Implementing Cisco IOS Network Security

z/os Firewall Technology Overview

NETASQ & PCI DSS. Is NETASQ compatible with PCI DSS? NG Firewall version 9

Overview of Network Security The need for network security Desirable security properties Common vulnerabilities Security policy designs

IINS Implementing Cisco Network Security 3.0 (IINS)

CS5008: Internet Computing

Host Hardening. Presented by. Douglas Couch & Nathan Heck Security Analysts for ITaP 1

Firewalls. Chien-Chung Shen

JK0-022 CompTIA Academic/E2C Security+ Certification Exam CompTIA

Internet infrastructure. Prof. dr. ir. André Mariën

Virtual Private Networks

Zorp and KZorp: Integrating Packet Filtering and Userspace proxying

Security Technology: Firewalls and VPNs

Príprava štúdia matematiky a informatiky na FMFI UK v anglickom jazyku

Oracle public Database and Java Cloud for Trials

74% 96 Action Items. Compliance

Evading Infrastructure Security Mohamed Bedewi Penetration Testing Consultant

IPv6 SECURITY. May The Government of the Hong Kong Special Administrative Region

Security vulnerabilities in the Internet and possible solutions

Learn Ethical Hacking, Become a Pentester

Networking for Caribbean Development

Internet Security and Acceleration Server 2000 with Service Pack 1 Audit. An analysis by Foundstone, Inc.

Network Security Using Hybrid Port Knocking

ZEN LOAD BALANCER EE v3.02 DATASHEET The Load Balancing made easy

Track 2 Workshop PacNOG 7 American Samoa. Firewalling and NAT

ΕΠΛ 674: Εργαστήριο 5 Firewalls

IBM. Vulnerability scanning and best practices

ANNEXURE-1 TO THE TENDER ENQUIRY NO.: DPS/AMPU/MIC/1896. Network Security Software Nessus- Technical Details

2016 TÜBİTAK BİLGEM Cyber Security Institute

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

Remote Desktop Gateway. Accessing a Campus Managed Device (Windows Only) from home.

How To Extend Security Policies To Public Clouds

Addressing Security for Hybrid Cloud

Security Considerations White Paper for Cisco Smart Storage 1

Security + Certification (ITSY 1076) Syllabus

Firewalls. CEN 448 Security and Internet Protocols Chapter 20 Firewalls

McAfee Firewall Enterprise System Administration Intel Security Education Services Administration Course

Chapter 6 Configuring the SSL VPN Tunnel Client and Port Forwarding

Network Access Security. Lesson 10

Nessus Agents. October 2015

Licenses are not interchangeable between the ISRs and NGX Series ISRs.

The Evolving Threat Landscape and New Best Practices for SSL

Securing Modern Substations With an Open Standard Network Security Solution. Kevin Leech Schweitzer Engineering Laboratories, Inc.

Network Security. Computer Security & Forensics. Security in Compu5ng, Chapter 7. l Network Defences. l Firewalls. l Demilitarised Zones

Firewalls. Ingress Filtering. Ingress Filtering. Network Security. Firewalls. Access lists Ingress filtering. Egress filtering NAT

Architecture. The DMZ is a portion of a network that separates a purely internal network from an external network.

Decryption. Palo Alto Networks. PAN-OS Administrator s Guide Version 6.0. Copyright Palo Alto Networks

Novell Access Manager SSL Virtual Private Network

Cloud Security Through Threat Modeling. Robert M. Zigweid Director of Services for IOActive

FRONT RUNNER DIPLOMA PROGRAM INFORMATION SECURITY Detailed Course Curriculum Course Duration: 6 months

IPv6 Security Best Practices. Eric Vyncke Distinguished System Engineer

Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.

HughesNet Broadband VPN End-to-End Security Enabled by the HN7700S-R

Lab Objectives & Turn In

Secure Software Programming and Vulnerability Analysis

Description: Objective: Attending students will learn:

IMPLEMENTATION OF INTELLIGENT FIREWALL TO CHECK INTERNET HACKERS THREAT

Nixu SNS Security White Paper May 2007 Version 1.2

Module 8. Network Security. Version 2 CSE IIT, Kharagpur

Topics in Network Security

NETWORK SECURITY (W/LAB) Course Syllabus

2. From a control perspective, the PRIMARY objective of classifying information assets is to:

Transcription:

Generalized Single Packet Authorization for Cloud Computing Environments Michael Rash http://www.cipherdyne.org/ ShmooCon February, 2013 Copyright (C) Michael Rash 2013 1

Agenda Brief Port Knocking / Single Packet Authorization Primer Lengthy demo SPA integrated into Amazon's Cloud General integration points for Cloud providers fwknop-2.5 release HMAC-SHA256 support Where is SPA headed? Copyright (C) Michael Rash 2013 2

PK/SPA Assertion There is a security benefit in service concealment behind a default-drop packet filter + plus a lightweight passive authentication layer (Not a defense for client-side vulnerabilities) Copyright (C) Michael Rash 2013 3

No Shortage of Server Vulns Cisco rsh vuln (HD Moore: Hacking Like It's 1985 ): http://goo.gl/gl6zj (https://community.rapid7.com/community/metasploit/blog...) UPnP vulnerabilities (affecting millions of devices): https://community.rapid7.com/docs/doc-2150 SHODAN enumeration of Internet connected SCADA devices: http://goo.gl/9ozly (https://threatpost.com/en_us/blogs/shodan-search-engine...) Barracuda Networks SSH backdoors (Stefan Viehböck): http://krebsonsecurity.com/2013/01/backdoors-found-in-barracuda-networks-gear/ Copyright (C) Michael Rash 2013 4

Typical PK/SPA Work Flow User wants SSH access behind PK/SPA firewall User executes PK/SPA client Firewall is reconfigured to allow SSH connections from the specified IP PK/SPA packet(s) passively monitored PK/SPA packet(s) never acknowledged in any way SSHD cannot be scanned for Think beyond SSHD Copyright (C) Michael Rash 2013 5

General Goal of fwknop Solve PK limitations while simultaneously retaining its benefits Copyright (C) Michael Rash 2013 6

The fwknop Design Firewall default drop stance for protected services Passive collection of authentication information (libpcap*) Support for Symmetric and Asymmetric ciphers Encrypted and non-replayable SPA packets Do not want anything that trusts an IP in the network layer header Server portable to embedded systems Do not want a heavyweight interpreted language (this is a trade off) Server portable to different firewall architectures and router ACL languages Make sophisticated use of NAT Client portable to everything from Cygwin to the iphone Do not want to require raw socket manipulation of packet headers or admin privileges Minimize library dependencies Copyright (C) Michael Rash 2013 7

Things Aren't Always as They Seem User gains access to NetB from NetA with SPA Attacker: Which system to attack? SPA server can be anywhere on the routing path of an SPA packet not just the SPA destination IP SPA packet source IP can be spoofed too Neither the SPA source nor destination IP matters Copyright (C) Michael Rash 2013 8

Tutorial Single Packet Authorization: A Comprehensive Guide to Strong Service Hardening with fwknop http://www.cipherdyne.org/fwknop/docs/fwknop-tutorial.html Copyright (C) Michael Rash 2013 9

SPA in the Amazon Cloud http://aws.amazon.com/ Copyright (C) Michael Rash 2013 10

Amazon AWS User Agreement...4.2 Other Security and Backup. You are responsible for properly configuring and using the Service Offerings and taking your own steps to maintain appropriate security, protection and backup of Your Content, which may include the use of encryption technology to protect Your Content from unauthorized access and routine archiving Your Content... http://aws.amazon.com/agreement/ Copyright (C) Michael Rash 2013 11

Amazon VPC Networks Copyright (C) Michael Rash 2013 12

The Perfect SPA Use Case Microsoft RDP vulnerability last year (CVE-2012-0002) Full remote code execution potential, although Metasploit only has a DoS module For a time, Cloud provider Windows images were vulnerable Problem: fwknop does not support a Windows firewall Copyright (C) Michael Rash 2013 13

Amazon VPC + SPA Setup Copyright (C) Michael Rash 2013 14

fwknopd Configuration We're going to create an SPA jump host gateway # cat /etc/fwknop/fwknopd.conf PCAP_FILTER udp port 40001; ENABLE_IPT_FORWARDING Y; ENABLE_IPT_LOCAL_NAT Y; ENABLE_IPT_SNAT Y; SNAT_TRANSLATE_IP 10.0.0.12; # cat /etc/fwknop/access.conf SOURCE: ANY; KEY: test1234; FORCE_NAT: 10.0.0.12 22; REQUIRE_SOURCE: Y; SOURCE: ANY; KEY: 1234test; REQUIRE_SOURCE: Y; Copyright (C) Michael Rash 2013 15

Demo (video) Copyright (C) Michael Rash 2013 16

Demo: Key Points Do not have any direct integration with AWS border controls All SPA principles apply Default-drop firewall policy cannot scan for a target Passive packet acquisition SPA packets are never acknowledged Replay detection Temporary firewall reconfiguration for service access Access to any service on any VPC system all through a single routable Elastic IP SPA hardened jump host Sophisticated usage of NAT Accessed hosts don't even need a route to the Internet (DNAT + SNAT usage) Ghost services Scanners only see Apache (or whatever), but SPA allows access to SSHD or any other service iptables SPA NAT rules intercept connections out from under local userspace services fwknop has supported ghost services since the old perl days Copyright (C) Michael Rash 2013 17

Can We Generalize This to Other Cloud Computing Environments? Copyright (C) Michael Rash 2013 18

Some Observations About Amazon Could fully control and configure internal OS images (install software, manipulate firewall rules, etc.) No (apparent) specialized filtering in AWS border ACL Not restricted to accessing VPC hosts with specialized applications controlled by Amazon any application that is compatible with ACL configuration will work The above translates to greater ease of use and deployment for Amazon customers independent of SPA or anything else e.g. it is a good architecture that other Cloud providers will emulate Copyright (C) Michael Rash 2013 19

SPA Integration with Arbitrary Cloud IaaS Providers Useful Cloud infrastructures provide remote access via SSH/RDP/VPN protocol to customizable OS images Universal HTTP/HTTPS for Cloud usage is not generally compatible with SPA Cloud providers usually implement a network ACL capability May or may not be customizable by the user SPA client must communicate in a compatible fashion We don't necessarily need NAT capabilities in the SPA implementation (support less complex cloud environments) IaaS (Infrastructure as a Service) providers are generally SPA-compatible Copyright (C) Michael Rash 2013 20

Cloud Providers Wikipedia currently lists 129 different Cloud providers: http://en.wikipedia.org/wiki/category:cloud_computing_providers Copyright (C) Michael Rash 2013 21

Private Clouds Bare metal owned by a private entity Cloud layer provided by open source or proprietary computing stack SPA is likely compatible in two ways: Integration with raw OS underneath the virtualization layer Integration with guest OS instances (e.g. similar to AWS deployment) Copyright (C) Michael Rash 2013 22

Hybrid Clouds SPA is likely compatible bi-directionally if public portion is compatible Copyright (C) Michael Rash 2013 23

Evaluating Cloud IaaS + SPA Compatibility Copyright (C) Michael Rash 2013 24

Moving Up the Cloud Stack We've shown SPA integrates well with IaaS, but what about PaaS (Platform as a Service) and SaaS (Software as a Service) models? Copyright (C) Michael Rash 2013 25

Moving Up the Cloud Stack (cont'd) SPA PaaS integration to the extent that the base infrastructure is under user control Amazon Elastic Beanstalk SaaS not generally SPA compatible Users do not have infrastructure control Would require massive integration effort, and drastically changes usage model Copyright (C) Michael Rash 2013 26

Amazon Elastic Beanstalk http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/gettingstart ed.walkthrough.html Copyright (C) Michael Rash 2013 27

Specialized Cloud Providers Cloud storage providers (DropBox, Mozy, etc.) Not generally SPA-compatible (SaaS model) Such providers construct purpose-built cloud infrastructure that is accessed through a dedicated client-side application (web browser or custom app) Clouds optimized for computing performance (e.g. Penguin Computing) SPA compatibility likely for IaaS portion SPA not generally a good fit for HPC jobs Copyright (C) Michael Rash 2013 28

Further Research... To what extent are packet filters used within Cloud computing stacks? (Independent of OS packet filters.) This may hint at direct SPA integration with Cloud software Are there natural SPA integration points for distributed computing jobs? If so, is there a security benefit? (Cloud-specific threat modeling.) Are there integration points for admin layers below distributed content distribution services (e.g. Amazon Cloud Front)? Do any major IaaS Cloud providers leverage packet filters in ways that are incompatible with SPA? (Probably not.) Copyright (C) Michael Rash 2013 29

fwknop Development Copyright (C) Michael Rash 2013 30

fwknop-2.5 (coming soon) HMAC-SHA256 HMAC(K,m) = H((K opad) H((K ipad) m)) SPA encrypted message = m HMAC K!= encryption key fwknop uses the encrypt-then-authenticate paradigm SSH uses encrypt-and-mac SSL uses MAC-then-encrypt Has made the Vaudenay and more recent Lucky 13 padding oracle attacks possible IPSEC uses encrypt-then-mac INT-CTXT and IND-CCA2 secure Copyright (C) Michael Rash 2013 31

fwknop Vulnerabilities CVE-2012-4435 Improper IP validation (requires a valid encryption key to exploit) CVE-2012-4436 Client side last processing overflow (local exploit) Fixed since 2.0.3. (Latest release is 2.0.4) CREDIT: Fernando Arnaboldi, IOActive. Additional thanks to Erik Gomez for helping to make this auditing effort possible. Copyright (C) Michael Rash 2013 32

What are we doing about this? Test suite driven valgrind validation Every new commit is tested against a valgrind baseline Lightweight C code helps a lot here SPA packet fuzzer Compile time security options Usage of static analyzers (e.g. splint, Clang static analyzer, etc.) SPA protocol review Copyright (C) Michael Rash 2013 33

SPA Packet Fuzzer Builds encrypted SPA packets with malicious payloads Series of patches against libfko to remove various constraints and validation steps Automatically tested via the test/test fwknop.pl test suite Over 2,000 fuzzing packets currently used in different modes Copyright (C) Michael Rash 2013 34

Test Suite: #./test fwknop.pl [build security] [client] Position Independent Executable (PIE)...pass (3) [build security] [client] stack protected binary...pass (4) [build security] [client] fortify source functions...pass (5) [build security] [client] read only relocations...pass (6) [build security] [client] immediate binding...pass (7) [build security] [server] Position Independent Executable (PIE)...pass (8) [build security] [server] stack protected binary...pass (9) [build security] [server] fortify source functions...pass (10) [build security] [server] read only relocations...pass (11) [build security] [server] immediate binding...pass (12) This is enabled via: gcc fstack protector all fstack protector fpie pie D_FORTIFY_SOURCE=2 Wl, z,relro Wl, z,now Copyright (C) Michael Rash 2013 35

iphone + Android fwknop Clients Copyright (C) Michael Rash 2013 36

The Future of fwknop Mandatory Access Control support via SELinux and/or AppArmor Further cloud computing extensions and integration points Privilege separation Support for libcap-ng UDP listener mode Tunneling mode extensions (DNS, HTTP, SMTP, Tor) Copyright (C) Michael Rash 2013 37

Linux Firewalls 2nd Edition To be released in 2014... Copyright (C) Michael Rash 2013 38

Thank You... The Amazon Security team Damien Stuart developed the original C port Fernando Arnaboldi and Erik Gomez (IOActive) Franck Joncourt (Debian) Sebastien Jeanquier authoritative PK/SPA thesis Sean Greven (FreeBSD port) Vlad Glagolev (OpenBSD port) Copyright (C) Michael Rash 2013 39

Questions? mbr@cipherdyne.org @michaelrash http://www.cipherdyne.org/fwknop/ Slides: http://www.cipherdyne.org/talks/shmoocon_2013_mrash_cloud_spa.pdf http://www.cipherdyne.org/talks/shmoocon_2013_mrash_cloud_spa_demo.mpg4 Copyright (C) Michael Rash 2013 40