forked from log2timeline/plaso
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes for end-to-end tests (log2timeline#4884)
- Loading branch information
1 parent
217a1c4
commit 32ae7ba
Showing
8 changed files
with
176 additions
and
202 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM ubuntu:jammy | ||
MAINTAINER Log2Timeline <log2timeline-dev@go | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Combining the apt-get commands into a single run reduces the size of the resulting image. | ||
# The apt-get installations below are interdependent and need to be done in sequence. | ||
RUN apt-get -y update && \ | ||
apt-get -y install apt-transport-https apt-utils && \ | ||
apt-get -y install libterm-readline-gnu-perl software-properties-common && \ | ||
apt-get -y install locales | ||
|
||
# Set terminal to UTF-8 by default. | ||
RUN locale-gen en_US.UTF-8 | ||
RUN update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
# Install nsrlsvr. | ||
RUN add-apt-repository ppa:gift/dev -y && \ | ||
apt-get update -q && \ | ||
apt-get install -y nsrlsvr-server | ||
|
||
# Initialize nsrlsvr hashes.txt file. | ||
RUN mkdir -p /var/share/nsrlsvr && \ | ||
mkdir -p /usr/share/nsrlsvr && \ | ||
touch /usr/share/nsrlsvr/hashes.txt | ||
|
||
WORKDIR /home/test/ | ||
|
||
# Clean up apt-get cache files. | ||
RUN apt-get clean && rm -rf /var/cache/apt/* /var/lib/apt/lists/* |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Script to run nsrlsvr on an Ubuntu Jenkins instance with Docker. | ||
|
||
AUXILIARY_DATA_PATH="/media/auxiliary"; | ||
|
||
# Exit on error. | ||
set -e | ||
|
||
sudo apt-get install -y curl unzip | ||
|
||
cd config/end_to_end; | ||
|
||
mkdir -p data; | ||
|
||
if [ -f "${AUXILIARY_DATA_PATH}/nsrlsvr/NSRLFile.txt" ]; | ||
then | ||
# Note that NSRLFile.txt is approximate 4 GiB in size. | ||
cp -f "${AUXILIARY_DATA_PATH}/nsrlsvr/NSRLFile.txt" data/ | ||
fi | ||
|
||
if [ ! -f data/NSRLFile.txt ]; | ||
then | ||
if [ -f "${AUXILIARY_DATA_PATH}/nsrlsvr/rds_modernm.zip" ]; | ||
then | ||
# Note that this is an older rds_modernm.zip that is approximate 2 GiB in size. | ||
cp -f "${AUXILIARY_DATA_PATH}/nsrlsvr/rds_modernm.zip" data/ | ||
fi | ||
|
||
if [ ! -f data/rds_modernm.zip ]; | ||
then | ||
# Download the minimum modern RDS hash set. | ||
# Note that rds_modernm.zip is approximate 18 GiB in size. | ||
curl -o data/rds_modernm.zip https://s3.amazonaws.com/rds.nsrl.nist.gov/RDS/rds_2024.03.1/RDS_2024.03.1_modern_minimal.zip | ||
fi | ||
|
||
if [ ! -f data/rds_modernm.zip ]; | ||
then | ||
echo "Missing: rds_modernm.zip"; | ||
|
||
exit 1 | ||
fi | ||
|
||
unzip -x data/rds_modernm.zip data/rds_modernm/NSRLFile.txt | ||
|
||
mv data/rds_modernm/NSRLFile.txt data/ | ||
fi | ||
|
||
if [ ! -f data/NSRLFile.txt ]; | ||
then | ||
echo "Missing: NSRLFile.txt"; | ||
|
||
exit 1 | ||
fi | ||
|
||
docker build -f nsrlsvr.Dockerfile --force-rm --no-cache -t log2timeline/nsrlsvr . ; | ||
|
||
# Update the nsrlsvr hashes.txt file from NSRLFile.txt | ||
docker run -v "${PWD}/data:/data:z" log2timeline/nsrlsvr /bin/bash -c "/usr/bin/python3 /usr/bin/nsrlupdate /data/NSRLFile.txt"; | ||
|
||
# Preserver the intermediate container so we don't have to rebuild hashes.txt | ||
docker commit `docker ps -lq` | cut -c8- > nsrlsvr.container | ||
|
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,6 +1,6 @@ | ||
[nsrlsvr] | ||
case=analyze_and_output | ||
analysis_options=--analysis nsrlsvr --nsrlsvr-port=9120 | ||
analysis_options=--analysis nsrlsvr --nsrlsvr-host=nsrlsvr --nsrlsvr-port=9120 | ||
source=studentpc1.plaso | ||
output_file=studentpc1.csv | ||
output_format=dynamic |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.