-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
300 lines (245 loc) · 12 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Active Inventory Generator for Nmap | Efficient Network Vulnerability Management</title>
<meta name="author" content="juanse77">
<meta name="description" content="Active Inventory Generator for Nmap - Efficiently generate network vulnerability reports in Excel from Nmap scan results. Learn installation, usage, and new features.">
<meta name="keywords" content="Nmap, Active Inventory Generator, network security, vulnerability management, Nmap XML, Excel report, network scan, cybersecurity, installation guide, Nmap script">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://active-inventory-generator.com">
<link rel="icon" type="image/png" href="./static/iconos/icono-96.png">
<meta property="og:title" content="Active Inventory Generator for Nmap">
<meta property="og:description" content="Efficiently generate network vulnerability reports in Excel from Nmap scan results. Learn installation, usage, and new features.">
<meta property="og:image" content="./static/img/inventory2.png">
<meta property="og:url" content="https://active-inventory-generator.com">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Active Inventory Generator for Nmap">
<meta name="twitter:description" content="Efficiently generate network vulnerability reports in Excel from Nmap scan results. Learn installation, usage, and new features.">
<meta name="twitter:image" content="./static/img/inventory2.png">
<meta name="twitter:site" content="@juanseraar77">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Body and Basic Elements */
body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
color: #333;
background: #f4f4f4;
text-align: justify;
}
/* Container */
.container {
max-width: 1000px;
margin: 10px auto;
overflow: hidden;
padding: 10px 20px;
}
h2 {
margin: 20px 0 8px 0;
}
h3 {
margin: 20px 0 8px 0;
}
/* Header */
header {
background: #333;
color: #fff;
padding-top: 30px;
min-height: 70px;
max-width: 1000px;
margin: 0 auto;
}
header a {
color: #fff;
text-decoration: none;
text-transform: uppercase;
font-size: 16px;
}
header ul {
padding: 0;
list-style: none;
}
header li {
float: left;
display: inline;
padding: 0 20px 0 20px;
}
header #branding {
float: left;
}
header #branding h1 {
margin: 0;
}
header nav {
float: right;
margin-top: 10px;
}
/* Showcase */
#showcase {
min-height: 400px;
background: url('showcase.jpg') no-repeat 0 -400px;
text-align: center;
color: #fff;
}
#showcase h1 {
margin-top: 100px;
font-size: 55px;
margin-bottom: 10px;
}
#showcase p {
font-size: 20px;
}
/* Main Content */
main {
padding: 20px;
background: #fff;
}
/* Article */
article {
margin-bottom: 20px;
background: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
/* Footer */
footer {
background: #333;
color: #fff;
text-align: center;
padding: 20px;
margin-top: 20px;
max-width: 1000px;
margin: 0 auto;
}
pre {
display: block;
margin: 15px 0;
padding: 10px 5px;
background-color: #eee;
border: 1px solid black;
border-radius: 5px;
overflow-x: auto;
}
a {
text-decoration: none;
font-weight: bold;
color: black;
}
/* Media Queries */
@media(max-width: 768px) {
header #branding,
header nav,
header nav li {
float: none;
text-align: center;
width: 100%;
}
header nav {
margin-top: 20px;
}
#showcase h1 {
margin-top: 40px;
}
}
</style>
</head>
<body>
<header>
<div class="container">
<div id="branding">
<h1>Active Inventory Generator for Nmap</h1>
</div>
</div>
</header>
<main class="container">
<p>Script designed to generate a report from the nmap execution results. Specifically, the information from the output in nmap XML format is filtered to dump the vulnerabilities found in the scanned network into an Excel file.</p>
<h2>How to use:</h2>
<h3>Installation:</h3>
<p>Firstly, clone the repository in the /opt folder and change the owner of the downloaded folder. Then, you have to change to /opt/active-inventory-generator to continue the installation. Before that, it is recommended to create a virtual environment for installing the script dependencies. A quick way to create a virtual environment can be to use the 'virtualenv' command. Example of use:</p>
<pre><code>cd /opt
sudo git clone https://github.com/juanse77/active-inventory-generator
sudo chown [user]:[group] -R active-inventory-generator
</code></pre>
<pre><code>python -m virtualenv .env</code></pre>
<p>This will create a virtual environment in the '.env' subfolder. Next, the environment must be activated by executing the command:</p>
<pre><code>source ./.env/bin/activate # in Linux</code></pre>
<p>Next, you must install the script dependencies, executing:</p>
<pre><code>python -m pip install -r requirements.txt</code></pre>
<p>For complete installation, you need to edit the ~/.bashrc in shell bash or ~/.zshrc to add the application folder to the PATH. Insert this line to the file:</p>
<pre><code>export PATH=$PATH:/opt/active-inventory-generator</code></pre>
<p>You must run this command to activate the change if you just added the line. This will not be necessary on subsequent system reboots.</p>
<pre><code>source ~/.bashrc # in shell bash
or
source ~/.zshrc # in shell zsh</code></pre>
<p>With this initial configuration you are now ready to run the application.</p>
<h3>Running the application:</h3>
<p>Running the application is as simple as launching the python script by calling the interpreter and passing it an XML file with the results of an nmap scan. For example, as follows:</p>
<pre><code>python active-inventory-generator.py scanned-network.xml excel-file-name.xlsx</code></pre>
<h2>Running with integrated Nmap:</h2>
<p>You can also run the application through the 'extended-nmap.sh' script. This script will execute the nmap command and then the filter script for the xml document generated, and pass it the parameters that you want Nmap to take as input, followed by the name of the excel file that will be generated if all goes well.</p>
<pre><code>sudo chmod +x extended-nmap.sh
# If you are in the application folder and/or the application folder is not in the PATH
./extended-nmap.sh "-Pn -sCV --script vuln --top-ports 100 -iL stored-ips" excel-file-name.xlsx
# If the application folder is in the PATH
extended-nmap.sh "-Pn -sCV --script vuln --top-ports 100 -iL stored-ips" excel-file-name.xlsx</code></pre>
<p>Once the execution is complete, an excel file should have been generated in the same folder from where the script was executed.</p>
<h2>New utilities added in version 2:</h2>
<p>A shell bash script has been modified for sending alerts during the sequential execution of nmap and the active inventory generator steps. During the progress of the execution, messages to Slack and email addresses will be sent.</p>
<h3>How to use:</h3>
<p>For it to work, it is necessary to have a valid file with three environment variables: EMAIL_ADDRESS, EMAIL_PASSWORD, and WEB_HOOK. EMAIL_ADDRESS and EMAIL_PASSWORD have to define a valid Gmail email and its application password of sixteen characters. The WEB_HOOK variable is a URL for the Slack channel to be published. For the script to be executed you need to pass the parameters of the nmap that will be used, the name of the excel file that will be created, and the email or the list of emails you want to send the generated excel file to. For example:</p>
<pre><code>./extended-nmap.sh "-Pn -sCV --script vuln --top-ports 100 -iL stored-ips"
<p>The environment variables will be read from a file called 'environment_vars.env'. An example of that file could be like this:</p>
<pre><code>EMAIL_ADDRESS="[email protected]"
EMAIL_PASSWORD="emirhsalownernjk"
WEB_HOOK="https://hooks.slack.com/services/XXXXXX/XXXXXXXXXXXX"
export EMAIL_ADDRESS
export EMAIL_PASSWORD
export WEB_HOOK</code></pre>
<h3>Deployment with Docker:</h3>
<p>In the project folder there is a script called extended-nmap-docker.sh to run the application using a docker container.
For which, you must first give it execution permissions.</p>
<pre><code>sudo chmod +x extended-nmap-docker.sh</code></pre>
<p>For this script to work, you must have the Docker application installed. When the script is executed,
an image will be created, using the Dockerfile configuration file from the same project folder,
and then a volatile container will be launched that will be responsible for executing the application.</p>
<p>The script accepts the same parameters as the extended-nmap.sh script, and if the PATH has been set correctly,
it will work the same as the original script.</p>
<pre><code># If the application folder is in the PATH
extended-nmap-docker.sh "-Pn -sCV --script vuln --top-ports 100 -iL stored-ips" excel-file-name.xlsx [email protected],[email protected],[email protected]</code></pre>
<h3>
Donate:
</h3>
<p>If you like the tool, please <a href="https://buymeacoffee.com/active.inventory.nmap">support us with a coffee</a> ;D</p>
<h3>Latest Release:</h3>
<p><a id="latest-release-link" href="#" target="_blank" style="text-decoration: none; font-weight: bold;">
Check out the latest release</a>
</p>
<p><a href="https://github.com/juanse77/active-inventory-generator">Follow us in Github</a></p>
</main>
<footer>
<p>Active Inventory Generator © 2024</p>
</footer>
<script>
async function getLatestRelease() {
try {
const response = await fetch('https://api.github.com/repos/juanse77/active-inventory-generator/releases/latest');
const data = await response.json();
const latestReleaseLink = document.getElementById('latest-release-link');
latestReleaseLink.href = data.html_url;
latestReleaseLink.textContent = `Check out the latest release (Active Inventory Generator - ${data.tag_name})`;
} catch (error) {
console.error('Error fetching the latest release:', error);
}
}
window.onload = getLatestRelease;
</script>
</body>
</html>