Skip to content

This is a sample application which runs an HTTP web server and allows to read and write files and exec commands

License

Notifications You must be signed in to change notification settings

francesco-racciatti/security-playground

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Security Playground

last commit licence docker pulls

The security playground is an HTTP web server to simulate security breaches. It allows you to read, write, and execute commands in a containerized environment.

Installation

Deploy the docker image in your environment.

$ docker run --rm -p 8080:8080 sysdiglabs/security-playground

Setup the health check to the /health endpoint if required.

Usage

The HTTP API exposes tree endpoints to interact with the system.

Reading a file

You can read a file using just the URL.

$ curl localhost:8080/etc/shadow

This will return the content of the /etc/shadow file.

Writing a file

You can write to a file using the URL and POSTing the content.

$ curl -X POST localhost:8080/bin/hello -d 'content=hello-world'

This will write to /bin/hello the hello-world string

Executing a command

You can execute a command using the /exec endpoint and POSTing the command.

$ curl -X POST localhost:8080/exec -d 'command=ls -la'

This will capture and return the STDOUT of the executed command.

About

This is a sample application which runs an HTTP web server and allows to read and write files and exec commands

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 63.6%
  • Dockerfile 14.2%
  • Makefile 11.4%
  • Shell 10.8%