nightcrawler-mitm 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nightcrawler_mitm-0.3.0/LICENSE +21 -0
- nightcrawler_mitm-0.3.0/PKG-INFO +162 -0
- nightcrawler_mitm-0.3.0/README.md +109 -0
- nightcrawler_mitm-0.3.0/nightcrawler/__init__.py +6 -0
- nightcrawler_mitm-0.3.0/nightcrawler/addon.py +465 -0
- nightcrawler_mitm-0.3.0/nightcrawler/config.py +34 -0
- nightcrawler_mitm-0.3.0/nightcrawler/crawler.py +168 -0
- nightcrawler_mitm-0.3.0/nightcrawler/passive_scanner.py +87 -0
- nightcrawler_mitm-0.3.0/nightcrawler/runner.py +69 -0
- nightcrawler_mitm-0.3.0/nightcrawler/sqli_scanner.py +116 -0
- nightcrawler_mitm-0.3.0/nightcrawler/utils.py +46 -0
- nightcrawler_mitm-0.3.0/nightcrawler/xss_scanner.py +189 -0
- nightcrawler_mitm-0.3.0/nightcrawler_mitm.egg-info/PKG-INFO +162 -0
- nightcrawler_mitm-0.3.0/nightcrawler_mitm.egg-info/SOURCES.txt +18 -0
- nightcrawler_mitm-0.3.0/nightcrawler_mitm.egg-info/dependency_links.txt +1 -0
- nightcrawler_mitm-0.3.0/nightcrawler_mitm.egg-info/entry_points.txt +2 -0
- nightcrawler_mitm-0.3.0/nightcrawler_mitm.egg-info/requires.txt +3 -0
- nightcrawler_mitm-0.3.0/nightcrawler_mitm.egg-info/top_level.txt +1 -0
- nightcrawler_mitm-0.3.0/pyproject.toml +56 -0
- nightcrawler_mitm-0.3.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Paolo Perego - paolo@codiceinsicuro.it
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nightcrawler-mitm
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: A mitmproxy addon for background passive analysis, crawling, and basic active scanning.
|
|
5
|
+
Author-email: Paolo Perego <paolo@codiceinsicuro.it>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2020 Paolo Perego - paolo@codiceinsicuro.it
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/thesp0nge/nightcrawler-mitm
|
|
29
|
+
Project-URL: Repository, https://github.com/thesp0nge/nightcrawler-mitm
|
|
30
|
+
Project-URL: Bug Tracker, https://github.com/thesp0nge/nightcrawler-mitm/issues
|
|
31
|
+
Keywords: mitmproxy,security,scanner,proxy,pentest,xss,sqli,crawler,addon
|
|
32
|
+
Classifier: Development Status :: 4 - Beta
|
|
33
|
+
Classifier: Environment :: Console
|
|
34
|
+
Classifier: Intended Audience :: Developers
|
|
35
|
+
Classifier: Intended Audience :: Information Technology
|
|
36
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
37
|
+
Classifier: Operating System :: OS Independent
|
|
38
|
+
Classifier: Programming Language :: Python :: 3
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
41
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
43
|
+
Classifier: Topic :: Internet :: Proxy Servers
|
|
44
|
+
Classifier: Topic :: Security
|
|
45
|
+
Classifier: Topic :: Software Development :: Testing
|
|
46
|
+
Requires-Python: >=3.9
|
|
47
|
+
Description-Content-Type: text/markdown
|
|
48
|
+
License-File: LICENSE
|
|
49
|
+
Requires-Dist: mitmproxy>=10.0.0
|
|
50
|
+
Requires-Dist: httpx>=0.25.0
|
|
51
|
+
Requires-Dist: beautifulsoup4>=4.10.0
|
|
52
|
+
Dynamic: license-file
|
|
53
|
+
|
|
54
|
+
# nightcrawler-mitm
|
|
55
|
+
|
|
56
|
+
A mitmproxy addon for background passive analysis, crawling, and basic active
|
|
57
|
+
scanning, designed as a security researcher's sidekick.
|
|
58
|
+
|
|
59
|
+
**WARNING: Beta Stage - Use with caution, especially active scanning features**
|
|
60
|
+
|
|
61
|
+
## FEATURES
|
|
62
|
+
|
|
63
|
+
- Acts as an HTTP/HTTPS proxy.
|
|
64
|
+
- Performs passive analysis (security headers, cookie attributes, basic info
|
|
65
|
+
disclosure).
|
|
66
|
+
- Crawls the target application to discover new endpoints based on visited
|
|
67
|
+
pages.
|
|
68
|
+
- Runs basic active scans for low-hanging fruit (Reflected XSS, basic SQLi -
|
|
69
|
+
Error/Time-based) in the background.
|
|
70
|
+
- All output and logs are directed to the console.
|
|
71
|
+
- Target scope is configurable via command-line argument.
|
|
72
|
+
|
|
73
|
+
## INSTALLATION
|
|
74
|
+
|
|
75
|
+
You can install `nightcrawler` directly from PyPI using pip:
|
|
76
|
+
|
|
77
|
+
pip install nightcrawler-mitm
|
|
78
|
+
|
|
79
|
+
It's recommended to install it in a virtual environment.
|
|
80
|
+
|
|
81
|
+
## USAGE
|
|
82
|
+
|
|
83
|
+
Once installed, a new command `nightcrawler` becomes available. This command
|
|
84
|
+
wraps `mitmdump`, automatically loading the nightcrawler addon. You MUST specify
|
|
85
|
+
the target scope using the `--nc-scope` option.
|
|
86
|
+
|
|
87
|
+
You can pass any other valid `mitmdump` arguments to the `nightcrawler` command.
|
|
88
|
+
|
|
89
|
+
1. Configure your Browser/Client: Set your browser (or system) to use 127.0.0.1
|
|
90
|
+
on port 8080 (or the port you specify using -p) as its HTTP and HTTPS proxy.
|
|
91
|
+
|
|
92
|
+
2. Install Mitmproxy CA Certificate: For HTTPS interception, ensure the
|
|
93
|
+
mitmproxy CA certificate is installed and trusted in your browser/system.
|
|
94
|
+
While the proxy is running, visit <http://mitm.it> and follow the
|
|
95
|
+
instructions.
|
|
96
|
+
|
|
97
|
+
3. Run Nightcrawler:
|
|
98
|
+
|
|
99
|
+
- Specify Target Scope (REQUIRED!): nightcrawler --nc-scope example.com
|
|
100
|
+
|
|
101
|
+
- Multiple domains (comma-separated, no spaces): nightcrawler --nc-scope
|
|
102
|
+
example.com,sub.example.com,another.net
|
|
103
|
+
|
|
104
|
+
- Common Options: (Specify port and scope) nightcrawler -p 8081 --nc-scope
|
|
105
|
+
example.com
|
|
106
|
+
|
|
107
|
+
(Disable upstream certificate verification + scope - USE WITH CAUTION!)
|
|
108
|
+
nightcrawler --ssl-insecure --nc-scope internal-site.local
|
|
109
|
+
|
|
110
|
+
(Increase verbosity + scope - Use -v for DEBUG logs) nightcrawler -v
|
|
111
|
+
--nc-scope example.com
|
|
112
|
+
|
|
113
|
+
(Combine options) nightcrawler -p 8080 --ssl-insecure -v --nc-scope
|
|
114
|
+
dev.example.com
|
|
115
|
+
|
|
116
|
+
NOTE: If --nc-scope is not provided, Nightcrawler will run but will not
|
|
117
|
+
process any requests.
|
|
118
|
+
|
|
119
|
+
4. Browse: Start Browse the target application(s) specified in the scope. Output
|
|
120
|
+
from passive analysis, crawling, and active scans will appear in the terminal
|
|
121
|
+
where `nightcrawler` is running. Look for [Passive Scan], [CRAWLER
|
|
122
|
+
DISCOVERY],
|
|
123
|
+
[SQLi FOUND?], [XSS FOUND?] messages.
|
|
124
|
+
|
|
125
|
+
## CONFIGURATION
|
|
126
|
+
|
|
127
|
+
- Target Scope (Required): Set via the `--nc-scope` command-line argument
|
|
128
|
+
(comma-separated domains).
|
|
129
|
+
|
|
130
|
+
- Other Settings: Max concurrency (MAX_CONCURRENT_SCANS) and User-Agent
|
|
131
|
+
(USER_AGENT) are currently defined in the `nightcrawler/config.py` file within
|
|
132
|
+
the installed package. Modifying these requires editing the installed file
|
|
133
|
+
(future versions may use command-line options or a separate config file). You
|
|
134
|
+
can find the installation location using `pip show nightcrawler-mitm`.
|
|
135
|
+
|
|
136
|
+
## LIMITATIONS
|
|
137
|
+
|
|
138
|
+
- Basic Active Scans: The SQLi and XSS scanners are very basic and intended only
|
|
139
|
+
for obvious low-hanging fruit. They CANNOT detect complex vulnerabilities
|
|
140
|
+
(e.g., Stored XSS, blind SQLi beyond time-based, DOM XSS, template injection,
|
|
141
|
+
etc.). DO NOT rely solely on this tool for comprehensive vulnerability
|
|
142
|
+
assessment.
|
|
143
|
+
|
|
144
|
+
- Stored XSS: The current XSS scanner only checks for immediate reflection and
|
|
145
|
+
CANNOT detect Stored XSS.
|
|
146
|
+
|
|
147
|
+
- Resource Usage: Background crawling and scanning can consume significant
|
|
148
|
+
network bandwidth, CPU, and memory resources. Adjust MAX_CONCURRENT_SCANS in
|
|
149
|
+
`config.py` if needed.
|
|
150
|
+
|
|
151
|
+
- False Positives/Negatives: Expect potential false positives (especially from
|
|
152
|
+
passive checks or simple XSS reflection) and many false negatives
|
|
153
|
+
(vulnerabilities missed by the basic scanners).
|
|
154
|
+
|
|
155
|
+
## LICENSE
|
|
156
|
+
|
|
157
|
+
This project is licensed under the [MIT License]. See the LICENSE file for details.
|
|
158
|
+
|
|
159
|
+
## CONTRIBUTING (Optional)
|
|
160
|
+
|
|
161
|
+
Contributions are welcome! Please open an issue or submit a pull request on the
|
|
162
|
+
GitHub repository: [https://github.com/thesp0nge/nightcrawler-mitm]
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# nightcrawler-mitm
|
|
2
|
+
|
|
3
|
+
A mitmproxy addon for background passive analysis, crawling, and basic active
|
|
4
|
+
scanning, designed as a security researcher's sidekick.
|
|
5
|
+
|
|
6
|
+
**WARNING: Beta Stage - Use with caution, especially active scanning features**
|
|
7
|
+
|
|
8
|
+
## FEATURES
|
|
9
|
+
|
|
10
|
+
- Acts as an HTTP/HTTPS proxy.
|
|
11
|
+
- Performs passive analysis (security headers, cookie attributes, basic info
|
|
12
|
+
disclosure).
|
|
13
|
+
- Crawls the target application to discover new endpoints based on visited
|
|
14
|
+
pages.
|
|
15
|
+
- Runs basic active scans for low-hanging fruit (Reflected XSS, basic SQLi -
|
|
16
|
+
Error/Time-based) in the background.
|
|
17
|
+
- All output and logs are directed to the console.
|
|
18
|
+
- Target scope is configurable via command-line argument.
|
|
19
|
+
|
|
20
|
+
## INSTALLATION
|
|
21
|
+
|
|
22
|
+
You can install `nightcrawler` directly from PyPI using pip:
|
|
23
|
+
|
|
24
|
+
pip install nightcrawler-mitm
|
|
25
|
+
|
|
26
|
+
It's recommended to install it in a virtual environment.
|
|
27
|
+
|
|
28
|
+
## USAGE
|
|
29
|
+
|
|
30
|
+
Once installed, a new command `nightcrawler` becomes available. This command
|
|
31
|
+
wraps `mitmdump`, automatically loading the nightcrawler addon. You MUST specify
|
|
32
|
+
the target scope using the `--nc-scope` option.
|
|
33
|
+
|
|
34
|
+
You can pass any other valid `mitmdump` arguments to the `nightcrawler` command.
|
|
35
|
+
|
|
36
|
+
1. Configure your Browser/Client: Set your browser (or system) to use 127.0.0.1
|
|
37
|
+
on port 8080 (or the port you specify using -p) as its HTTP and HTTPS proxy.
|
|
38
|
+
|
|
39
|
+
2. Install Mitmproxy CA Certificate: For HTTPS interception, ensure the
|
|
40
|
+
mitmproxy CA certificate is installed and trusted in your browser/system.
|
|
41
|
+
While the proxy is running, visit <http://mitm.it> and follow the
|
|
42
|
+
instructions.
|
|
43
|
+
|
|
44
|
+
3. Run Nightcrawler:
|
|
45
|
+
|
|
46
|
+
- Specify Target Scope (REQUIRED!): nightcrawler --nc-scope example.com
|
|
47
|
+
|
|
48
|
+
- Multiple domains (comma-separated, no spaces): nightcrawler --nc-scope
|
|
49
|
+
example.com,sub.example.com,another.net
|
|
50
|
+
|
|
51
|
+
- Common Options: (Specify port and scope) nightcrawler -p 8081 --nc-scope
|
|
52
|
+
example.com
|
|
53
|
+
|
|
54
|
+
(Disable upstream certificate verification + scope - USE WITH CAUTION!)
|
|
55
|
+
nightcrawler --ssl-insecure --nc-scope internal-site.local
|
|
56
|
+
|
|
57
|
+
(Increase verbosity + scope - Use -v for DEBUG logs) nightcrawler -v
|
|
58
|
+
--nc-scope example.com
|
|
59
|
+
|
|
60
|
+
(Combine options) nightcrawler -p 8080 --ssl-insecure -v --nc-scope
|
|
61
|
+
dev.example.com
|
|
62
|
+
|
|
63
|
+
NOTE: If --nc-scope is not provided, Nightcrawler will run but will not
|
|
64
|
+
process any requests.
|
|
65
|
+
|
|
66
|
+
4. Browse: Start Browse the target application(s) specified in the scope. Output
|
|
67
|
+
from passive analysis, crawling, and active scans will appear in the terminal
|
|
68
|
+
where `nightcrawler` is running. Look for [Passive Scan], [CRAWLER
|
|
69
|
+
DISCOVERY],
|
|
70
|
+
[SQLi FOUND?], [XSS FOUND?] messages.
|
|
71
|
+
|
|
72
|
+
## CONFIGURATION
|
|
73
|
+
|
|
74
|
+
- Target Scope (Required): Set via the `--nc-scope` command-line argument
|
|
75
|
+
(comma-separated domains).
|
|
76
|
+
|
|
77
|
+
- Other Settings: Max concurrency (MAX_CONCURRENT_SCANS) and User-Agent
|
|
78
|
+
(USER_AGENT) are currently defined in the `nightcrawler/config.py` file within
|
|
79
|
+
the installed package. Modifying these requires editing the installed file
|
|
80
|
+
(future versions may use command-line options or a separate config file). You
|
|
81
|
+
can find the installation location using `pip show nightcrawler-mitm`.
|
|
82
|
+
|
|
83
|
+
## LIMITATIONS
|
|
84
|
+
|
|
85
|
+
- Basic Active Scans: The SQLi and XSS scanners are very basic and intended only
|
|
86
|
+
for obvious low-hanging fruit. They CANNOT detect complex vulnerabilities
|
|
87
|
+
(e.g., Stored XSS, blind SQLi beyond time-based, DOM XSS, template injection,
|
|
88
|
+
etc.). DO NOT rely solely on this tool for comprehensive vulnerability
|
|
89
|
+
assessment.
|
|
90
|
+
|
|
91
|
+
- Stored XSS: The current XSS scanner only checks for immediate reflection and
|
|
92
|
+
CANNOT detect Stored XSS.
|
|
93
|
+
|
|
94
|
+
- Resource Usage: Background crawling and scanning can consume significant
|
|
95
|
+
network bandwidth, CPU, and memory resources. Adjust MAX_CONCURRENT_SCANS in
|
|
96
|
+
`config.py` if needed.
|
|
97
|
+
|
|
98
|
+
- False Positives/Negatives: Expect potential false positives (especially from
|
|
99
|
+
passive checks or simple XSS reflection) and many false negatives
|
|
100
|
+
(vulnerabilities missed by the basic scanners).
|
|
101
|
+
|
|
102
|
+
## LICENSE
|
|
103
|
+
|
|
104
|
+
This project is licensed under the [MIT License]. See the LICENSE file for details.
|
|
105
|
+
|
|
106
|
+
## CONTRIBUTING (Optional)
|
|
107
|
+
|
|
108
|
+
Contributions are welcome! Please open an issue or submit a pull request on the
|
|
109
|
+
GitHub repository: [https://github.com/thesp0nge/nightcrawler-mitm]
|