peyeon 0.0.0rc4__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.
- peyeon-0.0.0rc4/.flake8 +4 -0
- peyeon-0.0.0rc4/.git_archival.txt +3 -0
- peyeon-0.0.0rc4/.gitattributes +1 -0
- peyeon-0.0.0rc4/.github/dependabot.yml +11 -0
- peyeon-0.0.0rc4/.github/workflows/release.yml +47 -0
- peyeon-0.0.0rc4/.github/workflows/unittest.yml +29 -0
- peyeon-0.0.0rc4/.gitignore +12 -0
- peyeon-0.0.0rc4/.pre-commit-config.yaml +28 -0
- peyeon-0.0.0rc4/.readthedocs.yaml +25 -0
- peyeon-0.0.0rc4/CONTRIBUTING.md +37 -0
- peyeon-0.0.0rc4/LICENSE +9 -0
- peyeon-0.0.0rc4/NOTICE +7 -0
- peyeon-0.0.0rc4/PKG-INFO +157 -0
- peyeon-0.0.0rc4/Photo/EyeON_Mascot.png +0 -0
- peyeon-0.0.0rc4/Photo/EyeON_logo.png +0 -0
- peyeon-0.0.0rc4/README.md +127 -0
- peyeon-0.0.0rc4/databases.ipynb +566 -0
- peyeon-0.0.0rc4/demo.ipynb +157 -0
- peyeon-0.0.0rc4/docker-build.sh +3 -0
- peyeon-0.0.0rc4/docker-run.sh +15 -0
- peyeon-0.0.0rc4/docs/Makefile +20 -0
- peyeon-0.0.0rc4/docs/make.bat +35 -0
- peyeon-0.0.0rc4/docs/source/conf.py +32 -0
- peyeon-0.0.0rc4/docs/source/eyeon.cli.rst +10 -0
- peyeon-0.0.0rc4/docs/source/eyeon.rst +40 -0
- peyeon-0.0.0rc4/docs/source/index.rst +22 -0
- peyeon-0.0.0rc4/docs/source/modules.rst +7 -0
- peyeon-0.0.0rc4/eyeon.Dockerfile +43 -0
- peyeon-0.0.0rc4/install-ubuntu.sh +28 -0
- peyeon-0.0.0rc4/pyproject.toml +56 -0
- peyeon-0.0.0rc4/schema/meta.schema.json +58 -0
- peyeon-0.0.0rc4/schema/observation.schema.json +192 -0
- peyeon-0.0.0rc4/schema/site_report.schema.json +28 -0
- peyeon-0.0.0rc4/schema/software.schema.json +28 -0
- peyeon-0.0.0rc4/setup.cfg +4 -0
- peyeon-0.0.0rc4/src/database/__init__.py +0 -0
- peyeon-0.0.0rc4/src/database/eyeon-ddl.sql +84 -0
- peyeon-0.0.0rc4/src/database/eyeon-dqa.sql +142 -0
- peyeon-0.0.0rc4/src/database/observations.json +53 -0
- peyeon-0.0.0rc4/src/eyeon/__init__.py +0 -0
- peyeon-0.0.0rc4/src/eyeon/checksum.py +19 -0
- peyeon-0.0.0rc4/src/eyeon/cli/__init__.py +139 -0
- peyeon-0.0.0rc4/src/eyeon/config.py +27 -0
- peyeon-0.0.0rc4/src/eyeon/observe.py +485 -0
- peyeon-0.0.0rc4/src/eyeon/parse.py +139 -0
- peyeon-0.0.0rc4/src/eyeon/setup_log.py +4 -0
- peyeon-0.0.0rc4/src/peyeon.egg-info/PKG-INFO +157 -0
- peyeon-0.0.0rc4/src/peyeon.egg-info/SOURCES.txt +111 -0
- peyeon-0.0.0rc4/src/peyeon.egg-info/dependency_links.txt +1 -0
- peyeon-0.0.0rc4/src/peyeon.egg-info/entry_points.txt +2 -0
- peyeon-0.0.0rc4/src/peyeon.egg-info/requires.txt +20 -0
- peyeon-0.0.0rc4/src/peyeon.egg-info/top_level.txt +3 -0
- peyeon-0.0.0rc4/src/streamlit/.streamlit/config.toml +2 -0
- peyeon-0.0.0rc4/src/streamlit/Dockerfile +13 -0
- peyeon-0.0.0rc4/src/streamlit/README.md +25 -0
- peyeon-0.0.0rc4/src/streamlit/common/EyeON_logo.png +0 -0
- peyeon-0.0.0rc4/src/streamlit/common/__init__.py +0 -0
- peyeon-0.0.0rc4/src/streamlit/common/debug_page.py +56 -0
- peyeon-0.0.0rc4/src/streamlit/common/dqautil.py +178 -0
- peyeon-0.0.0rc4/src/streamlit/common/page_frags.py +38 -0
- peyeon-0.0.0rc4/src/streamlit/common/queries.sql +124 -0
- peyeon-0.0.0rc4/src/streamlit/common/rawutil.py +469 -0
- peyeon-0.0.0rc4/src/streamlit/common/st_content_util.py +36 -0
- peyeon-0.0.0rc4/src/streamlit/common/st_graph_util.py +138 -0
- peyeon-0.0.0rc4/src/streamlit/common/utils.py +103 -0
- peyeon-0.0.0rc4/src/streamlit/eyeon_settings.toml +6 -0
- peyeon-0.0.0rc4/src/streamlit/main.py +11 -0
- peyeon-0.0.0rc4/src/streamlit/pages/__init__.py +0 -0
- peyeon-0.0.0rc4/src/streamlit/pages/_base_page.py +13 -0
- peyeon-0.0.0rc4/src/streamlit/pages/certs.py +86 -0
- peyeon-0.0.0rc4/src/streamlit/pages/debug_page.py +54 -0
- peyeon-0.0.0rc4/src/streamlit/pages/initial_page.py +37 -0
- peyeon-0.0.0rc4/src/streamlit/pages/metadata.py +75 -0
- peyeon-0.0.0rc4/src/streamlit/pages/pages.py +19 -0
- peyeon-0.0.0rc4/src/streamlit/requirements.txt +2 -0
- peyeon-0.0.0rc4/src/streamlit/utils/__init__.py +0 -0
- peyeon-0.0.0rc4/src/streamlit/utils/config.py +6 -0
- peyeon-0.0.0rc4/tests/binaries/ELF_shared_obj_test_arm/hello_world +0 -0
- peyeon-0.0.0rc4/tests/binaries/ELF_shared_obj_test_arm/libtestlib.dylib +0 -0
- peyeon-0.0.0rc4/tests/binaries/ELF_shared_obj_test_no1/bin/hello_world +0 -0
- peyeon-0.0.0rc4/tests/binaries/ELF_shared_obj_test_no1/lib/libtestlib.so +0 -0
- peyeon-0.0.0rc4/tests/binaries/NET_app_config_test_no1/ConsoleApp2.dll.config +11 -0
- peyeon-0.0.0rc4/tests/binaries/NET_app_config_test_no1/ConsoleApp2.exe +0 -0
- peyeon-0.0.0rc4/tests/binaries/NET_app_config_test_no1/bin/Debug/net6.0/hello.dll +0 -0
- peyeon-0.0.0rc4/tests/binaries/README.md +3 -0
- peyeon-0.0.0rc4/tests/binaries/Windows_dll_test_no1/hello_world.exe +0 -0
- peyeon-0.0.0rc4/tests/binaries/Windows_dll_test_no1/testlib.dll +0 -0
- peyeon-0.0.0rc4/tests/binaries/Wintap/Wintap.exe +0 -0
- peyeon-0.0.0rc4/tests/binaries/Wintap/WintapETLSetup.msi +0 -0
- peyeon-0.0.0rc4/tests/binaries/Wintap/WintapSetup.msi +0 -0
- peyeon-0.0.0rc4/tests/binaries/Wintap.exe +0 -0
- peyeon-0.0.0rc4/tests/binaries/a_out_files/big_m68020.aout +1 -0
- peyeon-0.0.0rc4/tests/binaries/a_out_files/big_netbsd_i386.aout +0 -0
- peyeon-0.0.0rc4/tests/binaries/a_out_files/big_netbsd_sparc.aout +0 -0
- peyeon-0.0.0rc4/tests/binaries/a_out_files/little_386.aout +0 -0
- peyeon-0.0.0rc4/tests/binaries/a_out_files/little_unknown.aout +0 -0
- peyeon-0.0.0rc4/tests/binaries/coff_files/intel_80386_coff +1 -0
- peyeon-0.0.0rc4/tests/binaries/java_class_no1/HelloWorld.class +0 -0
- peyeon-0.0.0rc4/tests/binaries/mach_o_dylib_test_no1/bin/hello_world +0 -0
- peyeon-0.0.0rc4/tests/binaries/mach_o_dylib_test_no1/lib/libtestlib.dylib +0 -0
- peyeon-0.0.0rc4/tests/binaries/macho_arm_files/hello_world +0 -0
- peyeon-0.0.0rc4/tests/binaries/macho_arm_files/libtestlib.dylib +0 -0
- peyeon-0.0.0rc4/tests/binaries/msitest_no1/test.msi +0 -0
- peyeon-0.0.0rc4/tests/binaries/powerpc/hello_world_ppc +0 -0
- peyeon-0.0.0rc4/tests/binaries/srectest_no1/HexFile.hex +6 -0
- peyeon-0.0.0rc4/tests/testBadSignatures.py +155 -0
- peyeon-0.0.0rc4/tests/testChecksum.py +64 -0
- peyeon-0.0.0rc4/tests/testCli.py +44 -0
- peyeon-0.0.0rc4/tests/testDatabase.py +196 -0
- peyeon-0.0.0rc4/tests/testObserveRemote.py +456 -0
- peyeon-0.0.0rc4/tests/testParse.py +120 -0
- peyeon-0.0.0rc4/tests/test_config.toml +11 -0
- peyeon-0.0.0rc4/x509-graphs.ipynb +178 -0
peyeon-0.0.0rc4/.flake8
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.git_archival.txt export-subst
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- v*
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build-wheel:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0
|
|
16
|
+
- uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: '3.10'
|
|
19
|
+
- name: Build wheel
|
|
20
|
+
run: |
|
|
21
|
+
pip install build twine
|
|
22
|
+
python -m build
|
|
23
|
+
python -m twine check dist/*
|
|
24
|
+
- name: Upload Python package dist artifacts
|
|
25
|
+
uses: actions/upload-artifact@v4
|
|
26
|
+
with:
|
|
27
|
+
name: python-package-dist
|
|
28
|
+
path: dist
|
|
29
|
+
|
|
30
|
+
pypi-publish:
|
|
31
|
+
name: Upload release to PyPI
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
needs: build-wheel
|
|
34
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
|
35
|
+
environment:
|
|
36
|
+
name: pypi
|
|
37
|
+
url: https://pypi.org/p/peyeon
|
|
38
|
+
permissions:
|
|
39
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
|
40
|
+
steps:
|
|
41
|
+
- name: Download Python package dist artifacts
|
|
42
|
+
uses: actions/download-artifact@v4
|
|
43
|
+
with:
|
|
44
|
+
name: python-package-dist
|
|
45
|
+
path: dist
|
|
46
|
+
- name: Publish package distributions to PyPI
|
|
47
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Eyeon Unit Testing
|
|
2
|
+
on: [push]
|
|
3
|
+
jobs:
|
|
4
|
+
testing:
|
|
5
|
+
|
|
6
|
+
runs-on: ubuntu-latest
|
|
7
|
+
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v4
|
|
10
|
+
- name: Set Up Python
|
|
11
|
+
uses: actions/setup-python@v5
|
|
12
|
+
with:
|
|
13
|
+
python-version: '3.10'
|
|
14
|
+
- name: Virtual Environment Setup
|
|
15
|
+
run: |
|
|
16
|
+
python3 -m venv .venv
|
|
17
|
+
- name: Install Dependencies
|
|
18
|
+
run: |
|
|
19
|
+
source .venv/bin/activate
|
|
20
|
+
pip install build
|
|
21
|
+
python3 -m build
|
|
22
|
+
pip install dist/peyeon*.whl
|
|
23
|
+
echo "Packages installed"
|
|
24
|
+
- name: Run Unittests
|
|
25
|
+
run: |
|
|
26
|
+
source .venv/bin/activate
|
|
27
|
+
cd tests/
|
|
28
|
+
coverage run -m unittest
|
|
29
|
+
coverage report
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
# - repo: https://github.com/PyCQA/isort
|
|
3
|
+
# rev: 5.12.0
|
|
4
|
+
# hooks:
|
|
5
|
+
# - id: isort
|
|
6
|
+
- repo: https://github.com/psf/black
|
|
7
|
+
rev: 23.7.0
|
|
8
|
+
hooks:
|
|
9
|
+
- id: black
|
|
10
|
+
args: [--config=pyproject.toml, --line-length=100]
|
|
11
|
+
- repo: https://github.com/pycqa/flake8
|
|
12
|
+
rev: 6.1.0
|
|
13
|
+
hooks:
|
|
14
|
+
- id: flake8
|
|
15
|
+
additional_dependencies: [flake8-bugbear]
|
|
16
|
+
# - repo: https://github.com/pycqa/pylint
|
|
17
|
+
# rev: v3.0.0a7
|
|
18
|
+
# hooks:
|
|
19
|
+
# - id: pylint
|
|
20
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
21
|
+
rev: v4.4.0
|
|
22
|
+
hooks:
|
|
23
|
+
- id: mixed-line-ending
|
|
24
|
+
- id: end-of-file-fixer
|
|
25
|
+
- id: check-case-conflict
|
|
26
|
+
- id: check-merge-conflict
|
|
27
|
+
- id: check-toml
|
|
28
|
+
- id: check-json
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Read the Docs configuration file
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
|
|
4
|
+
# Required
|
|
5
|
+
version: 2
|
|
6
|
+
|
|
7
|
+
# Set the OS, Python version, and other tools you might need
|
|
8
|
+
build:
|
|
9
|
+
os: ubuntu-24.04
|
|
10
|
+
tools:
|
|
11
|
+
python: "3.13"
|
|
12
|
+
|
|
13
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
14
|
+
sphinx:
|
|
15
|
+
configuration: docs/conf.py
|
|
16
|
+
|
|
17
|
+
# Optionally, but recommended,
|
|
18
|
+
# declare the Python requirements required to build your documentation
|
|
19
|
+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
|
20
|
+
# python:
|
|
21
|
+
# install:
|
|
22
|
+
# - requirements: docs/requirements.txt
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Contributing to EyeON
|
|
2
|
+
|
|
3
|
+
Thank you for considering contributing to our project! We appreciate your help.
|
|
4
|
+
|
|
5
|
+
## Reporting Issues
|
|
6
|
+
|
|
7
|
+
1. If you find a bug or have a feature request, please [open a new issue](https://github.com/LLNL/EyeON/issues) and provide detailed information about the problem.
|
|
8
|
+
2. If you find security issues or vulnerabilities, please [report here](https://github.com/LLNL/EyeON/security)
|
|
9
|
+
|
|
10
|
+
## Making Contributions
|
|
11
|
+
|
|
12
|
+
We welcome contributions from the community. To contribute to this project, follow these steps:
|
|
13
|
+
|
|
14
|
+
1. Fork the repository on GitHub.
|
|
15
|
+
2. Clone your forked repository to your local machine.
|
|
16
|
+
|
|
17
|
+
All contributions to EyeON are made under the MIT license (MIT).
|
|
18
|
+
|
|
19
|
+
### For Developers:
|
|
20
|
+
|
|
21
|
+
1. Create a virtual environment with python >= 3.8 [Optional, but recommended]
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
python -m venv venv
|
|
25
|
+
source venv/bin/activate
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
2. Clone peyeon
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git clone git@github.com:LLNL/pEyeON.git
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Code of Conduct
|
|
35
|
+
|
|
36
|
+
All participants in the EyeON community are expected to follow our [Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
|
|
37
|
+
|
peyeon-0.0.0rc4/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Lawrence Livermore National Security, LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
peyeon-0.0.0rc4/NOTICE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
This work was produced under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
|
|
2
|
+
|
|
3
|
+
This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor Lawrence Livermore National Security, LLC, nor any of their employees makes any warranty, expressed or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights.
|
|
4
|
+
|
|
5
|
+
Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or Lawrence Livermore National Security, LLC.
|
|
6
|
+
|
|
7
|
+
The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes.
|
peyeon-0.0.0rc4/PKG-INFO
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: peyeon
|
|
3
|
+
Version: 0.0.0rc4
|
|
4
|
+
Summary: EyeON update tracking utility
|
|
5
|
+
Author-email: Seth Lyles <lyles6@llnl.gov>, Wangmo Tenzing <tenzing1@llnl.gov>, Jack Mooney <mooney7@llnl.gov>, Grant Johnson <johnson30@llnl.gov>, Isabel Gardner <gardner59@llnl.gov>, Grant Espe <espe1@llnl.gov>
|
|
6
|
+
Maintainer-email: Seth Lyles <lyles6@llnl.gov>
|
|
7
|
+
License: MIT License
|
|
8
|
+
Requires-Python: >=3.9
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
License-File: NOTICE
|
|
12
|
+
Requires-Dist: jsonschema>=4.17
|
|
13
|
+
Requires-Dist: lief>=0.13.2
|
|
14
|
+
Requires-Dist: python-magic==0.4.27
|
|
15
|
+
Requires-Dist: pefile>=2024.8.26
|
|
16
|
+
Requires-Dist: telfhash>=0.9.8
|
|
17
|
+
Requires-Dist: surfactant==0.0.0rc10
|
|
18
|
+
Requires-Dist: coverage>=7.5.3
|
|
19
|
+
Requires-Dist: duckdb>=1.0.0
|
|
20
|
+
Requires-Dist: alive_progress>=3.1.5
|
|
21
|
+
Requires-Dist: dynaconf>=3.2.6
|
|
22
|
+
Requires-Dist: streamlit>=1.37.0
|
|
23
|
+
Requires-Dist: jupyter>=1.1.1
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: build; extra == "dev"
|
|
26
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
27
|
+
Requires-Dist: black; extra == "dev"
|
|
28
|
+
Provides-Extra: docs
|
|
29
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
30
|
+
|
|
31
|
+
# pEyeON
|
|
32
|
+
|
|
33
|
+
EyeON is a CLI tool that allows users to get software data pertaining to their machines by performing threat and inventory analysis. It can be used to quickly generate manifests of installed software or potential firmare patches. These manifests are then submitted to a database and LLNL can use them to continuously monitor OT software for threats.
|
|
34
|
+
|
|
35
|
+
[](https://github.com/LLNL/pEyeON/actions/workflows/unittest.yml)
|
|
36
|
+
[]()
|
|
37
|
+
[](https://github.com/LLNL/pEyeON/blob/main/LICENSE)
|
|
38
|
+
|
|
39
|
+
<p align="center">
|
|
40
|
+
<img src="Photo/EyeON_Mascot.png" width="300" height="270">
|
|
41
|
+
|
|
42
|
+
## Motivation
|
|
43
|
+
|
|
44
|
+
Validation is important when installing new software. Existing tools use a hash/signature check to validate that the software has not been tampered. Knowing that the software works as intended saves a lot of time and energy, but just performing these hash/signature checks doesn't provide all the information needed to understand supply chain threats.
|
|
45
|
+
|
|
46
|
+
EyeON provides an automated, consistent process across users to scan software files used for operational technologies. Its findings can be used to generate reports that track software patterns, shedding light on supply chain risks. This tool's main capabilities are focused on increasing the visibility of OT software landscape.
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
Eyeon can also be run in linux or WSL.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
git clone git@github.com:LLNL/pEyeON.git
|
|
53
|
+
```
|
|
54
|
+
or
|
|
55
|
+
```bash
|
|
56
|
+
git clone https://github.com/LLNL/pEyeON.git
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Dockerfile
|
|
60
|
+
This dockerfile contains all the pertinent tools specific to data extraction. The main tools needed are `ssdeep`, `libmagic`, `tlsh`, and `detect-it-easy`. There are a couple variables that need to be changed in order for it to work.
|
|
61
|
+
|
|
62
|
+
Run docker build script
|
|
63
|
+
```bash
|
|
64
|
+
./docker-build.sh
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Run docker run script
|
|
68
|
+
```bash
|
|
69
|
+
./docker-run.sh
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This attaches current the code directory as a working directory in the container. Files that need to be scanned should go in "tests" folder. If running in a docker container, the eyeon root directory is mounted to "/workdir", so place samples in "/workdir/samples" or "/workdir/tests/samples".
|
|
73
|
+
|
|
74
|
+
Cd into workdir directory, install EyeON, and run 'rein' alias to build python dependencies:
|
|
75
|
+
```bash
|
|
76
|
+
cd workdir
|
|
77
|
+
rein
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
EyeON commands should work now.
|
|
81
|
+
|
|
82
|
+
## Usage
|
|
83
|
+
|
|
84
|
+
This section shows how to run the CLI component.
|
|
85
|
+
|
|
86
|
+
1. Displays all arguments
|
|
87
|
+
```bash
|
|
88
|
+
eyeon --help
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
2. Displays observe arguments
|
|
92
|
+
```bash
|
|
93
|
+
eyeon observe --help
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
3. Displays parse arguments
|
|
97
|
+
```bash
|
|
98
|
+
eyeon parse --help
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
EyeON consists of two parts - an observe call and a parse call. `observe.py` works on a single file to return a suite of identifying metrics, whereas `parse.py` expects a folder. Both of these can be run either from a library import or a CLI command.
|
|
102
|
+
|
|
103
|
+
#### Observe
|
|
104
|
+
|
|
105
|
+
1. This CLI command calls the observe function and makes an observation of a file.
|
|
106
|
+
|
|
107
|
+
CLI command:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
eyeon observe notepad++.exe
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Init file calls observe function in observe.py
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
obs = eyeon.observe.Observe("./tests/binaries/x86/notepad++/notepad++.exe")
|
|
117
|
+
```
|
|
118
|
+
The observation will output a json file containing unique identifying information such as hashes, modify date, certificate info, etc.
|
|
119
|
+
|
|
120
|
+
Example json file:
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"bytecount": 9381,
|
|
125
|
+
"filename": "demo.ipynb",
|
|
126
|
+
"signatures": {"valid": "N/A"},
|
|
127
|
+
"imphash": "N/A",
|
|
128
|
+
"magic": "JSON text data",
|
|
129
|
+
"modtime": "2023-11-03 20:21:20",
|
|
130
|
+
"observation_ts": "2024-01-17 09:16:48",
|
|
131
|
+
"permissions": "0o100644",
|
|
132
|
+
"md5": "34e11a35c91d57ac249ff1300055a816",
|
|
133
|
+
"sha1": "9388f99f2c05e6e36b279dc2453ebea4bdc83242",
|
|
134
|
+
"sha256": "fa95b3820d4ee30a635982bf9b02a467e738deaebd0db1ff6a262623d762f60d",
|
|
135
|
+
"ssdeep": "96:Ui7ooWT+sPmRBeco20zV32G0r/R4jUkv57nPBSujJfcMZC606/StUbm/lGMipUQy:U/pdratRqJ3ZHStx4UA+I1jS"
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
#### Parse
|
|
140
|
+
parse.py calls observe recursively, returning an observation for each file in a directory.
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
obs = eyeon.parse.Parse(args.dir)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### Jupyter Notebook
|
|
147
|
+
If you want to run jupyter, the `./docker-run.sh` script exposes port 8888. Launch it from the `/workdir` or eyeon root directory via `jupyter notebook --ip=0.0.0.0 --no-browser` and open the `demo.ipynb` notebook for a quick demonstration.
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
#### Streamlit app
|
|
151
|
+
In the `src` directory, there exist the bones of a data exploration applet. To generate data for this, add the database flag like `eyeon parse -d tests/data/20240925-eyeon/dbhelpers/20240925-eyeon.db`. Then, if necessary, update the database path variable in the `src/streamlit/eyeon_settings.toml`. Note that the path needs to point to the grandparent directory of the `dbhelpers` directory. This is a specific path for the streamlit app; the streamlit directory has more information in its own README.
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
## Future Work
|
|
155
|
+
There will be a second part to this project, which will be to develop a cloud application that anonymizes and summarizes the findings to enable OT security analysis.
|
|
156
|
+
|
|
157
|
+
SPDX-License-Identifier: MIT
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# pEyeON
|
|
2
|
+
|
|
3
|
+
EyeON is a CLI tool that allows users to get software data pertaining to their machines by performing threat and inventory analysis. It can be used to quickly generate manifests of installed software or potential firmare patches. These manifests are then submitted to a database and LLNL can use them to continuously monitor OT software for threats.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/LLNL/pEyeON/actions/workflows/unittest.yml)
|
|
6
|
+
[]()
|
|
7
|
+
[](https://github.com/LLNL/pEyeON/blob/main/LICENSE)
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<img src="Photo/EyeON_Mascot.png" width="300" height="270">
|
|
11
|
+
|
|
12
|
+
## Motivation
|
|
13
|
+
|
|
14
|
+
Validation is important when installing new software. Existing tools use a hash/signature check to validate that the software has not been tampered. Knowing that the software works as intended saves a lot of time and energy, but just performing these hash/signature checks doesn't provide all the information needed to understand supply chain threats.
|
|
15
|
+
|
|
16
|
+
EyeON provides an automated, consistent process across users to scan software files used for operational technologies. Its findings can be used to generate reports that track software patterns, shedding light on supply chain risks. This tool's main capabilities are focused on increasing the visibility of OT software landscape.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
Eyeon can also be run in linux or WSL.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
git clone git@github.com:LLNL/pEyeON.git
|
|
23
|
+
```
|
|
24
|
+
or
|
|
25
|
+
```bash
|
|
26
|
+
git clone https://github.com/LLNL/pEyeON.git
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Dockerfile
|
|
30
|
+
This dockerfile contains all the pertinent tools specific to data extraction. The main tools needed are `ssdeep`, `libmagic`, `tlsh`, and `detect-it-easy`. There are a couple variables that need to be changed in order for it to work.
|
|
31
|
+
|
|
32
|
+
Run docker build script
|
|
33
|
+
```bash
|
|
34
|
+
./docker-build.sh
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Run docker run script
|
|
38
|
+
```bash
|
|
39
|
+
./docker-run.sh
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This attaches current the code directory as a working directory in the container. Files that need to be scanned should go in "tests" folder. If running in a docker container, the eyeon root directory is mounted to "/workdir", so place samples in "/workdir/samples" or "/workdir/tests/samples".
|
|
43
|
+
|
|
44
|
+
Cd into workdir directory, install EyeON, and run 'rein' alias to build python dependencies:
|
|
45
|
+
```bash
|
|
46
|
+
cd workdir
|
|
47
|
+
rein
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
EyeON commands should work now.
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
This section shows how to run the CLI component.
|
|
55
|
+
|
|
56
|
+
1. Displays all arguments
|
|
57
|
+
```bash
|
|
58
|
+
eyeon --help
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
2. Displays observe arguments
|
|
62
|
+
```bash
|
|
63
|
+
eyeon observe --help
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
3. Displays parse arguments
|
|
67
|
+
```bash
|
|
68
|
+
eyeon parse --help
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
EyeON consists of two parts - an observe call and a parse call. `observe.py` works on a single file to return a suite of identifying metrics, whereas `parse.py` expects a folder. Both of these can be run either from a library import or a CLI command.
|
|
72
|
+
|
|
73
|
+
#### Observe
|
|
74
|
+
|
|
75
|
+
1. This CLI command calls the observe function and makes an observation of a file.
|
|
76
|
+
|
|
77
|
+
CLI command:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
eyeon observe notepad++.exe
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Init file calls observe function in observe.py
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
obs = eyeon.observe.Observe("./tests/binaries/x86/notepad++/notepad++.exe")
|
|
87
|
+
```
|
|
88
|
+
The observation will output a json file containing unique identifying information such as hashes, modify date, certificate info, etc.
|
|
89
|
+
|
|
90
|
+
Example json file:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"bytecount": 9381,
|
|
95
|
+
"filename": "demo.ipynb",
|
|
96
|
+
"signatures": {"valid": "N/A"},
|
|
97
|
+
"imphash": "N/A",
|
|
98
|
+
"magic": "JSON text data",
|
|
99
|
+
"modtime": "2023-11-03 20:21:20",
|
|
100
|
+
"observation_ts": "2024-01-17 09:16:48",
|
|
101
|
+
"permissions": "0o100644",
|
|
102
|
+
"md5": "34e11a35c91d57ac249ff1300055a816",
|
|
103
|
+
"sha1": "9388f99f2c05e6e36b279dc2453ebea4bdc83242",
|
|
104
|
+
"sha256": "fa95b3820d4ee30a635982bf9b02a467e738deaebd0db1ff6a262623d762f60d",
|
|
105
|
+
"ssdeep": "96:Ui7ooWT+sPmRBeco20zV32G0r/R4jUkv57nPBSujJfcMZC606/StUbm/lGMipUQy:U/pdratRqJ3ZHStx4UA+I1jS"
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
#### Parse
|
|
110
|
+
parse.py calls observe recursively, returning an observation for each file in a directory.
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
obs = eyeon.parse.Parse(args.dir)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
#### Jupyter Notebook
|
|
117
|
+
If you want to run jupyter, the `./docker-run.sh` script exposes port 8888. Launch it from the `/workdir` or eyeon root directory via `jupyter notebook --ip=0.0.0.0 --no-browser` and open the `demo.ipynb` notebook for a quick demonstration.
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
#### Streamlit app
|
|
121
|
+
In the `src` directory, there exist the bones of a data exploration applet. To generate data for this, add the database flag like `eyeon parse -d tests/data/20240925-eyeon/dbhelpers/20240925-eyeon.db`. Then, if necessary, update the database path variable in the `src/streamlit/eyeon_settings.toml`. Note that the path needs to point to the grandparent directory of the `dbhelpers` directory. This is a specific path for the streamlit app; the streamlit directory has more information in its own README.
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
## Future Work
|
|
125
|
+
There will be a second part to this project, which will be to develop a cloud application that anonymizes and summarizes the findings to enable OT security analysis.
|
|
126
|
+
|
|
127
|
+
SPDX-License-Identifier: MIT
|