Coder Social home page Coder Social logo

webtester0 / reverse-proxy-waf Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 123 KB

Prototype of reverse proxy web application firewall with vulnerable web server

JavaScript 74.38% CSS 5.24% Dockerfile 0.87% Pug 19.52%
waf xss xss-detection web-application-firewall

reverse-proxy-waf's Introduction

Reverse proxy web application firewall prototype

waf.js is a reverse proxy web application firewall (WAF).

This WAF is built by using Node.js. Technically the WAF connects to the destination server by providing IP and Port of destination.

The WAF intercepts the incoming traffic,detects and prevent XSS.

It's main goals are to demonstrate well known application security methods and algorithms implemented on a server-side of web application.

waf.js it's just a prototype and must not be used in production.

Description

Features

Detect and block the most popular server-side web attack such as reflected and stored XSS.

Set X-XSS-Protection header to 1 for browser protection.

Enviroment

It's a prototype of WAF and mock of vulnerable web server.

Web server is a XSS vulnerable server built by using Node.js and Express. The user can attack the server with Reflected and Stored XSS. This server uses mongo DB to store user data.

So you can test the efficiency and perfomance of working this WAF.

In directory reverse_proxy_waf you can find the sanityTest.js and run it by using this command casperjs test sanityTest.js.

Installation

git clone https://github.com/webtester0/reverse-proxy-waf.git
cd reverse_proxy_waf/
npm i
cd mock_server/
npm i

Usage

To start reverse-proxy-waf use commands below and it will run on http://localhost:3001:

cd reverse_proxy_waf/
node waf.js 

To start vulnerable web server use commands below and express server will run on http://localhost:3000:

cd mock_server/
cd bin/
node www

Examples

Reflected XSS

In browser URL bar:

Reflected XSS detected by WAF:

Stored XSS

Execution a persistent XSS by injecting a script inside request body.

Stored XSS detected by WAF:

reverse-proxy-waf's People

Contributors

webtester0 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

openainext

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.