evil-winrm 3.3 → 3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +21 -0
- data/CHANGELOG.md +94 -0
- data/CODE_OF_CONDUCT.md +76 -0
- data/CONTRIBUTING.md +22 -0
- data/Dockerfile +64 -0
- data/Gemfile +3 -0
- data/LICENSE +165 -0
- data/README.md +530 -0
- data/bin/evil-winrm +1 -1
- data/{lib/evil-winrm.rb → evil-winrm.rb} +18 -11
- data/resources/evil-winrm_logo.png +0 -0
- metadata +59 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6be773e9a859c1ec758e56edd5649d9ab4946401fcb7be836af797b4dc45fa74
|
4
|
+
data.tar.gz: ba1f49a3d8dd68161d76f3b6836eb435775098a534dcc00338110b7a33d7b9ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a66b6ff33f83106584f84aa4a090cc2859fb373ed85ffcb2a11ed5d77c35ee22486cb983baac350340fc3006810ef5dacdf1917e149cefb77bd115dcb12e4c1
|
7
|
+
data.tar.gz: 5370fb20f60f0bb3db080ddc949a79c95b542c4a657e1a4003d32ba1634bbb98a443f157288a8d06f491478eb5c938c6088249aff5f9b4262444b280e04e658f
|
data/.editorconfig
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#EditorConfig: http://editorconfig.org
|
2
|
+
|
3
|
+
root = true
|
4
|
+
|
5
|
+
[*]
|
6
|
+
charset = utf-8
|
7
|
+
end_of_line = lf
|
8
|
+
insert_final_newline = true
|
9
|
+
|
10
|
+
[*.{rb,md}]
|
11
|
+
indent_style = space
|
12
|
+
indent_size = 4
|
13
|
+
trim_trailing_whitespace = true
|
14
|
+
|
15
|
+
[Gemfile]
|
16
|
+
indent_style = space
|
17
|
+
indent_size = 4
|
18
|
+
|
19
|
+
[Dockerfile]
|
20
|
+
indent_style = space
|
21
|
+
indent_size = 4
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
### 3.4
|
2
|
+
- Added CI files to be used in Github actions for Docker automated building
|
3
|
+
- Improvements on dynamic AMSI bypass
|
4
|
+
- Added gemspec file to repo for gem building
|
5
|
+
|
6
|
+
### 3.3
|
7
|
+
- Fixed missing output messages for Invoke-Binary
|
8
|
+
- Extracted AMSI bypass from menu to avoid menu problems due to M$ AV signatures
|
9
|
+
- Dynamic AMSI bypass implemented to avoid AV signatures
|
10
|
+
|
11
|
+
### 3.2
|
12
|
+
- Fixed minor duplicated code problem
|
13
|
+
- Dockerfile improvements
|
14
|
+
- AMSI bypass update
|
15
|
+
|
16
|
+
### 3.1
|
17
|
+
- Version released just to quick fix ruby dependencies on gem
|
18
|
+
|
19
|
+
### 3.0
|
20
|
+
- Remote files/directories autocomplete feature
|
21
|
+
- Added option to log commands and outputs to a log file (Thanks to Borch Cañavate)
|
22
|
+
|
23
|
+
### 2.4
|
24
|
+
- File permission access error now handled in exception to avoid losing connection
|
25
|
+
- Improvements on bundler installation method
|
26
|
+
- Added spn (Service Principal Names) option param for kerberos auth to set some different than default HTTP
|
27
|
+
- Fixed prompt colors (ANSI)
|
28
|
+
|
29
|
+
### 2.3
|
30
|
+
- Fixed Invoke-Binary arguments
|
31
|
+
- Service function improved, now show privileges over the services
|
32
|
+
|
33
|
+
### 2.2
|
34
|
+
- Added progress bar for file uploads/downloads
|
35
|
+
- New ascii art on menu
|
36
|
+
- Name of Dll loader refactored
|
37
|
+
- Help added to Invoke-Binary
|
38
|
+
- Fixed Invoke-Binary to accept any number of arguments separated by commas
|
39
|
+
|
40
|
+
### 2.1
|
41
|
+
- Fixed required params for certificates auth
|
42
|
+
- Removed trailing spaces for better visualization
|
43
|
+
- Added command line option to disable colors
|
44
|
+
- Improved Windows compatibility
|
45
|
+
- Trap capturing to avoid accidental shell exit on Ctrl+C
|
46
|
+
|
47
|
+
### 2.0
|
48
|
+
- Fix GSSAPI error
|
49
|
+
- Docker support added
|
50
|
+
|
51
|
+
### 1.9
|
52
|
+
- Added AMSI bypass
|
53
|
+
- Fix the ps1 load with large size
|
54
|
+
- Kerberos auth support
|
55
|
+
- Improve upload/download functionality
|
56
|
+
|
57
|
+
### 1.8
|
58
|
+
- Added pass-the-hash feature
|
59
|
+
- Added bundler installation method
|
60
|
+
|
61
|
+
### 1.7
|
62
|
+
- Added x64 compatibility to use Donut payloads
|
63
|
+
|
64
|
+
### 1.6
|
65
|
+
- Added SSL and certificates support
|
66
|
+
- Upload/download messages improved
|
67
|
+
- Updated documentation
|
68
|
+
- Removed scripts and executables dir as mandatory arguments
|
69
|
+
- Added logo
|
70
|
+
|
71
|
+
### 1.5
|
72
|
+
- Refactor to class
|
73
|
+
- Fixed upload/download error
|
74
|
+
- Added help arguments for connection
|
75
|
+
|
76
|
+
### 1.4
|
77
|
+
- Small fixes
|
78
|
+
|
79
|
+
### 1.3
|
80
|
+
- Added colors to shell prompt
|
81
|
+
- Added images to documentation
|
82
|
+
|
83
|
+
### 1.2
|
84
|
+
- Added some validations
|
85
|
+
- Added badges to documentation
|
86
|
+
|
87
|
+
### 1.1
|
88
|
+
- Translation to english
|
89
|
+
- Added first documentation
|
90
|
+
- Added colors for messages
|
91
|
+
- First ruby gem created
|
92
|
+
|
93
|
+
### 1.0
|
94
|
+
- Initial commit
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at oscar.alfonso.diaz@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
Hello, thank you for your interest into contributing to this project. Your help is really appreciated.
|
4
|
+
|
5
|
+
Please note we have a [Code of Conduct], please follow it in all your interactions with the project.
|
6
|
+
|
7
|
+
---
|
8
|
+
|
9
|
+
## Git Workflow Policy
|
10
|
+
|
11
|
+
1. Direct push to [Master] is not allowed.
|
12
|
+
2. Pull Requests to [Master] are not allowed.
|
13
|
+
3. Usually, commits and pull requests should be done on [Dev] branch. If you have any doubt, don't hesitate to ask first.
|
14
|
+
4. Temporary branches may be existing for specific features, be pretty sure that the branch you are going to commit on is the right one. Ask first if you have any doubt.
|
15
|
+
5. Any branch will be finally merged to [Dev], there it will be reviewed and tested deeply before being merged to [Master].
|
16
|
+
6. All merges from [Dev] to [Master] are a new `evil-winrm` release. This merges to [Master] will be performed and reviewed exclusively by the staff.
|
17
|
+
|
18
|
+
---
|
19
|
+
|
20
|
+
[Code of Conduct]: CODE_OF_CONDUCT.md
|
21
|
+
[Master]: https://github.com/Hackplayers/evil-winrm/tree/master
|
22
|
+
[Dev]: https://github.com/Hackplayers/evil-winrm/tree/dev
|
data/Dockerfile
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# Evil-WinRM Dockerfile
|
2
|
+
|
3
|
+
# Base image
|
4
|
+
FROM ruby:latest
|
5
|
+
|
6
|
+
# Credits & Data
|
7
|
+
LABEL \
|
8
|
+
name="Evil-WinRM" \
|
9
|
+
author="CyberVaca <cybervaca@gmail.com>" \
|
10
|
+
maintainer="OscarAkaElvis <oscar.alfonso.diaz@gmail.com>" \
|
11
|
+
description="The ultimate WinRM shell for hacking/pentesting"
|
12
|
+
|
13
|
+
#Env vars
|
14
|
+
ENV EVILWINRM_URL="https://github.com/Hackplayers/evil-winrm.git"
|
15
|
+
|
16
|
+
# Install dependencies
|
17
|
+
RUN gem install \
|
18
|
+
winrm \
|
19
|
+
winrm-fs \
|
20
|
+
stringio \
|
21
|
+
logger \
|
22
|
+
fileutils
|
23
|
+
|
24
|
+
# Create volume for powershell scripts
|
25
|
+
RUN mkdir /ps1_scripts
|
26
|
+
VOLUME /ps1_scripts
|
27
|
+
|
28
|
+
# Create volume for executable files
|
29
|
+
RUN mkdir /exe_files
|
30
|
+
VOLUME /exe_files
|
31
|
+
|
32
|
+
# Create volume for data (upload/download)
|
33
|
+
RUN mkdir /data
|
34
|
+
VOLUME /data
|
35
|
+
|
36
|
+
# Set workdir
|
37
|
+
WORKDIR /opt/
|
38
|
+
|
39
|
+
#Evil-WinRM install method 1 (only one method can be used, other must be commented)
|
40
|
+
#Install Evil-WinRM (Docker Hub automated build process)
|
41
|
+
RUN mkdir evil-winrm
|
42
|
+
COPY . /opt/evil-winrm
|
43
|
+
|
44
|
+
#Evil-WinRM install method 2 (only one method can be used, other must be commented)
|
45
|
+
#Install Evil-WinRM (manual image build)
|
46
|
+
#Uncomment git clone line and one of the ENV vars to select branch (master->latest, dev->beta)
|
47
|
+
#ENV BRANCH="master"
|
48
|
+
#ENV BRANCH="dev"
|
49
|
+
#RUN git clone -b ${BRANCH} ${EVILWINRM_URL}
|
50
|
+
|
51
|
+
# Make script file executable
|
52
|
+
RUN chmod +x evil-winrm/*.rb
|
53
|
+
|
54
|
+
# Clean and remove useless files
|
55
|
+
RUN rm -rf /opt/evil-winrm/resources > /dev/null 2>&1 && \
|
56
|
+
rm -rf /opt/evil-winrm/.github > /dev/null 2>&1 && \
|
57
|
+
rm -rf /opt/evil-winrm/CONTRIBUTING.md > /dev/null 2>&1 && \
|
58
|
+
rm -rf /opt/evil-winrm/CODE_OF_CONDUCT.md > /dev/null 2>&1 && \
|
59
|
+
rm -rf /opt/evil-winrm/Dockerfile > /dev/null 2>&1 && \
|
60
|
+
rm -rf /opt/evil-winrm/Gemfile* > /dev/null 2>&1 && \
|
61
|
+
rm -rf /tmp/* > /dev/null 2>&1
|
62
|
+
|
63
|
+
# Start command (launching Evil-WinRM)
|
64
|
+
ENTRYPOINT ["/opt/evil-winrm/evil-winrm.rb"]
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2
|
+
Version 3, 29 June 2007
|
3
|
+
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
6
|
+
of this license document, but changing it is not allowed.
|
7
|
+
|
8
|
+
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
11
|
+
License, supplemented by the additional permissions listed below.
|
12
|
+
|
13
|
+
0. Additional Definitions.
|
14
|
+
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17
|
+
General Public License.
|
18
|
+
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
20
|
+
other than an Application or a Combined Work as defined below.
|
21
|
+
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
25
|
+
of using an interface provided by the Library.
|
26
|
+
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
28
|
+
Application with the Library. The particular version of the Library
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
30
|
+
Version".
|
31
|
+
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
35
|
+
based on the Application, and not on the Linked Version.
|
36
|
+
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
38
|
+
object code and/or source code for the Application, including any data
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
41
|
+
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
43
|
+
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
46
|
+
|
47
|
+
2. Conveying Modified Versions.
|
48
|
+
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
51
|
+
that uses the facility (other than as an argument passed when the
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
53
|
+
version:
|
54
|
+
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
56
|
+
ensure that, in the event an Application does not supply the
|
57
|
+
function or data, the facility still operates, and performs
|
58
|
+
whatever part of its purpose remains meaningful, or
|
59
|
+
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
61
|
+
this License applicable to that copy.
|
62
|
+
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
64
|
+
|
65
|
+
The object code form of an Application may incorporate material from
|
66
|
+
a header file that is part of the Library. You may convey such object
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
68
|
+
material is not limited to numerical parameters, data structure
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
71
|
+
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
73
|
+
Library is used in it and that the Library and its use are
|
74
|
+
covered by this License.
|
75
|
+
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
77
|
+
document.
|
78
|
+
|
79
|
+
4. Combined Works.
|
80
|
+
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
82
|
+
taken together, effectively do not restrict modification of the
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
85
|
+
the following:
|
86
|
+
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
88
|
+
the Library is used in it and that the Library and its use are
|
89
|
+
covered by this License.
|
90
|
+
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92
|
+
document.
|
93
|
+
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
95
|
+
execution, include the copyright notice for the Library among
|
96
|
+
these notices, as well as a reference directing the user to the
|
97
|
+
copies of the GNU GPL and this license document.
|
98
|
+
|
99
|
+
d) Do one of the following:
|
100
|
+
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
102
|
+
License, and the Corresponding Application Code in a form
|
103
|
+
suitable for, and under terms that permit, the user to
|
104
|
+
recombine or relink the Application with a modified version of
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
107
|
+
Corresponding Source.
|
108
|
+
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
111
|
+
a copy of the Library already present on the user's computer
|
112
|
+
system, and (b) will operate properly with a modified version
|
113
|
+
of the Library that is interface-compatible with the Linked
|
114
|
+
Version.
|
115
|
+
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
117
|
+
be required to provide such information under section 6 of the
|
118
|
+
GNU GPL, and only to the extent that such information is
|
119
|
+
necessary to install and execute a modified version of the
|
120
|
+
Combined Work produced by recombining or relinking the
|
121
|
+
Application with a modified version of the Linked Version. (If
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
126
|
+
for conveying Corresponding Source.)
|
127
|
+
|
128
|
+
5. Combined Libraries.
|
129
|
+
|
130
|
+
You may place library facilities that are a work based on the
|
131
|
+
Library side by side in a single library together with other library
|
132
|
+
facilities that are not Applications and are not covered by this
|
133
|
+
License, and convey such a combined library under terms of your
|
134
|
+
choice, if you do both of the following:
|
135
|
+
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
137
|
+
on the Library, uncombined with any other library facilities,
|
138
|
+
conveyed under the terms of this License.
|
139
|
+
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
141
|
+
is a work based on the Library, and explaining where to find the
|
142
|
+
accompanying uncombined form of the same work.
|
143
|
+
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
145
|
+
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
148
|
+
versions will be similar in spirit to the present version, but may
|
149
|
+
differ in detail to address new problems or concerns.
|
150
|
+
|
151
|
+
Each version is given a distinguishing version number. If the
|
152
|
+
Library as you received it specifies that a certain numbered version
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
154
|
+
applies to it, you have the option of following the terms and
|
155
|
+
conditions either of that published version or of any later version
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
160
|
+
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
164
|
+
permanent authorization for you to choose that version for the
|
165
|
+
Library.
|