• Stars
    star
    135
  • Rank 269,297 (Top 6 %)
  • Language
    Python
  • Created almost 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Intentionally Vulnerable Serverless Functions to understand the specifics of Serverless Security Vulnerabilities

DVFaaS - Damn Vulnerable Functions as a Service

A DHIY (Deploy and Hack It Yourself) Project that you can deploy and run a bunch of 'orribly insecure functions on AWS Lambda

DVFaas-Logo

Objective and Audiences

  • We at we45 do a lot of training around Serverless Security, Cloud and security of modern web stacks.
  • We strongly believe that there's a great need for developers, architects, DevOps and Security Personnel to learn and understand about the risks with these modern components
  • This project is a culmination of our training efforts in developing intentionally vulnerable Serverless apps (FaaS) that we have decided to open out to the community at large

This project is great for you, if:

  • You want to learn about security flaws with serverless apps, specifically FaaS implementations.

This project is not for you, if:

  • You don't want to deploy (and run) your own functions. The idea here is for you to learn by doing.

Please note:

  • The functions are targeted to be deployed in AWS Lambda. But the principles and concepts apply across the board
  • Most of the functions are in Python, specifically in a framework called chalice (meant for python on AWS Lambda). Deployment of these functions to your lambda environment is reasonably simple
  • Ultimately the project maps to the OWASP Serverless Top 10, found here, but some examples may vary
  • The ops (deployment) for this project is largely done with Terraform. Please find docs here
  • Each example has a README, which has installation instructions, etc. In many cases, the deployment for multiple examples ove

Requirements

Code

  • Python 3.6
  • Pipenv (dependency management)
  • Chalice
  • PyYAML
  • HTTPie
  • AWS CLI with root or high privileges required for deployment/setup of various AWS components
  • jq

AWS Resources

  • RDS => MySQL (Free Tier eligible)
  • DynamoDB (Free Tier Eligible)
  • Amazon SNS (Pub/Sub for Topics)
  • Amazon Lambda, y'know....for functions
  • Amazon Cloudwatch Logs

Disclaimer

Please use in personal/non-production accounts only We do not take responsibility for the way in which any one uses these functions (DVFaaS). We have made the purposes of the application clear and it should not be used maliciously. We have given warnings and taken measures to prevent users from installing DVFaaS on to production accounts. You are responsible for requisite authorizations (if any) that you will need to run this on your AWS account.

Installation and Setup

  • Git clone the project git clone <URL>
  • We are using pipenv to manage dependencies for the project. You can use pipenv install to install all deps
  • Each lab has its own deployment specification. In most cases, there's a specific deployment directory in each lab called ops which is used to manage deployments
  • We highly recommend using httpie as the http client as its command line and really easy to use
  • For some deployments, we are using Terraform to perform deployments and setup AWS IAM Roles and so on.
    • Please note that you'll need to have high/root privileges on AWS with aws cli for all this to work.
  • Currently, for all exercises we are using Chalice (a AWS Lambda framework in Python).
    • All labs have a .chalice folder that is recognized by chalice for the purposes of deployment.
    • For most of the labs, you'll have to configure the .chalice/config.json file to configure the deployment. Please read each lab's README for this info. This will have to be done, post deployment (which is the ops directories where applicable)
    • Once done, deployment is reasonably easy to do, with a simple chalice deploy command which will push your Lambda function to your AWS account:
      • Please note that you'll need to have high/root privileges on AWS with aws cli for all this to work.

TODO

  • Video series explaining deployment and execution of attacks
  • GraphQL Examples
  • NodeJS Examples

More Repositories

1

ThreatPlaybook

A unified DevSecOps Framework that allows you to go from iterative, collaborative Threat Modeling to Application Security Test Orchestration
Python
271
star
2

ZAP-Mini-Workshop

Interactive IPython Notebook to demonstrate OWASP ZAP's API and Scripting Functions - OWASP ZAP 2.8.0
Jupyter Notebook
40
star
3

RoboZap

