Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d159890

Browse files
authoredSep 25, 2023
Merge pull request #51 from cisagov/feature/update-readme
update: readme
2 parents b45f133 + ebbf315 commit d159890

File tree

3 files changed

+84
-206
lines changed

3 files changed

+84
-206
lines changed
 

‎README.md

Lines changed: 83 additions & 205 deletions
Original file line numberDiff line numberDiff line change
@@ -1,242 +1,118 @@
1-
# NAVV
1+
# NAVV #
22

3-
The **NAVV** (**N**etwork **A**rchitecture **V**erification and **V**alidation) tool creates a spreadsheet for network traffic analysis from PCAP data and Zeek logs, automating Zeek analysis of PCAP files, the collation of Zeek logs and the dissection of `conn.log` and `dns.log` to create a summary or network traffic in an XLSX-formatted spreadsheet. After manually updating the spreadsheet with names and color codes for network segments (by CIDR-formatted address groups) and hosts (by IP address), running the tool again will integrate these labels and color coding into the spreadsheet to aid in conducting an evaluation of the network traffic.
3+
The **NAVV** (**N**etwork **A**rchitecture **V**erification and **V**alidation) tool creates a spreadsheet for network traffic analysis from PCAP data and Zeek logs, automating Zeek analysis of PCAP files and the collation of Zeek logs to create a summary or network traffic in an XLSX-formatted spreadsheet. After manually updating the spreadsheet with names and color codes for network segments (by CIDR-formatted address groups) and hosts (by IP address), running the tool again will integrate these labels and color coding into the spreadsheet to aid in conducting an evaluation of the network traffic.
44

