Skip to content

Commit 534b7fe

Browse files
committed
Update to 5.1.2
1 parent 935cc76 commit 534b7fe

13 files changed

+343
-116
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ __pycache__/
1313
.installed.cfg
1414
*.egg
1515

16+
# PyCharm
17+
.idea
18+
*.iml
19+
1620
index.html
1721
.coverage
1822

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
ARCH ?= amd64
15-
VERSION := 5.1.0
15+
VERSION := 5.1.2
1616

1717
SCRIPTS_DIR := src/scripts
1818
uPNA_DIR := src/uPNA

README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22

33
This repository is where the development of the Observable Networks Appliance (ONA) takes place. The ONA software is used to collect input data for Observable Networks' network security service. It can run on a variety of platforms, including embedded computers, physical servers, virtual machines, cloud servers, and Docker containers.
44

5-
See [observable.net](https://observable.net) for more information about Observable Networks' network security service.
6-
75
## Supported platforms
86

97
The following platforms are officially supported:
108

11-
* [Ubuntu 18.04 and later](https://onstatic.s3.amazonaws.com/ona/master/ona-service_UbuntuXenial_amd64.deb)
12-
* [RHEL 7 and compatible](https://onstatic.s3.amazonaws.com/ona/master/ona-service_RHEL_7_x86_64.rpm)
13-
* [RHEL 8 and compatible](https://onstatic.s3.amazonaws.com/ona/master/ona-service_RHEL_8_x86_64.rpm)
14-
* [Raspberry Pi with Raspbian](https://onstatic.s3.amazonaws.com/ona/master/ona-service_RaspbianJessie_armhf.deb)
9+
* [Ubuntu 18.04 and later](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_UbuntuXenial_amd64.deb)
10+
* [RHEL 7 and compatible](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_RHEL_7_x86_64.rpm)
11+
* [RHEL 8 and compatible](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_RHEL_8_x86_64.rpm)
12+
* [Raspberry Pi with Raspbian (ARMHF)](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_RaspbianJessie_armhf.deb)
13+
([installation guide](raspberry_pi_guide.md))
14+
* [Raspberry Pi with Raspbian (ARM64)](https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_RaspbianJessie_aarch64.deb)
15+
([installation guide](raspberry_pi_guide.md))
1516
* [Docker](https://github.com/obsrvbl/ona/blob/master/images/docker/Dockerfile)
1617

1718
To install the latest version on 20.04 (recommended for physical and virtual machine installations):
1819

1920
```
20-
$ wget https://onstatic.s3.amazonaws.com/ona/master/ona-service_UbuntuXenial_amd64.deb
21+
$ wget https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_UbuntuXenial_amd64.deb
2122
$ sudo apt install ./ona-service_UbuntuXenial_amd64.deb
2223
```
2324

images/docker/Dockerfile

+58-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,65 @@
1-
FROM ubuntu:18.04
2-
LABEL maintainer="Observable Networks <[email protected]>"
1+
FROM debian:11 AS ona
32

4-
# Install dependencies.
5-
RUN apt-get update && apt-get install -y curl
3+
ARG APP_NAME=ona
64

7-
RUN curl -L -O https://github.com/mjschultz/netsa-pkg/releases/download/v0.1.27/netsa-pkg.deb
8-
RUN curl -L -O https://s3.amazonaws.com/onstatic/ona/master/ona-service_UbuntuXenialContainer_amd64.deb
9-
RUN apt install -y --fix-missing ./netsa-pkg.deb ./ona-service_UbuntuXenialContainer_amd64.deb
5+
ENV VIRTUAL_ENV "/root/.virtualenvs/$APP_NAME"
6+
ENV PATH "$VIRTUAL_ENV/bin:$PATH"
7+
8+
SHELL ["/bin/bash", "-c"]
9+
10+
WORKDIR /obsrvbl
11+
12+
# Set locales - https://hub.docker.com/_/debian
13+
RUN --mount=type=cache,target=/var/cache/apt apt-get update && \
14+
DEBIAN_FRONTEND=noninteractive apt-get install --quiet --assume-yes \
15+
locales \
16+
&& rm -rf /var/lib/apt/lists/* \
17+
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
18+
ENV LANG en_US.utf8
19+
20+
# Install python3 and pip
21+
RUN --mount=type=cache,target=/var/cache/apt apt-get update && \
22+
DEBIAN_FRONTEND=noninteractive apt-get install --quiet --assume-yes \
23+
build-essential \
24+
python3 \
25+
python3-pip \
26+
python3-venv \
27+
&& rm -rf /var/lib/apt/lists/*
28+
29+
RUN --mount=type=cache,target=/var/cache/apt apt-get update && \
30+
DEBIAN_FRONTEND=noninteractive apt-get install --quiet --assume-yes \
31+
wget curl \
32+
nano \
33+
vim \
34+
&& rm -rf /var/lib/apt/lists/*
35+
36+
# Set python venv
37+
RUN ln -s /usr/bin/python3 /usr/bin/python
38+
RUN python -m venv $VIRTUAL_ENV
39+
40+
# Install python packages
41+
RUN --mount=type=cache,target=/root/.cache/pip \
42+
pip install --upgrade pip setuptools wheel ipython
43+
44+
# Install netsa-pkg
45+
RUN curl -L -O https://assets-production.obsrvbl.com/ona-packages/netsa/v0.1.27/netsa-pkg.deb \
46+
&& apt-get update && apt-get install --assume-yes --fix-missing ./netsa-pkg.deb \
47+
&& rm -rf /var/lib/apt/lists/* \
48+
&& rm -rf netsa-pkg.deb
49+
50+
# Use local copy of ONA service package if needed
51+
# COPY ona-service_UbuntuXenialContainer_amd64.deb ./
52+
53+
# Install ONA service
54+
RUN if [ ! -f ./ona-service_UbuntuXenialContainer_amd64.deb ] ;\
55+
then curl -L -O https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_UbuntuXenialContainer_amd64.deb ;\
56+
else echo "Use cached package" ;fi \
57+
&& apt-get update && apt-get install --assume-yes --fix-missing ./ona-service_UbuntuXenialContainer_amd64.deb \
58+
&& rm -rf /var/lib/apt/lists/* \
59+
&& rm -rf ona-service_UbuntuXenialContainer_amd64.deb
1060

1161
# Switch to the unprivileged user, set some local configuration, and start.
1262
COPY run.sh /opt/obsrvbl-ona/run.sh
1363
RUN chmod +x /opt/obsrvbl-ona/run.sh
1464

15-
USER obsrvbl_ona
16-
17-
CMD ["/opt/obsrvbl-ona/run.sh"]
65+
CMD ["/opt/obsrvbl-ona/run.sh"]

images/iso/build_iso.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,18 @@ ubuntu_name="ubuntu-${RELEASE}-server-${ARCH}.iso"
5050
ona_name="ona-${RELEASE}-server-${ARCH}.iso"
5151
ubuntu_url="${url:-$($DIR/build_iso_helper $RELEASE $VARIANT)}"
5252
test -n "$ubuntu_url" || fatal "failed getting Ubuntu ISO download URL"
53-
ona_service_url="https://s3.amazonaws.com/onstatic/ona/master/ona-service_UbuntuXenial_amd64.deb"
54-
netsa_pkg_url="http://onstatic.s3.amazonaws.com/netsa-pkg.deb"
53+
ona_service_url="https://s3.amazonaws.com/onstatic/ona-service/master/ona-service_UbuntuXenial_amd64.deb"
54+
netsa_pkg_url="https://assets-production.obsrvbl.com/ona-packages/netsa/v0.1.27/netsa-pkg.deb"
5555

5656
shift $(($OPTIND-1))
5757

5858
test $EUID -ne 0 && sudo="sudo"
5959
which mkisofs 1> /dev/null || fatal "missing mkisofs: $sudo apt-get install genisoimage"
6060
which isohybrid 1> /dev/null || fatal "missing isohybrid: $sudo apt-get install syslinux-utils"
6161

62-
mkdir "$DIR"/working || fatal
62+
[[ -d "$DIR" ]] || fatal # invalid directory
63+
[[ -d "$DIR"/working && $(ls -A "$DIR"/working) ]] && fatal # working directory exists and is not empty
64+
[[ -d "$DIR"/working ]] || mkdir "$DIR"/working # working directory does not exist, so create it
6365
(
6466
set -e
6567
cd "$DIR"/working

images/iso/isolinux/grub.cfg

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ set menu_color_normal=white/black
1111
set menu_color_highlight=black/light-gray
1212

1313
set timeout=30
14-
menuentry "Install ONA (DHCP)" {
14+
menuentry "Install ONA (Static IP)" {
1515
set gfxpayload=keep
16-
linux /install/vmlinuz file=/cdrom/preseed/dhcp.seed quiet ---
16+
linux /install/vmlinuz file=/cdrom/preseed/nodhcp.seed quiet ---
1717
initrd /install/initrd.gz
1818
}
19-
menuentry "Install ONA (Static IP)" {
19+
menuentry "Install ONA (DHCP)" {
2020
set gfxpayload=keep
21-
linux /install/vmlinuz file=/cdrom/preseed/nodhcp.seed quiet ---
21+
linux /install/vmlinuz file=/cdrom/preseed/dhcp.seed quiet ---
2222
initrd /install/initrd.gz
2323
}

images/iso/isolinux/txt.cfg

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
default observable
2-
label observable
3-
menu label ^Install ONA (DHCP)
4-
kernel /install/vmlinuz
5-
append file=/cdrom/preseed/dhcp.seed vga=788 initrd=/install/initrd.gz quiet --
62
label observable
73
menu label ^Install ONA (Static IP)
84
kernel /install/vmlinuz
95
append file=/cdrom/preseed/nodhcp.seed vga=788 initrd=/install/initrd.gz quiet --
6+
label observable
7+
menu label ^Install ONA (DHCP)
8+
kernel /install/vmlinuz
9+
append file=/cdrom/preseed/dhcp.seed vga=788 initrd=/install/initrd.gz quiet --

pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[tool.black]
2+
exclude = '/(\.git|\.local)/'
3+
skip-string-normalization = true
4+
target-version = ["py38"]
5+
line-length = 88

raspberry_pi_guide.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<!---
2+
title: Cisco Secure Cloud Analytics (SCA) - ONA Sensor with Raspberry PI
3+
author:
4+
- Bruno Fagioli (bgimenez@cisco)
5+
- Iuri Mieiras ([email protected])
6+
revision: 0
7+
--->
8+
##### Requirements before start
9+
- RaspberryPI OS (32 or 64 bits);
10+
- Make sure you have a monitor, mouse and keyboard connected in the device, at least until you get SSH access to it.
11+
12+
##### Required softwares
13+
- Raspberry PI ARM ONA image
14+
- CERT NetSA Security Suite (Silk and YAF)
15+
16+
##### Step by step installation
17+
1. Download the .deb for ONA and tar.gz's for SILK and YAF:
18+
```bash
19+
cd /tmp
20+
wget https://assets-production.obsrvbl.com/ona-packages/obsrvbl-ona/v5.1.2/ona-service_RaspbianJessie_armhf.deb
21+
wget https://tools.netsa.cert.org/releases/silk-3.19.2.tar.gz
22+
wget https://tools.netsa.cert.org/releases/yaf-2.12.1.tar.gz
23+
```
24+
25+
2. Install dependencies for compiling SILK and YAF:
26+
```bash
27+
sudo apt-get install build-essential libglib2.0-dev libfixbuf-dev libpcap-dev
28+
```
29+
30+
3. Create ONA dirs for SILK and YAF binaries:
31+
```bash
32+
sudo mkdir /opt/silk /opt/yaf
33+
```
34+
35+
4. Compile and install SILK:
36+
```bash
37+
tar -xvzf silk-3.19.2.tar.gz
38+
cd silk-3.19.2
39+
./configure --prefix=/opt/silk --with-libfixbuf
40+
make && sudo make install
41+
cd ..
42+
```
43+
44+
5. Compile and install YAF:
45+
```shell
46+
tar -xvzf yaf-2.12.1.tar.gz
47+
cd yaf-2.12.1
48+
./configure --prefix=/opt/yaf
49+
make && sudo make install
50+
```
51+
52+
6. Install ONA services:
53+
```bash
54+
sudo apt install ./ona-service_RaspbianJessie_armhf.deb
55+
```
56+
57+
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
58+
59+

0 commit comments

Comments
 (0)