-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from obsrvbl-oss/update_public_repository
Update to 5.1.2
- Loading branch information
Showing
13 changed files
with
343 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,10 @@ __pycache__/ | |
.installed.cfg | ||
*.egg | ||
|
||
# PyCharm | ||
.idea | ||
*.iml | ||
|
||
index.html | ||
.coverage | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,65 @@ | ||
FROM ubuntu:18.04 | ||
LABEL maintainer="Observable Networks <support@obsrvbl.com>" | ||
FROM debian:11 AS ona | ||
|
||
# Install dependencies. | ||
RUN apt-get update && apt-get install -y curl | ||
ARG APP_NAME=ona | ||
|
||
RUN curl -L -O https://github.com/mjschultz/netsa-pkg/releases/download/v0.1.27/netsa-pkg.deb | ||
RUN curl -L -O https://s3.amazonaws.com/onstatic/ona/master/ona-service_UbuntuXenialContainer_amd64.deb | ||
RUN apt install -y --fix-missing ./netsa-pkg.deb ./ona-service_UbuntuXenialContainer_amd64.deb | ||
ENV VIRTUAL_ENV "/root/.virtualenvs/$APP_NAME" | ||
ENV PATH "$VIRTUAL_ENV/bin:$PATH" | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
WORKDIR /obsrvbl | ||
|
||
# Set locales - https://hub.docker.com/_/debian | ||
RUN --mount=type=cache,target=/var/cache/apt apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install --quiet --assume-yes \ | ||
locales \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 | ||
ENV LANG en_US.utf8 | ||
|
||
# Install python3 and pip | ||
RUN --mount=type=cache,target=/var/cache/apt apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install --quiet --assume-yes \ | ||
build-essential \ | ||
python3 \ | ||
python3-pip \ | ||
python3-venv \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install --quiet --assume-yes \ | ||
wget curl \ | ||
nano \ | ||
vim \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Set python venv | ||
RUN ln -s /usr/bin/python3 /usr/bin/python | ||
RUN python -m venv $VIRTUAL_ENV | ||
|
||
# Install python packages | ||
RUN --mount=type=cache,target=/root/.cache/pip \ | ||
pip install --upgrade pip setuptools wheel ipython | ||
|
||
# Install netsa-pkg | ||
RUN curl -L -O https://assets-production.obsrvbl.com/ona-packages/netsa/v0.1.27/netsa-pkg.deb \ | ||
&& apt-get update && apt-get install --assume-yes --fix-missing ./netsa-pkg.deb \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf netsa-pkg.deb | ||
|
||
# Use local copy of ONA service package if needed | ||
# COPY ona-service_UbuntuXenialContainer_amd64.deb ./ | ||
|
||
# Install ONA service | ||
RUN if [ ! -f ./ona-service_UbuntuXenialContainer_amd64.deb ] ;\ | ||
then curl -L -O https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_UbuntuXenialContainer_amd64.deb ;\ | ||
else echo "Use cached package" ;fi \ | ||
&& apt-get update && apt-get install --assume-yes --fix-missing ./ona-service_UbuntuXenialContainer_amd64.deb \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf ona-service_UbuntuXenialContainer_amd64.deb | ||
|
||
# Switch to the unprivileged user, set some local configuration, and start. | ||
COPY run.sh /opt/obsrvbl-ona/run.sh | ||
RUN chmod +x /opt/obsrvbl-ona/run.sh | ||
|
||
USER obsrvbl_ona | ||
|
||
CMD ["/opt/obsrvbl-ona/run.sh"] | ||
CMD ["/opt/obsrvbl-ona/run.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
default observable | ||
label observable | ||
menu label ^Install ONA (DHCP) | ||
kernel /install/vmlinuz | ||
append file=/cdrom/preseed/dhcp.seed vga=788 initrd=/install/initrd.gz quiet -- | ||
label observable | ||
menu label ^Install ONA (Static IP) | ||
kernel /install/vmlinuz | ||
append file=/cdrom/preseed/nodhcp.seed vga=788 initrd=/install/initrd.gz quiet -- | ||
label observable | ||
menu label ^Install ONA (DHCP) | ||
kernel /install/vmlinuz | ||
append file=/cdrom/preseed/dhcp.seed vga=788 initrd=/install/initrd.gz quiet -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[tool.black] | ||
exclude = '/(\.git|\.local)/' | ||
skip-string-normalization = true | ||
target-version = ["py38"] | ||
line-length = 88 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!--- | ||
title: Cisco Secure Cloud Analytics (SCA) - ONA Sensor with Raspberry PI | ||
author: | ||
- Bruno Fagioli (bgimenez@cisco) | ||
- Iuri Mieiras (iuri@mieras.com) | ||
revision: 0 | ||
---> | ||
##### Requirements before start | ||
- RaspberryPI OS (32 or 64 bits); | ||
- Make sure you have a monitor, mouse and keyboard connected in the device, at least until you get SSH access to it. | ||
|
||
##### Required softwares | ||
- Raspberry PI ARM ONA image | ||
- CERT NetSA Security Suite (Silk and YAF) | ||
|
||
##### Step by step installation | ||
1. Download the .deb for ONA and tar.gz's for SILK and YAF: | ||
```bash | ||
cd /tmp | ||
wget https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_RaspbianJessie_armhf.deb | ||
wget https://tools.netsa.cert.org/releases/silk-3.19.2.tar.gz | ||
wget https://tools.netsa.cert.org/releases/yaf-2.12.1.tar.gz | ||
``` | ||
|
||
2. Install dependencies for compiling SILK and YAF: | ||
```bash | ||
sudo apt-get install build-essential libglib2.0-dev libfixbuf-dev libpcap-dev | ||
``` | ||
|
||
3. Create ONA dirs for SILK and YAF binaries: | ||
```bash | ||
sudo mkdir /opt/silk /opt/yaf | ||
``` | ||
|
||
4. Compile and install SILK: | ||
```bash | ||
tar -xvzf silk-3.19.2.tar.gz | ||
cd silk-3.19.2 | ||
./configure --prefix=/opt/silk --with-libfixbuf | ||
make && sudo make install | ||
cd .. | ||
``` | ||
|
||
5. Compile and install YAF: | ||
```shell | ||
tar -xvzf yaf-2.12.1.tar.gz | ||
cd yaf-2.12.1 | ||
./configure --prefix=/opt/yaf | ||
make && sudo make install | ||
``` | ||
|
||
6. Install ONA services: | ||
```bash | ||
sudo apt install ./ona-service_RaspbianJessie_armhf.deb | ||
``` | ||
|
||
7. After this last step, if you followed the SCA sensor guide, your sensor should be appearing within your SCA dashboard. Wait around 10-20min before the console start to show the netflows | ||
|
||
|
Oops, something went wrong.