HTML
32
star
4

orchestron-community

Orchestron is an Application Vulnerability Management and Correlation Tool.Orchestron helps you solve one key problem "Find and fix vulnerabilities early in the lifecycle"
Vue
31
star
5

Vulnerable-Flask-App

Intentionally Vulnerable Flask app for use in Demos
Python
28
star
6

Serverless-Workshop

Serverless Workshop
Python
16
star
7

container_training

Container Security and Serverless Training
Python
13
star
8

defcon26

DEFCON-26 Workshop Lab Exercises
HTML
12
star
9

AppSecEssentials

JavaScript
12
star
10

Gauge-OWASP-ZAP

Example of using Gauge and OWASP ZAP for test automation
Python
10
star
11

AWS-KMS-Tour

AWS KMS Tour for secrets code
Jupyter Notebook
8
star
12

Cut-The-Funds-NodeJS

2018 - Vulnerable App for Demos/Training and Workshops
JavaScript
7
star
13

Robosec

Robot Framework Security Automation Script
HTML
7
star
14

Nightwatch-ZAP

Example of OWASP ZAP Integration with NightwatchJS Test
JavaScript
7
star
15

csp-flask

Python
6
star
16

Automation_Scripts

This directory is a repository of scripts written in Python that helps you automate different aspects of security testing in a testing cycle.
Python
6
star
17

ThreatPlaybook-Example

HTML
6
star
18

RoboBurp2

Robot Framework Library for BurpSuite 2.X
Python
5
star
19

AppSecEngineerCSPIntro

Introduction to Content-Security-Policy
5
star
20

RoboMobSF

Robot Framework Library for MobSF (SAST) Tool
HTML
3
star
21

terraform-check

Repo that uses Checkov with Github Actions as an example
HCL
3
star
22

RoboArachni

Robot Framework Arachni Scanner
Python
3
star
23

OWASP-ZAP-JSON-RPC-Service

Python
2
star
24

RoboBucketeer

Robot Framework Library for Buckteer - S3 Buckets & Subdomain Enumeration
HTML
2
star
25

container_security

2
star
26

RoboPyPipeline

Robot Framework Python Pipeline example
Python
2
star
27

kubernetes-ci

Python
2
star
28

zap-workshop

Jupyter Notebook
2
star
29

djangocon-2018

DjangoCon
RobotFramework
2
star
30

gitlab-pr-scanner

SAST and SCA Scanning tool for Gitlab Merge Requests
Python
2
star
31

ThreatPlaybook-Client

Python
2
star
32

RoboBandit

Robot Framework bindings for Python's Bandit SAST tool
Python
1
star
33

we45-Public-Presentations

Presentations of the we45 Team at various events around the world
1
star
34

xml-files

HTML
1
star
35

RoboDnsRecon

Robot Framework Library for DNS Recon
Python
1
star
36

python-step-functions-example

Python
1
star
37

RoboDepCheck

Robot Framework Library for OWASP Dependency Check
Python
1
star
38

RoboSslyze

Robot Framework Library for Python's SSlyze Library
Python
1
star
39

RoboNpmAudit

Robot Framework Library for NPM Audit Source Composition Analysis
Python
1
star
40

RoboTestSSL

Robot Framework Library for TestSSL
Python
1
star
41

DevSecCon2019

JavaScript
1
star
42

vulnerable_xss

JavaScript
1
star
43

orchy-webhook_burpextender

Burp Extender for Orchestron Webhook
Python
1
star
44

ringpass

Trivially Simple Password/Secrets Manager backed by Keyrings
Go
1
star
45

jenkins-secdevops

RobotFramework
1
star
46

RoboNodeJSScan

Robot Framework Library for NodeJSScan
Python
1
star
47

serverless-training-apps

Python
1
star
48

ThreatPlaybook-ClientV3

Golang client for ThreatPlaybookV3 and above
Go
1
star
49

oss-live-code

RobotFramework
1
star
50

serverless-ci

Python
1
star