Coder Social home page Coder Social logo

sql-injection-lab's Introduction

sql-injection-lab

This is a bare bones document viewer used to practice SQL injections.

This application features a simple document viewer, that takes a user's 'security code' and returns all documents tagged with that code.

Warning

This application contains intentional SQL injection vulnerabilities.

Note

This will be reused across CTFs on February 18th, 2024 and March 23rd, 2024 (and maybe more).

Screenshot

image

Run locally

  1. Install templ and Go.
  2. templ generate 
    go run main.go 

Project Overview

This website contains a single webpage that takes a secret "security code", and returns all documents with that security code.

It is intended to illustrate a simplistic example of how SQL injections can be used to extract more information from databases. Pedagogically, the "security code" is an example of passwords, usernames, or any other text input that may be intended to constrain a query.

Note

Usage of ./sql-injection-lab:
 -ip string
   	The ip address to listen and serve HTTP on (default "localhost")
 -port int
   	The port to listen and serve HTTP on (default 8080)
 -seedPath string
   	The path to the SQL script with seed data;
   	The script will be executed on server initalization (default "./example_seed.sql")

For example,

go run main.go -seedPath='/your/path/here'

Tech Stack

Technology Used for
Go Programming language
templ HTML Templating
Chroma SQL syntax highlighting
slog Structured Logging
go-sqlite3 Database Driver
SQLite3 Minimal Database
Tailwind CSS CSS Framework

This project intentionally does not include user sessions or account management to limit scope. All URL paths are treated equally. The page is intended to interact well with Burp Suite.

sql-injection-lab's People

Contributors

zsarge 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.