Big List of Naughty Strings (BLNS)

repository·master·Indexed 13 days ago

https://github.com/minimaxir/big-list-of-naughty-strings

A collection of strings designed to trigger edge cases, errors, or security vulnerabilities in software that accepts user input. Version 1.0.0 provides data in text and JSON formats to help QA engineers and developers test for XSS, SQL injection, command injection, path traversal, and Unicode encoding issues.

Tokens
995
Snippets
2
Records
6
Agent score
100%

What's inside Big List of Naughty Strings

  1. Use the Big List of Naughty Strings for testing

    master
    The Big List of Naughty Strings (BLNS) is a collection of strings that have a high probability of causing issues (such as internal server errors or unexpected behavior) when used as user-input data. It is designed for both automated and manual QA testing to help reveal string-validation issues and edge cases in input handling.
  2. Access naughty strings via text or JSON files

    master

    The project provides two primary file formats for consuming the strings:

    1. blns.txt: A newline-delimited text file. It includes comments preceded by # to divide strings into sections, making it ideal for manual reading and copy-pasting into UI input forms.
    2. blns.json: A JSON file containing an array of all strings. This version has all comments stripped out, making it suitable for programmatic access in automated testing suites.
  3. Get base64 encoded naughty strings with Base64Encoded()

    master

    The Base64Encoded() function returns a slice of strings where each naughty string from the list has been base64 encoded. This is useful for testing systems that decode input before processing it.

    package main
    
    import (
    	"fmt"
    	"github.com/minimaxir/big-list-of-naughty-strings/naughtystrings"
    )
    
    func main() {
    	encodedStrings := naughtystrings.Base64Encoded()
    	for _, s := range encodedStrings {
    		fmt.Println(s)
    	}
    }
  4. Get unencoded naughty strings with Unencoded()

    master

    The Unencoded() function returns a slice of strings containing the raw 'naughty strings' from the list. These strings are intended to be used as test input to identify potential vulnerabilities or edge cases in user input handling.

    package main
    
    import (
    	"fmt"
    	"github.com/minimaxir/big-list-of-naughty-strings/naughtystrings"
    )
    
    func main() {
    	naughtyStrings := naughtystrings.Unencoded()
    	for _, s := range naughtyStrings {
    		fmt.Println(s)
    	}
    }
  5. Use the blns.json data format for naughty string testing

    master

    The blns.json file provides a machine-readable JSON array containing a comprehensive list of 'naughty strings'. These strings are designed to test the robustness of software by targeting common vulnerabilities, edge cases, and unexpected input behaviors.

    Developers can ingest this JSON array directly into their testing frameworks (such as unit tests, fuzzers, or integration tests) to validate how their applications handle:

    • Type confusion: null, undefined, true, false.
    • Numeric edge cases: NaN, Infinity, extremely large integers, and various decimal/scientific notations.
    • XSS (Cross-Site Scripting): <script>alert(123)</script>, various encoded payloads, and event handlers like onfocus.
    • SQL Injection: 1;DROP TABLE users, ' OR 1=1 -- 1.
    • Command Injection: $(touch /tmp/blns.fail), `ls -al /`.
    • Path Traversal: ../../../../../../../../../../../etc/passwd.
    • Unicode/Encoding issues: Zero-width characters, RTL (Right-to-Left) overrides, and complex emoji/symbol combinations.
    • Template Injection: Jinja2/Twig style payloads like {{ "".__class__.__mro__[2]... }}.
    • Social/Cultural edge cases: Profanity, sensitive names, or strings that might trigger unintended filters (the 'Scunthorpe problem').