-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSingularity
38 lines (34 loc) · 965 Bytes
/
Singularity
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Bootstrap: docker
From: ubuntu:14.04
%labels
MAINTAINER Thibault NORMAND <[email protected]>
%post
APACHE_RUN_GROUP=www-data
APACHE_LOG_DIR=/var/log/apache2
APACHE_LOCK_DIR=/var/run/apache2
APACHE_PID_FILE=/var/run/apache2.pid
APACHE_RUN_DIR=/var/run/apache2
apt-get update && apt-get install -y apache2
mkdir /var/run/apache2
mkdir /var/run/apache2/test
#chmod +x /usr/lib/cgi-bin/shockme.cgi
a2enmod cgid
# Install vulnerable bash
apt-get install -y build-essential wget
wget https://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz && \
tar zxvf bash-4.3.tar.gz && \
cd bash-4.3 && \
./configure && \
make && \
make install
%environment
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_LOG_DIR=/var/log/apache2
export APACHE_LOCK_DIR=/var/run/apache2
export APACHE_PID_FILE=/var/run/apache2.pid
export APACHE_RUN_DIR=/var/run/apache2
%runscript
exec /usr/sbin/apache2 -D FOREGROUND "$@"
%startscript
exec /usr/sbin/apache2 -D FOREGROUND "$@"