Skip to content

Commit 1fe4760

Browse files
authored
Merge pull request #47 from Bornunique911/patch-1
Update README.md
2 parents b79ead5 + 115613b commit 1fe4760

File tree

1 file changed

+31
-23
lines changed

1 file changed

+31
-23
lines changed

README.md

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,17 @@ If you use the tool: Don't use it for illegal purposes.
4444

4545
## Run
4646
An example run could look like that:
47-
```$ enum4linux-ng.py -As <target> -oY out```
47+
```console
48+
enum4linux-ng.py -As <target> -oY out
49+
```
4850

4951
### Demo
5052
#### Windows Server 2012 R2
5153
This demonstrates a run against Windows Server 2012 R2 standard installation. The following command is being used:
5254

53-
```enum4linux-ng.py 192.168.125.131 -u Tester -p 'Start123!' -oY out```
55+
```console
56+
enum4linux-ng.py 192.168.125.131 -u Tester -p 'Start123!' -oY out
57+
```
5458

5559
A user 'Tester' with password 'Start123!' was created. Firewall access was allowed. Once the enumeration is finished, I scroll up so that the results become more clear. Since no other enumeration option is specified, the tool will assume ```-A``` which behaves similar to enum4linux ```-a``` option. User and password are passed in. The ```-oY``` option will export all enumerated data as YAML file for further processing in ```out.yaml```. The tool automatically detects at the beginning that LDAP is not running on the remote host. It will therefore skip any further LDAP checks which would normally be part of the default enumeration.
5660

@@ -59,14 +63,16 @@ A user 'Tester' with password 'Start123!' was created. Firewall access was allow
5963
#### Metasploitable 2
6064
The second demo shows a run against Metasploitable 2. The following command is being used:
6165

62-
```enum4linux-ng.py 192.168.125.145 -A -C```
66+
```console
67+
enum4linux-ng.py 192.168.125.145 -A -C
68+
```
6369

6470
This time the ```-A``` and ```-C``` option are used. While the first one behaves similar to enum4linux ```-a``` option, the second one will enable enumeration of services. This time no credentials were provided. The tool automatically detects that it needs to use SMBv1. No YAML or JSON file is being written. Again I scroll up so that the results become more clear.
6571

6672
![Demo](https://github.com/cddmp/misc/blob/master/screencasts/enum4linux-ng/demo2.gif)
6773

6874
### Usage
69-
```
75+
```console
7076
usage: enum4linux-ng.py [-h] [-A] [-As] [-U] [-G] [-Gm] [-S] [-C] [-P] [-O] [-L] [-I] [-R [BULK_SIZE]] [-N] [-w DOMAIN] [-u USER]
7177
[-p PW | -K TICKET_FILE | -H NTHASH] [--local-auth] [-d] [-k USERS] [-r RANGES] [-s SHARES_FILE] [-t TIMEOUT] [-v] [--keep]
7278
[-oJ OUT_JSON_FILE | -oY OUT_YAML_FILE | -oA OUT_FILE]
@@ -121,18 +127,18 @@ There are multiple ways to install the tool. Either the tool comes as a package
121127

122128
### Kali Linux
123129
```console
124-
# apt install enum4linux-ng
130+
apt install enum4linux-ng
125131
```
126132

127133
### Archstrike
128134
```console
129-
# pacman -S enum4linux-ng
135+
pacman -S enum4linux-ng
130136
```
131137

132138
### NixOS
133139
(tested on NixOS 20.9)
134140
```console
135-
$ nix-env -iA nixos.enum4linux-ng
141+
nix-env -iA nixos.enum4linux-ng
136142
```
137143

138144
## Manual Installation
@@ -162,62 +168,64 @@ For all distribution examples below, LibYAML is already a dependency of the corr
162168
#### ArchLinux
163169

164170
```console
165-
# pacman -S smbclient python-ldap3 python-yaml impacket
171+
pacman -S smbclient python-ldap3 python-yaml impacket
166172
```
167173
#### Fedora/CentOS/RHEL
168174
(tested on Fedora Workstation 31)
169175

170176
```console
171-
# dnf install samba-common-tools samba-client python3-ldap3 python3-pyyaml python3-impacket
177+
dnf install samba-common-tools samba-client python3-ldap3 python3-pyyaml python3-impacket
172178
```
173179

174180
#### Debian/Ubuntu/Linux Mint
175181
(For Ubuntu 18.04 or below use the Docker or Python virtual environment variant)
176182

177183
```console
178-
# apt install smbclient python3-ldap3 python3-yaml python3-impacket
184+
apt install smbclient python3-ldap3 python3-yaml python3-impacket
179185
```
180186

181187
### Linux distribution-agnostic
182188
#### Python pip
183189
Depending on the Linux distribution either `pip3` or `pip` is needed:
184190

185191
```console
186-
$ pip install pyyaml ldap3 impacket
192+
pip install pyyaml ldap3 impacket
187193
```
188194

189195
Alternative:
190196

191197
```console
192-
$ pip install -r requirements.txt
198+
pip install -r requirements.txt
193199
```
194200

195201
Remember you need to still install the samba tools as mentioned above.
196202

197203
#### Python virtual environment
198204
```console
199-
$ git clone https://github.com/cddmp/enum4linux-ng
200-
$ cd enum4linux-ng
201-
$ python3 -m venv venv
202-
$ source venv/bin/activate
203-
$ pip install wheel
204-
$ pip install -r requirements.txt
205+
git clone https://github.com/cddmp/enum4linux-ng
206+
cd enum4linux-ng
207+
python3 -m venv venv
208+
source venv/bin/activate
209+
pip install wheel
210+
pip install -r requirements.txt
205211
```
206212
Then run via:
207213

208-
```python3 enum4linux-ng.py -As <target>```
214+
```console
215+
python3 enum4linux-ng.py -As <target>
216+
```
209217

210218
Remember you need to still install the samba tools as mentioned above. In addition, make sure you run ```source venv/bin/activate``` everytime you spawn a new shell. Otherwise the wrong Python interpreter with the wrong libraries will be used (your system one rather than the virtual environment one).
211219

212220
#### Docker
213221
```console
214-
$ git clone https://github.com/cddmp/enum4linux-ng
215-
$ cd enum4linux-ng
216-
$ docker build . --tag enum4linux-ng
222+
git clone https://github.com/cddmp/enum4linux-ng
223+
cd enum4linux-ng
224+
docker build . --tag enum4linux-ng
217225
```
218226
Once finished an example run could look like this:
219227
```console
220-
$ docker run -t enum4linux-ng -As <target>
228+
docker run -t enum4linux-ng -As <target>
221229
```
222230
## Contribution and Support
223231
Occassionally, the tool will spit out error messages like this:

0 commit comments

Comments
 (0)