4837 Total CVEs
26 Years
GitHub
README.md
Rendering markdown...
POC / Makefile
.PHONY: help setup up down logs clean test test-all install

help:
	@echo "CVE-2020-8158 TypeORM Prototype Pollution PoC"
	@echo ""
	@echo "Available commands:"
	@echo "  make setup       - Complete setup (Docker + npm)"
	@echo "  make up          - Start Docker containers"
	@echo "  make down        - Stop Docker containers"
	@echo "  make clean       - Remove containers and volumes"
	@echo "  make logs        - Show Docker logs"
	@echo "  make install     - Install npm dependencies"
	@echo "  make test        - Run vulnerable app demo"
	@echo "  make test-db     - Run database tests"
	@echo "  make test-all    - Run all tests"
	@echo "  make exploit     - Run exploit scenarios"
	@echo "  make patched     - Show patched version"
	@echo ""

setup: up install
	@echo "✓ Setup complete!"
	@echo "Run 'make test-db' to test the vulnerability"

up:
	@echo "Starting Docker containers..."
	docker-compose up -d
	@echo "Waiting for databases to be ready..."
	sleep 10
	@echo "✓ Containers are running"
	@docker-compose ps

down:
	@echo "Stopping Docker containers..."
	docker-compose down

clean:
	@echo "Removing containers and volumes..."
	docker-compose down -v
	@echo "✓ Cleanup complete"

logs:
	docker-compose logs -f

install:
	@echo "Installing npm dependencies..."
	npm install

test:
	@echo "Running vulnerable app demo..."
	npm run vulnerable

exploit:
	@echo "Running exploit scenarios..."
	npm run exploit

patched:
	@echo "Running patched version..."
	npm run patched

test-db:
	@echo "Running database tests..."
	npm run test:db

test-all: test exploit patched test-db
	@echo "✓ All tests complete!"

status:
	docker-compose ps

shell-mongo:
	docker exec -it cve_2020_8158_mongo mongo

shell-mysql:
	docker exec -it cve_2020_8158_mysql mysql -u root -p root test

shell-postgres:
	docker exec -it cve_2020_8158_postgres psql -U root -d test