Skip to content

Commit

Permalink
Add the initial files for the User example
Browse files Browse the repository at this point in the history
[refs #5f494dd1073b]
  • Loading branch information
jfahrer committed May 5, 2018
1 parent 33d2958 commit e56e28f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions user/Dockerfile
@@ -0,0 +1,9 @@
FROM alpine:latest

RUN mkdir /data \
&& touch /data/secrets \
&& chmod 700 /data/secrets

COPY evil-script.sh /

CMD ["/evil-script.sh"]
8 changes: 8 additions & 0 deletions user/docker-compose.yml
@@ -0,0 +1,8 @@
version: "3"

services:
app:
build:
context: .
volumes:
- ./evil-script.sh:/evil-script.sh
5 changes: 5 additions & 0 deletions user/evil-script.sh
@@ -0,0 +1,5 @@
#!/bin/sh
echo This script runs as `whoami`
echo Trying to gain access to sensitive information in /data/secrets
cat /data/secrets > /dev/null && echo "Successfully opened the file! Posting stolen secrets on social media platforms..."

0 comments on commit e56e28f

Please sign in to comment.