Skip to content

Instantly share code, notes, and snippets.

@akagisho
Created December 10, 2015 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akagisho/054effff64838fff733a to your computer and use it in GitHub Desktop.
Save akagisho/054effff64838fff733a to your computer and use it in GitHub Desktop.
OPWD
FROM ubuntu:14.04
MAINTAINER akagisho <akagisho@gmail.com>
# https://gist.github.com/yosshy/cc6c479ac5b1a1ac1774
ENV DEBIAN_FRONTEND noninteractive
RUN mkdir -p /etc/apt /var/run
RUN ln -sf /proc/mounts /etc/mtab
RUN apt-get update
RUN apt-get install --reinstall -y openssh-server python-apt upstart sysvinit-utils
RUN mv /sbin/initctl.distrib /sbin/initctl
RUN useradd -m ubuntu -s /bin/bash
RUN echo ubuntu:ubuntu | chpasswd
RUN echo "ubuntu ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/ubuntu
RUN update-rc.d ssh defaults
RUN echo UseDNS=no >> /etc/ssh/sshd_config
RUN apt-get install -y curl gcc make git iptables inetutils-ping apache2 libapache2-mod-perl2 php5 php5-xdebug
RUN curl -L https://cpanmin.us | perl - --sudo App::cpanminus
RUN cpanm YAML JSON Text::Template Plack::Handler::Apache2
RUN update-rc.d -f apache2 remove
RUN sudo -H -u ubuntu git clone https://github.com/k0u5uk3/obfuscated-php-webshell-detector /home/ubuntu/obfuscated-php-webshell-detector
RUN chmod +x /home/ubuntu/obfuscated-php-webshell-detector/server/run.pl /home/ubuntu/obfuscated-php-webshell-detector/client/obscan.pl
RUN sed -i 's/^SANDBOX_HOST:.*$/SANDBOX_HOST: 127.0.0.1/' /home/ubuntu/obfuscated-php-webshell-detector/settings.yaml
ENV HOME /home/ubuntu
EXPOSE 22 9999
ENTRYPOINT exec /sbin/init --startup-event=failsafe-boot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment