GithubHelp home page GithubHelp logo

waf-demo's Introduction

To run the demo

  1. create ec2 instance in aws, and using the ec2_init.sh script as user data in aws
  2. create a security group with inbound HTTP traffic on port 80 from anywhere
  3. create a target group with ec2 instance as a target, listening on port 3000
  4. create a ALB in your VPC, configure the ALB to use the security group and listen on HTTPS and routes traffic to the target group you created.
  5. associate your ALB with the web ACL, and configure the rules on web ACL

SQL Injection Vulnerability in Web Application

Demo an attacker exploits a vulnerable web application login functionality through SQL injection.

The App's Vulnerability

The application accepts user input for username and password during login. This input is directly embedded into a SQL query without proper validation or sanitization. An attacker can leverage this by injecting malicious code into the input fields.

The Attack:

The attacker injects the following query as username and password: SQL

' OR '1'='1

XSS Injection Vulnerability in Web Application

Demo a scenario where an attacker exploits a DOM-based XSS vulnerability in a web application's comment section.

The App's Vulnerability:

The application directly inserts user input into the HTML without proper sanitization. This allows attackers to inject malicious scripts that execute in the victim's browser.

The Attack:

The attacker injects the following script into the comment field:

<img src="x" onerror="alert('malicious content can be added here')">

waf-demo's People

Contributors

jackythesmurf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.