mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 10:12:53 +01:00
Update so-import-evtx to convert EVTX to a JSON file instead of streaming to Elasticsearch
This commit is contained in:
@@ -32,24 +32,14 @@ function evtx2es() {
|
|||||||
EVTX=$1
|
EVTX=$1
|
||||||
HASH=$2
|
HASH=$2
|
||||||
|
|
||||||
ES_PASS=$(lookup_pillar "auth:users:so_elastic_user:pass" "elasticsearch")
|
|
||||||
ES_USER=$(lookup_pillar "auth:users:so_elastic_user:user" "elasticsearch")
|
|
||||||
|
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v "$EVTX:/tmp/$RUNID.evtx" \
|
-v "$EVTX:/tmp/data.evtx" \
|
||||||
--entrypoint evtx2es \
|
-v "/nsm/import/$HASH/evtx/:/tmp/evtx/" \
|
||||||
{{ MANAGER }}:5000/{{ IMAGEREPO }}/so-pcaptools:{{ VERSION }} \
|
|
||||||
--host {{ MANAGERIP }} --scheme https \
|
|
||||||
--index so-beats-$INDEX_DATE --pipeline import.wel \
|
|
||||||
--login $ES_USER --pwd "$ES_PASS" \
|
|
||||||
"/tmp/$RUNID.evtx" >> $LOG_FILE 2>&1
|
|
||||||
|
|
||||||
docker run --rm \
|
|
||||||
-v "$EVTX:/tmp/import.evtx" \
|
|
||||||
-v "/nsm/import/evtx-end_newest:/tmp/newest" \
|
-v "/nsm/import/evtx-end_newest:/tmp/newest" \
|
||||||
-v "/nsm/import/evtx-start_oldest:/tmp/oldest" \
|
-v "/nsm/import/evtx-start_oldest:/tmp/oldest" \
|
||||||
--entrypoint '/evtx_calc_timestamps.sh' \
|
-v /root/entrypoint.sh:/entrypoint.sh:ro \
|
||||||
{{ MANAGER }}:5000/{{ IMAGEREPO }}/so-pcaptools:{{ VERSION }}
|
--entrypoint "/entrypoint.sh" \
|
||||||
|
{{ MANAGER }}:5000/{{ IMAGEREPO }}/so-pcaptools:{{ VERSION }} >> $LOG_FILE 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
# if no parameters supplied, display usage
|
# if no parameters supplied, display usage
|
||||||
|
|||||||
Reference in New Issue
Block a user