5+
* [Requirements](#Requirements)
56
* [Installation](#Installation)
6-
* [Latest release](#InstallLatest)
7-
* [Directly using `git`](#InstallGit)
8-
* [External dependencies](#ExternalDeps)
9-
* [Building and packaging](#Packaging)
7+
* [Development](#Development)
8+
* [Production](#Production)
109
* [Usage](#Usage)
11-
* [Running NAVV](#Running)
12-
* [Identifying network segments and hosts](#Analysis)
10+
* [CLI](#CLI)
11+
* [Browser](#Browser)
12+
* [Analysis](#Analysis)
1313
* [Docker](#Docker)
14-
* [Copyright](#Footer)
14+
* [Copyright](#Copyright)
1515
* [Contact](#Contact)
1616

1717
[![PyPI Release](https://img.shields.io/pypi/v/navv)](https://pypi.python.org/pypi/navv/)
1818
[![Docker Image](https://github.com/cisagov/network-architecture-verification-and-validation/workflows/navv-build-push-ghcr/badge.svg)](https://github.com/cisagov/network-architecture-verification-and-validation/actions)
1919

20-
## <a name="Installation"></a>Installation
20+
## Requirements ##
2121

22-
The NAVV tool is a Python script requiring `python3` and its `pip` tool. As installation of Python varies from platform to platform, please consult your operating system's documentation or the [python.org Wiki](https://wiki.python.org/moin/BeginnersGuide/Download) to install and configure Python 3 on your system.
22+
- This project only works on Linux or MacOS environments
23+
- Zeek must be installed: [Get Zeek](https://zeek.org/get-zeek/)
24+
- Python version 3.10 or later
25+
- As installation of Python varies from platform to platform, please refer to the [Python.org Wiki](https://wiki.python.org/moin/BeginnersGuide/Download) to install and configure Python on your system.
2326

24-
The recommended method for installing packages with `pip` is using [User Installs](https://pip.pypa.io/en/stable/user_guide/#user-installs) which installs to a user-specific location rather than system-wide. Usually this is done by running `pip` with the `--user` flag. It is generally *not* recommended to run `pip` with elevated/administrator/root privileges.
27+
## Installation ##
2528

26-
### <a name="InstallLatest"></a>Latest release
29+
### Development ###
2730

28-
Download the [latest NAVV release from GitHub](https://github.com/cisagov/network-architecture-verification-and-validation/releases/latest). Either of the `.whl` [built distribution](https://packaging.python.org/glossary/#term-Built-Distribution) or the `.tar.gz` [source archive](https://packaging.python.org/glossary/#term-Source-Archive) release artifacts should suffice.
31+
If you intend to develop the NAVV tool:
32+
- Verify you have the Zeek tool installed
33+
- [Install Zeek](https://zeek.org/get-zeek/)
34+
- Clone this repository
35+
- `git clone https://github.com/cisagov/network-architecture-verification-and-validation.git`
36+
- Setup your local virtual environment
37+
- `python3 -m venv .venv`
38+
- Activate your local environment
39+
- `source .venv/bin/activate`
40+
- Install the project and its dependencies to your local virtual environment
41+
- `pip install -e .`
2942

30-
NAVV can then be installed via `pip`:
43+
### Production ###
3144

32-
```shell
33-
$ python3 -m pip install --user ~/Downloads/navv-3.0.0-py3-none-any.whl
34-
Processing /home/user/Downloads/navv-3.0.0-py3-none-any.whl
35-
36-
Successfully installed et-xmlfile-1.1.0 lxml-4.6.3 navv-3.0.0 netaddr-0.8.0 openpyxl-3.0.7 tqdm-4.61.1
37-
```
38-
39-
Alternately, also using `pip`, to install the latest [release from PyPI](https://pypi.org/project/navv/):
45+
If you would like to use the NAVV tool, its recommended you install it from PYPI
46+
- Verify you have the Zeek tool installed
47+
- [Install Zeek](https://zeek.org/get-zeek/)
48+
- Install the project using `pip`
49+
- The recommended method for installing packages with `pip` is using [User Installs](https://pip.pypa.io/en/stable/user_guide/#user-installs) which installs to a user-specific location rather than system-wide.
50+
- install the latest version of NAVV
51+
- `pip install -U navv`
52+
- or install a specific version of NAVV
53+
- example: `pip install -U navv==3.0.1`
4054

41-
```
42-
python3 -m pip install -U navv
43-
```
44-
45-
### <a name="InstallGit"></a>Directly using `git`
46-
47-
NAVV can be installed via `pip` using `git`:
55+
Verify the NAVV tool has been installed by running `navv` in your console:
4856

4957
```shell
50-
$ python3 -m pip install --user git+https://github.com/cisagov/network-architecture-verification-and-validation
51-
Collecting git+https://github.com/cisagov/network-architecture-verification-and-validation
52-
Cloning https://github.com/cisagov/network-architecture-verification-and-validation to /tmp/pip-req-build-pl6llgda
53-
Running command git clone -q https://github.com/cisagov/network-architecture-verification-and-validation /tmp/pip-req-build-pl6llgda
54-
Installing build dependencies ... done
55-
56-
Successfully installed et-xmlfile-1.1.0 lxml-4.6.3 navv-3.0.0 netaddr-0.8.0 openpyxl-3.0.7 tqdm-4.61.1
57-
58-
$ navv --help
59-
usage: navv [-h] [-o OUTPUT_DIR] [-p PCAP] [-z ZEEK_LOGS] customer_name
60-
61-
```
62-
63-
### <a name="ExternalDeps"></a>External dependencies
58+
NAVV: Network Architecture Verification and Validation 3.2.2
59+
Usage: navv [OPTIONS] COMMAND [ARGS]...
6460

65-
These Python libraries will be automatically [downloaded](https://pypi.org/) and installed as runtime dependencies of the NAVV tool:
61+
Network Architecture Verification and Validation.
6662

67-
* **et-xmlfile** XML processing library ([Home](https://foss.heptapod.net/openpyxl/et_xmlfile), [PyPI](https://pypi.org/project/et-xmlfile/))
68-
* **lxml** XML processing library ([Home](https://lxml.de/), [PyPI](https://pypi.org/project/lxml/))
69-
* **netaddr** network address manipulation library ([Home](https://github.com/netaddr/netaddr), [PyPI](https://pypi.org/project/netaddr/))
70-
* **openpyxl** library for interacting with Excel 2010 xlsx/xlsm ([Home](https://openpyxl.readthedocs.io/en/stable/), [PyPI](https://pypi.org/project/openpyxl/))
71-
* **tqdm** progress bar decorator library ([Home](https://tqdm.github.io/), [PyPI](https://pypi.org/project/tqdm/))
63+
Options:
64+
--version Show the version and exit.
65+
-h, --help Show this message and exit.
7266

73-
The NAVV tool requires [Zeek](https://zeek.org/) to be installed with the `zeek` and `zeek-cut` utilities available in the `PATH`. Please consult the [Zeek manual](https://docs.zeek.org/en/current/install.html) for operating system-specifc instructions for installing and configuring Zeek. A NAVV [Docker](#Docker) image can be built which bundles both Zeek and the NAVV tool together.
74-
75-
### <a name="Packaging"></a>Building and packaging
76-
77-
PyPA's [build](https://packaging.python.org/key_projects/#build) module can be used to build and package the NAVV tool. At the command line, navigate to the directory containing the NAVV source code, then:
78-
79-
* install the Python 3 `build` module
80-
81-
```shell
82-
$ python3 -m pip install --user --upgrade build
83-
Collecting build
84-
Downloading build-0.4.0-py2.py3-none-any.whl (14 kB)
85-
86-
Installing collected packages: toml, pyparsing, pep517, packaging, build
87-
88-
Successfully installed build-0.4.0 packaging-20.9 pep517-0.10.0 pyparsing-2.4.7 toml-0.10.2
67+
Commands:
68+
generate Generate excel sheet.
69+
launch Launch the NAVV GUI.
8970
```
9071

91-
* build and package the NAVV tool:
72+
## Usage ##
9273

93-
```shell
94-
$ python3 -m build
95-
Found existing installation: setuptools 49.2.1
96-
Uninstalling setuptools-49.2.1:
97-
Successfully uninstalled setuptools-49.2.1
98-
Collecting setuptools>=42
99-
Downloading setuptools-57.0.0-py3-none-any.whl (821 kB)
100-
|████████████████████████████████| 821 kB 1.2 MB/s
101-
Collecting wheel
102-
Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
103-
Installing collected packages: setuptools, wheel
104-
105-
creating navv-3.0.0
106-
107-
adding 'navv/__init__.py'
108-
adding 'navv/__main__.py'
109-
110-
adding 'navv-3.0.0.dist-info/RECORD'
111-
removing build/bdist.linux-x86_64/wheel
112-
```
74+
### CLI ###
11375

114-
You will then see the packaged NAVV artifacts (the `.whl` [built distribution](https://packaging.python.org/glossary/#term-Built-Distribution) and the `.tar.gz` [source archive](https://packaging.python.org/glossary/#term-Source-Archive) files) in the `dist/` directory:
76+
To run the NAVV tool in the CLI (Command Line Interface), Run the command: `navv generate`
11577

78+
Below are the available options and commands for `navv generate`:
11679
```shell
117-
$ ls -l ./dist/
118-
total 672
119-
-rw-r--r-- 1 build build 673878 Jun 15 22:05 navv-3.0.0-py3-none-any.whl
120-
-rw-r--r-- 1 build build 11709 Jun 15 22:05 navv-3.0.0.tar.gz
80+
Usage: navv generate [OPTIONS] CUSTOMER_NAME
81+
82+
Generate excel sheet.
83+
84+
Options:
85+
-o, --output-dir TEXT Directory to place resultant analysis files in.
86+
Defaults to current working directory.
87+
-p, --pcap TEXT Path to pcap file. NAVV requires zeek logs or pcap.
88+
If used, zeek will run on pcap to create new logs.
89+
-z, --zeek-logs TEXT Path to store or contain zeek log files. Defaults to
90+
current working directory.
91+
-h, --help Show this message and exit.
12192
```
12293

123-
You can then follow the same method from the [Latest Release](#InstallLatest) section to install the NAVV tool.
94+
### Browser ###
12495

125-
Note that the resulting packaged NAVV artifacts do not contain the [external dependencies](#ExternalDeps) required to run the tool. Those Python libraries will be automatically [downloaded](https://pypi.org/) during the installation of the NAVV tool. If you are packaging the NAVV tool for distribution to a host without internet access, you will need to use `pip` to download the [external dependencies](#ExternalDeps) separately and install them prior to installing the NAVV tool.
96+
To launch the NAVV tool in the browser, simply run: `navv launch`
12697

127-
```shell
128-
$ python3 -m pip download lxml netaddr openpyxl tqdm
129-
130-
Saved ./lxml-4.6.3-cp39-cp39-manylinux2014_x86_64.whl
131-
Saved ./netaddr-0.8.0-py2.py3-none-any.whl
132-
Saved ./openpyxl-3.0.7-py2.py3-none-any.whl
133-
Saved ./tqdm-4.61.1-py2.py3-none-any.whl
134-
Saved ./et_xmlfile-1.1.0-py3-none-any.whl
135-
Successfully downloaded lxml netaddr openpyxl tqdm et-xmlfile
136-
```
98+
This will automatically launch the tool into your default browser.
13799

138-
Transfer the downloaded `.whl` files and the NAVV `.whl` file to the offline host and install them:
100+
![](./docs/images/navv-gui.png)
139101

140-
```shell
141-
$ ls -lh
142-
total 9.4M
143-
-rw-r--r-- 1 build build 4.6K Jun 15 22:21 et_xmlfile-1.1.0-py3-none-any.whl
144-
-rw-r--r-- 1 build build 6.6M Jun 15 22:21 lxml-4.6.3-cp39-cp39-manylinux2014_x86_64.whl
145-
-rw-r--r-- 1 build build 659K Jun 15 22:22 navv-3.0.0-py3-none-any.whl
146-
-rw-r--r-- 1 build build 1.9M Jun 15 22:21 netaddr-0.8.0-py2.py3-none-any.whl
147-
-rw-r--r-- 1 build build 238K Jun 15 22:21 openpyxl-3.0.7-py2.py3-none-any.whl
148-
-rw-r--r-- 1 build build 75K Jun 15 22:21 tqdm-4.61.1-py2.py3-none-any.whl
149-
150-
$ python3 -m pip install et_xmlfile-1.1.0-py3-none-any.whl lxml-4.6.3-cp39-cp39-manylinux2014_x86_64.whl netaddr-0.8.0-py2.py3-none-any.whl openpyxl-3.0.7-py2.py3-none-any.whl tqdm-4.61.1-py2.py3-none-any.whl
151-
152-
Successfully installed et-xmlfile-1.1.0 lxml-4.6.3 netaddr-0.8.0 openpyxl-3.0.7 tqdm-4.61.1
153-
154-
$ python3 -m pip install navv-3.0.0-py3-none-any.whl
155-
156-
Successfully installed navv-3.0.0
157-
158-
$ navv --help
159-
usage: navv [-h] [-o OUTPUT_DIR] [-p PCAP] [-z ZEEK_LOGS] customer_name
160-
161-
```
162-
163-
Also, see [`docker/README.md`](./docker/README.md#BuildEnv) for a script which can be used to build and package the NAVV tool and its dependencies.
102+
The user will have two options:
164103

165-
## <a name="Usage"></a>Usage
104+
- Generate a New Analysis:
105+
- Simply upload your PCAP file or a zipped file of your Zeek logs
106+
- Click Run Analysis
107+
- An excel sheet will be generated and downloaded via your browser
166108

167-
### <a name="Running"></a>Running NAVV
109+
- Upload an Existing Analysis
110+
- Modify your generated excel spreadsheet, See [Analysis](#Analysis)
111+
- Upload your spreadsheet and your zipped Zeek logs file
168112

169-
The NAVV tool can be run with the command `python3 -m navv`, or simply `navv` if your `PATH` contains the installation location used by `pip` during [installation](#Installation).
113+
### Analysis ###
170114

171-
Run the NAVV tool with `--help` to get a listing of its arguments:
172-
173-
```shell
174-
$ python3 -m navv --help
175-
usage: __main__.py [-h] [-o OUTPUT_DIR] [-p PCAP] [-z ZEEK_LOGS] customer_name
176-
177-
One stop shop for all your zeek-cut commands
178-
179-
positional arguments:
180-
customer_name Name of the customer
181-
182-
optional arguments:
183-
-h, --help show this help message and exit
184-
-o OUTPUT_DIR, --output-dir OUTPUT_DIR
185-
Directory to place resultant files in
186-
-p PCAP, --pcap PCAP Path to pcap file. Will run zeek and output logs in cwd or --zeek-logs
187-
-z ZEEK_LOGS, --zeek-logs ZEEK_LOGS
188-
Directory containing log files
189-
```
190-
191-
The NAVV tool will accept as input a PCAP file, in which case it will run `zeek` to generate the Zeek log files containing the metadata about the network traffic; or, a directory containing Zeek logs from a previous analysis.
192-
193-
For example:
194-
195-
```shell
196-
analyst@host tmp> ll
197-
total 178M
198-
drwxrwxr-x 2 analyst analyst 6 Jun 15 22:36 ACME_logs
199-
-rw-r--r-- 1 analyst analyst 178M Jun 15 22:35 ACME.pcap
200-
analyst@host tmp> navv -o ./ACME_logs -p ACME.pcap ACME
201-
get_inventory_data:
202-
Hours: 0
203-
Minutes: 0
204-
Seconds: 0
205-
get_segments_data:
206-
Hours: 0
207-
Minutes: 0
208-
Seconds: 0
209-
WARNING: No Site::local_nets have been defined. It's usually a good idea to define your local networks.
210-
Zeek returned with code: 0
211-
run_zeek:
212-
Hours: 0
213-
Minutes: 0
214-
Seconds: 4
215-
create_analysis_array:
216-
Hours: 0
217-
Minutes: 0
218-
Seconds: 0
219-
Trimming DNS.log data:
220-
100%|████████████████████████| 2319/2319 [00:00<00:00, 1190525.21it/s]
221-
Performing analysis(including lookups). This may take a while:
222-
100%|████████████████████████| 4425/4425 [00:03<00:00, 1427.59it/s]
223-
perform_analysis:
224-
Hours: 0
225-
Minutes: 0
226-
Seconds: 3
227-
main:
228-
Hours: 0
229-
Minutes: 0
230-
Seconds: 9
231-
analyst@host tmp> ls -l ACME_logs/
232-
total 208896
233-
-rw-rw-r-- 1 analyst analyst 150 Jun 15 22:36 ACME_dns_data.pkl
234-
-rw-rw-r-- 1 analyst analyst 203483 Jun 15 22:36 ACME_network_analysis.xlsx
235-
```
236-
237-
As the example illustrates, the NAVV tool generated `.pkl` and `.xlsx` files as a result of the processing of `ACME.pcap`.
238-
239-
### <a name="Analysis"></a>Identifying network segments and hosts
115+
Identifying network segments and hosts
240116

241117
Adding information about network segments and/or inventory can assist in packet capture analysis. Open the NAVV-generated `.xlsx` file and navigate to the `Segments` tab. Enter the relevant network segments and choose background colors for the corresponding cells. For example:
242118

@@ -246,11 +122,11 @@ Save your changes and re-run the NAVV tool with the `-z` option on the directory
246122

247123
When available, the NAVV tool will use responses for queries found in Zeek's `dns.log` file to populate the `Src_Desc` and `Dest_Desc` fields in the `Analysis` tab. When DNS information is not available, it is possible to provide this information manually in the `Inventory` tab. Note that color formatting from the `Inventory` tab is applied **after** that from the `Segments` tab. Again, saving changes to the spreadsheet file and re-running the NAVV tool with the `-z` option will update the spreadsheet with the new inventory information and color formatting.
248124

249-
## <a name="Docker"></a>Docker
125+
## Docker ##
250126

251127
See [`docker/README.md`](./docker/README.md) for setup and instructions for running the NAVV tool in Docker.
252128

253-
## <a name="Footer"></a>Copyright
129+
## Copyright ##
254130

255131
[NAVV](https://github.com/cisagov/network-architecture-verification-and-validation) is Copyright 2023 Battelle Energy Alliance, LLC, licensed under the BSD-3 Clause License.
256132

@@ -261,7 +137,7 @@ Developers, by contributing to this software project, you are agreeing to the fo
261137
* You agree your contributions are submitted under the BSD 3-Clause license.
262138
* You represent you are authorized to make the contributions and grant the license. If your employer has rights to intellectual property that includes your contributions, you represent that you have received permission to make contributions and grant the required license on behalf of that employer.
263139

264-
## Other software
140+
## Other software ##
265141

266142
Idaho National Laboratory is a cutting edge research facility which is constantly producing high quality research and software. Feel free to take a look at our other software and scientific offerings at:
267143

@@ -270,7 +146,9 @@ Idaho National Laboratory is a cutting edge research facility which is constantl
270146
* [Raw Experiment Open Source Software](https://github.com/IdahoLabResearch)
271147
* [Unsupported Open Source Software](https://github.com/IdahoLabCuttingBoard)
272148

273-
## <a name="Contact"></a>Contact information of maintainer(s):
149+
## Contact ##
150+
151+
Contact information of maintainer(s):
274152

275153
[Seth Grover](mailto:seth.grover@inl.gov?subject=NAVV)
276154

‎docs/images/navv-gui.png

72.5 KB
Loading

‎src/navv/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""This file defines the version of this module."""
2-
__version__ = "3.2.2"
2+
__version__ = "3.3.0"

0 commit comments

Comments
 (0)
Please sign in to comment.