forked from Hackplayers/evil-winrm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (41 loc) · 1.26 KB
/
Dockerfile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Evil-WinRM Dockerfile
# Base image
FROM ruby:latest
# Credits & Data
LABEL \
name="Evil-WinRM" \
author="CyberVaca <[email protected]>" \
maintainer="OscarAkaElvis <[email protected]>" \
description="The ultimate WinRM shell for hacking/pentesting"
# Install dependencies
RUN gem install \
winrm \
winrm-fs \
colorize \
stringio
# Create volume for powershell scripts
RUN mkdir /ps1_scripts
VOLUME /ps1_scripts
# Create volume for executable files
RUN mkdir /exe_files
VOLUME /exe_files
# Create volume for data (upload/download)
RUN mkdir /data
VOLUME /data
# Set workdir
WORKDIR /opt/
# Install Evil-WinRM
RUN mkdir evil-winrm
COPY . /opt/evil-winrm
# Make script file executable
RUN chmod +x evil-winrm/*.rb
# Clean and remove useless files
RUN rm -rf /opt/evil-winrm/resources > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/.github > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/CONTRIBUTING.md > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/CODE_OF_CONDUCT.md > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/Dockerfile > /dev/null 2>&1 && \
rm -rf /opt/evil-winrm/Gemfile* > /dev/null 2>&1 && \
rm -rf /tmp/* > /dev/null 2>&1
# Start command (launching Evil-WinRM)
ENTRYPOINT ["/opt/evil-winrm/evil-winrm.rb"]