summaryrefslogtreecommitdiff
path: root/python-credslayer.spec
blob: 97be0e99e925e194dbd10d52a49e66a219ae7db1 (plain)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
%global _empty_manifest_terminate_build 0
Name:		python-CredSLayer
Version:	0.1.3
Release:	1
Summary:	Extract credentials and other useful info from network captures
License:	GPLv3
URL:		https://github.com/ShellCode33/CredSLayer
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/df/2f/79f0439679766d6a0a03488df06313f0d625afc9734e35cecfcbc52457b2/CredSLayer-0.1.3.tar.gz
BuildArch:	noarch

Requires:	python3-pyshark

%description
# CredSLayer

![alt python_version](https://img.shields.io/badge/python-3.5+-informational.svg?style=for-the-badge)
![alt tests_coverage](https://img.shields.io/badge/tests%20coverage-94%25-success.svg?style=for-the-badge)
[![alt documentation](https://img.shields.io/badge/documentation-critical.svg?style=for-the-badge)](https://shellcode33.github.io/CredSLayer/)

CredSLayer goal is to look for credentials and other useful stuff in network captures. Two modes are available, pcap scanning and active processing. The latest listens for packets on a chosen interface and dynamically extracts everything it can.

This tool has been heavily inspired by [Pcredz](https://github.com/lgandx/PCredz) and [net-creds](https://github.com/DanMcInerney/net-creds) but is built with extensibility in mind.
Pcredz and net-creds are great, but they are really hard to maintain and improve.
Unlike these tools which are using regex and raw bytes parsing, CredSLayer takes advantage of Wireshark dissectors which have proven over time to be pretty accurate and reliable.
It makes it really easy to add support for new protocols.


This tool can be really helpful if you're doing IT security or if you want to scan your own network to see if anything critical is transmitted.

![alt credslayer_output_example](https://github.com/ShellCode33/CredSLayer/raw/master/docs/example.png)

# Features

CredSLayer doesn't waste your time with invalid credentials, it makes sure credentials are valid.
Yet if it's not able to tell whether they're valid or not, what has been found will be printed out anyway. 

Right now, CredSLayer supports the following protocols:
* FTP
* SMTP / IMAP / POP3
* Telnet
* HTTP
* LDAP
* SNMP
* MySQL / PostgreSQL
* NTLMSSP
* Kerberos coming soon...

It is also able to look for email addresses and credit card numbers.

**Note:** To prevent false positives and performance issues, tshark (the Wireshark underlying engine) identifies protocols based on port numbers to know which dissector to use on which packets. A few protocols however have heuristic analysis to guess the protocol on different ports than the usual ones (such as HTTP). See the [limitation chapter](https://shellcode33.github.io/CredSLayer/getting-started/limitations.html) in the documentation. To address this issue, CredSLayer has a `--map` parameter, it enables you to map a (range of) port(s) to a specific protocol. This way you will be able to sniff credentials going to a specific service on a specific port you are aware of.

# Install

You need `tshark` installed and Python >= 3.5. On some distribution tshark in shipped within the `wireshark` package. 

Then simply install using :

```
$ pip install credslayer
```

I recommend you use a [virtualenv](https://docs.python.org/3/library/venv.html) to prevent conflicts.

# Usage

```
$ credslayer -h
usage: credslayer [-h] [-l INTERFACE] [-s {enable,disable}] [-f IP]
                     [-m PORT:PROTOCOL] [--debug]
                     [pcapfiles [pcapfiles ...]]

Helps you find credentials and other interesting stuff in network captures

positional arguments:
  pcapfiles             pcap files you want to analyse.

optional arguments:
  -h, --help            show this help message and exit
  -l INTERFACE, --listen INTERFACE
                        start active processing on specified interface
  -s {enable,disable}, --string-inspection {enable,disable}
                        let you specify if you want to look for interesting
                        strings (email addresses, credit cards, ...) in
                        network captures. Pretty heavy on the CPU. Enabled by
                        default on pcap files, disabled on live captures.
  -f IP, --filter IP    only show packets involving the specified IP.
  -m PORT:PROTOCOL, --map PORT:PROTOCOL
                        map a port to a protocol
  --debug               put CredSLayer and pyshark in debug mode.
```

# Get involved

Thanks to Wireshark dissectors, it's really easy to write new protocols support, you're welcome to contribute !

Contributing doesn't necessarily mean writing code. You can simply contribute by opening new issues on Github if you spot any bug or if you would like to see something added to the tool.

To learn how to create support for a new protocol, head over to the [documentation](https://shellcode33.github.io/CredSLayer/contribute/create-parser.html).

# Credits

* CredSLayer is based on [pyshark](https://github.com/KimiNewt/pyshark), a tshark Python wrapper

* Wireshark for their [pcaps](https://wiki.wireshark.org/SampleCaptures)

* [moloch](https://github.com/aol/moloch) for their [pcaps](https://github.com/aol/moloch/tree/master/tests/pcap)

* [asecuritysite](https://asecuritysite.com) for their [pcaps](https://asecuritysite.com/forensics/pcap)




%package -n python3-CredSLayer
Summary:	Extract credentials and other useful info from network captures
Provides:	python-CredSLayer
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-CredSLayer
# CredSLayer

![alt python_version](https://img.shields.io/badge/python-3.5+-informational.svg?style=for-the-badge)
![alt tests_coverage](https://img.shields.io/badge/tests%20coverage-94%25-success.svg?style=for-the-badge)
[![alt documentation](https://img.shields.io/badge/documentation-critical.svg?style=for-the-badge)](https://shellcode33.github.io/CredSLayer/)

CredSLayer goal is to look for credentials and other useful stuff in network captures. Two modes are available, pcap scanning and active processing. The latest listens for packets on a chosen interface and dynamically extracts everything it can.

This tool has been heavily inspired by [Pcredz](https://github.com/lgandx/PCredz) and [net-creds](https://github.com/DanMcInerney/net-creds) but is built with extensibility in mind.
Pcredz and net-creds are great, but they are really hard to maintain and improve.
Unlike these tools which are using regex and raw bytes parsing, CredSLayer takes advantage of Wireshark dissectors which have proven over time to be pretty accurate and reliable.
It makes it really easy to add support for new protocols.


This tool can be really helpful if you're doing IT security or if you want to scan your own network to see if anything critical is transmitted.

![alt credslayer_output_example](https://github.com/ShellCode33/CredSLayer/raw/master/docs/example.png)

# Features

CredSLayer doesn't waste your time with invalid credentials, it makes sure credentials are valid.
Yet if it's not able to tell whether they're valid or not, what has been found will be printed out anyway. 

Right now, CredSLayer supports the following protocols:
* FTP
* SMTP / IMAP / POP3
* Telnet
* HTTP
* LDAP
* SNMP
* MySQL / PostgreSQL
* NTLMSSP
* Kerberos coming soon...

It is also able to look for email addresses and credit card numbers.

**Note:** To prevent false positives and performance issues, tshark (the Wireshark underlying engine) identifies protocols based on port numbers to know which dissector to use on which packets. A few protocols however have heuristic analysis to guess the protocol on different ports than the usual ones (such as HTTP). See the [limitation chapter](https://shellcode33.github.io/CredSLayer/getting-started/limitations.html) in the documentation. To address this issue, CredSLayer has a `--map` parameter, it enables you to map a (range of) port(s) to a specific protocol. This way you will be able to sniff credentials going to a specific service on a specific port you are aware of.

# Install

You need `tshark` installed and Python >= 3.5. On some distribution tshark in shipped within the `wireshark` package. 

Then simply install using :

```
$ pip install credslayer
```

I recommend you use a [virtualenv](https://docs.python.org/3/library/venv.html) to prevent conflicts.

# Usage

```
$ credslayer -h
usage: credslayer [-h] [-l INTERFACE] [-s {enable,disable}] [-f IP]
                     [-m PORT:PROTOCOL] [--debug]
                     [pcapfiles [pcapfiles ...]]

Helps you find credentials and other interesting stuff in network captures

positional arguments:
  pcapfiles             pcap files you want to analyse.

optional arguments:
  -h, --help            show this help message and exit
  -l INTERFACE, --listen INTERFACE
                        start active processing on specified interface
  -s {enable,disable}, --string-inspection {enable,disable}
                        let you specify if you want to look for interesting
                        strings (email addresses, credit cards, ...) in
                        network captures. Pretty heavy on the CPU. Enabled by
                        default on pcap files, disabled on live captures.
  -f IP, --filter IP    only show packets involving the specified IP.
  -m PORT:PROTOCOL, --map PORT:PROTOCOL
                        map a port to a protocol
  --debug               put CredSLayer and pyshark in debug mode.
```

# Get involved

Thanks to Wireshark dissectors, it's really easy to write new protocols support, you're welcome to contribute !

Contributing doesn't necessarily mean writing code. You can simply contribute by opening new issues on Github if you spot any bug or if you would like to see something added to the tool.

To learn how to create support for a new protocol, head over to the [documentation](https://shellcode33.github.io/CredSLayer/contribute/create-parser.html).

# Credits

* CredSLayer is based on [pyshark](https://github.com/KimiNewt/pyshark), a tshark Python wrapper

* Wireshark for their [pcaps](https://wiki.wireshark.org/SampleCaptures)

* [moloch](https://github.com/aol/moloch) for their [pcaps](https://github.com/aol/moloch/tree/master/tests/pcap)

* [asecuritysite](https://asecuritysite.com) for their [pcaps](https://asecuritysite.com/forensics/pcap)




%package help
Summary:	Development documents and examples for CredSLayer
Provides:	python3-CredSLayer-doc
%description help
# CredSLayer

![alt python_version](https://img.shields.io/badge/python-3.5+-informational.svg?style=for-the-badge)
![alt tests_coverage](https://img.shields.io/badge/tests%20coverage-94%25-success.svg?style=for-the-badge)
[![alt documentation](https://img.shields.io/badge/documentation-critical.svg?style=for-the-badge)](https://shellcode33.github.io/CredSLayer/)

CredSLayer goal is to look for credentials and other useful stuff in network captures. Two modes are available, pcap scanning and active processing. The latest listens for packets on a chosen interface and dynamically extracts everything it can.

This tool has been heavily inspired by [Pcredz](https://github.com/lgandx/PCredz) and [net-creds](https://github.com/DanMcInerney/net-creds) but is built with extensibility in mind.
Pcredz and net-creds are great, but they are really hard to maintain and improve.
Unlike these tools which are using regex and raw bytes parsing, CredSLayer takes advantage of Wireshark dissectors which have proven over time to be pretty accurate and reliable.
It makes it really easy to add support for new protocols.


This tool can be really helpful if you're doing IT security or if you want to scan your own network to see if anything critical is transmitted.

![alt credslayer_output_example](https://github.com/ShellCode33/CredSLayer/raw/master/docs/example.png)

# Features

CredSLayer doesn't waste your time with invalid credentials, it makes sure credentials are valid.
Yet if it's not able to tell whether they're valid or not, what has been found will be printed out anyway. 

Right now, CredSLayer supports the following protocols:
* FTP
* SMTP / IMAP / POP3
* Telnet
* HTTP
* LDAP
* SNMP
* MySQL / PostgreSQL
* NTLMSSP
* Kerberos coming soon...

It is also able to look for email addresses and credit card numbers.

**Note:** To prevent false positives and performance issues, tshark (the Wireshark underlying engine) identifies protocols based on port numbers to know which dissector to use on which packets. A few protocols however have heuristic analysis to guess the protocol on different ports than the usual ones (such as HTTP). See the [limitation chapter](https://shellcode33.github.io/CredSLayer/getting-started/limitations.html) in the documentation. To address this issue, CredSLayer has a `--map` parameter, it enables you to map a (range of) port(s) to a specific protocol. This way you will be able to sniff credentials going to a specific service on a specific port you are aware of.

# Install

You need `tshark` installed and Python >= 3.5. On some distribution tshark in shipped within the `wireshark` package. 

Then simply install using :

```
$ pip install credslayer
```

I recommend you use a [virtualenv](https://docs.python.org/3/library/venv.html) to prevent conflicts.

# Usage

```
$ credslayer -h
usage: credslayer [-h] [-l INTERFACE] [-s {enable,disable}] [-f IP]
                     [-m PORT:PROTOCOL] [--debug]
                     [pcapfiles [pcapfiles ...]]

Helps you find credentials and other interesting stuff in network captures

positional arguments:
  pcapfiles             pcap files you want to analyse.

optional arguments:
  -h, --help            show this help message and exit
  -l INTERFACE, --listen INTERFACE
                        start active processing on specified interface
  -s {enable,disable}, --string-inspection {enable,disable}
                        let you specify if you want to look for interesting
                        strings (email addresses, credit cards, ...) in
                        network captures. Pretty heavy on the CPU. Enabled by
                        default on pcap files, disabled on live captures.
  -f IP, --filter IP    only show packets involving the specified IP.
  -m PORT:PROTOCOL, --map PORT:PROTOCOL
                        map a port to a protocol
  --debug               put CredSLayer and pyshark in debug mode.
```

# Get involved

Thanks to Wireshark dissectors, it's really easy to write new protocols support, you're welcome to contribute !

Contributing doesn't necessarily mean writing code. You can simply contribute by opening new issues on Github if you spot any bug or if you would like to see something added to the tool.

To learn how to create support for a new protocol, head over to the [documentation](https://shellcode33.github.io/CredSLayer/contribute/create-parser.html).

# Credits

* CredSLayer is based on [pyshark](https://github.com/KimiNewt/pyshark), a tshark Python wrapper

* Wireshark for their [pcaps](https://wiki.wireshark.org/SampleCaptures)

* [moloch](https://github.com/aol/moloch) for their [pcaps](https://github.com/aol/moloch/tree/master/tests/pcap)

* [asecuritysite](https://asecuritysite.com) for their [pcaps](https://asecuritysite.com/forensics/pcap)




%prep
%autosetup -n CredSLayer-0.1.3

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-CredSLayer -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Fri Apr 07 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.3-1
- Package Spec generated