yahoo/webseclab

Name: webseclab

Owner: Yahoo Inc.

Description: set of web security test cases and a toolkit to construct new ones

Created: 2015-01-30 15:39:52.0

Updated: 2018-05-11 05:02:07.0

Pushed: 2018-01-05 21:53:24.0

Homepage:

Size: 168

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Webseclab

Build Status GoDoc

Webseclab contains a sample set of web security test cases and a toolkit to construct new ones. It can be used for testing security scanners, to replicate or reconstruct issues, or to help with investigations or discussions of particular types of web security bugs.

Install

If you don't have Go installed yet, grab the latest stable version from https://golang.org/dl/ and install following instructions on https://golang.org/doc/install.

Set GOPATH environment variable as described in http://golang.org/doc/code.html#GOPATH - for example export GOPATH=$HOME/go. (You may wish to add $GOPATH/go/bin to your PATH.) Then run:

$ go get github.com/yahoo/webseclab/...
Run
ATH/bin/webseclab [-http=:8080]

or simply `webseclab` if $GOPATH/bin is in your PATH.

Run webseclab -help to view the options.

Webseclab Tests

In all tests, excepts where specially mentioned, the attack input is assumed to be placed in the “in” CGI variable: <url>?in=<attack_string>. See the index page for PoEs (proof of exploits).

Reflected XSS DOM XSS
Modifying Tests

When modifying, adding or deleting any tests, you need to rerun `go generate`.

For most of the tests, you need to add a template that contains the “moustache” with {{.In}}.

To add a new test where input is echoed unfiltered, just drop an html template under templates directory (for example templates/xss/newfile) with the template containing the {{.In}} placeholder.

To add a new “filter-based” case, add a template as above and add a mapping of the corresponding entrypoint (such as /xss/newfile ) to the map in the filterMap function in custom.go. For example:

 a test with the corresponding input filtering.  See filters.go for the list of the available filters.

dd a new fully custom testcase, add a template (if needed),
a mapping of the entrypoint to the handling function to CustomMap in custom.go and implement the custom function with the signature: func(http.ResponseWriter, *http.Request).  For example, for a test case with XSS injection through the Morse code, you could add:  

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.