diff --git a/conf/default/processing.conf.default b/conf/default/processing.conf.default index c62b2290161..bf1695b40b8 100644 --- a/conf/default/processing.conf.default +++ b/conf/default/processing.conf.default @@ -153,14 +153,11 @@ do_file_lookup = yes do_url_lookup = yes urlscrub = (^http:\/\/serw\.clicksor\.com\/redir\.php\?url=|&InjectedParam=.+$) +# Since Suricata 8, socket mode is deprecated. [suricata] -# Notes on getting this to work check install_suricata function: -# https://github.com/kevoreilly/CAPEv2/blob/master/installer/cape2.sh - -enabled = yes -#Runmode "cli" or "socket" -runmode = socket -#Outputfiles +enabled = no +runmode = cli +# Outputfiles # if evelog is specified, it will be used instead of the per-protocol log files evelog = eve.json @@ -176,13 +173,14 @@ fileslog = files-json.log filesdir = files # Amount of text to carve from plaintext files (bytes) buffer = 8192 -#Used for creating an archive of extracted files + #Used for creating an archive of extracted files 7zbin = /usr/bin/7z zippass = infected -##Runmode "cli" options +# Runmode "cli" options bin = /usr/bin/suricata conf = /etc/suricata/suricata.yaml -##Runmode "socket" Options + +# Runmode "socket" Options. Deprecated since Suricata 8. socket_file = /tmp/suricata-command.socket # Community diff --git a/extra/yara_installer.sh b/extra/yara_installer.sh index 41353e09211..5ad6aa728ac 100755 --- a/extra/yara_installer.sh +++ b/extra/yara_installer.sh @@ -8,13 +8,9 @@ if [ ! -d /tmp/yara-python ]; then git clone --recursive https://github.com/VirusTotal/yara-python /tmp/yara-python fi -cd /tmp/yara-python +/etc/poetry/bin/poetry --directory /opt/CAPEv2 run bash -c "cd /tmp/yara-python && python setup.py build --enable-cuckoo --enable-magic --enable-profiling" +/etc/poetry/bin/poetry --directory /opt/CAPEv2 run pip install /tmp/yara-python -/etc/poetry/bin/poetry --directory /opt/CAPEv2 run python setup.py build --enable-cuckoo --enable-magic --enable-profiling -/etc/poetry/bin/poetry --directory /opt/CAPEv2 run pip install . - -cd .. - -if [ -d yara-python ]; then - rm -rf yara-python -fi \ No newline at end of file +if [ -d /tmp/yara-python ]; then + rm -rf /tmp/yara-python +fi diff --git a/installer/cape2.sh b/installer/cape2.sh index 5895c467941..cd03ceedcb2 100755 --- a/installer/cape2.sh +++ b/installer/cape2.sh @@ -691,64 +691,64 @@ EOL function install_suricata() { echo '[+] Installing Suricata' sudo add-apt-repository -y ppa:oisf/suricata-stable - sudo apt-get -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-overwrite" install -y suricata suricata-update + sudo apt-get -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-overwrite" install -y suricata touch /etc/suricata/threshold.config # Download etupdate to update Emerging Threats Open IDS rules: mkdir -p "/etc/suricata/rules" if ! crontab -l | grep -q -F '15 * * * * /usr/bin/suricata-update'; then - crontab -l | { cat; echo "15 * * * * /usr/bin/suricata-update --suricata /usr/bin/suricata --suricata-conf /etc/suricata/suricata.yaml -o /etc/suricata/rules/ && /usr/bin/suricatasc -c reload-rules /tmp/suricata-command.socket &>/dev/null"; } | crontab - + crontab -l | { cat; echo "15 * * * * /usr/bin/suricata-update --suricata /usr/bin/suricata --suricata-conf /etc/suricata/suricata.yaml -o /etc/suricata/rules/ &>/dev/null"; } | crontab - fi if [ -d /usr/share/suricata/rules/ ]; then - # copy files if rules folder contains files + # copy files if rules folder contains files if [ "$(ls -A /var/lib/suricata/rules/)" ]; then cp "/usr/share/suricata/rules/"* "/etc/suricata/rules/" fi fi if [ -d /var/lib/suricata/rules/ ]; then - # copy files if rules folder contains files + # copy files if rules folder contains files if [ "$(ls -A /var/lib/suricata/rules/)" ]; then cp "/var/lib/suricata/rules/"* "/etc/suricata/rules/" fi fi - # ToDo this is not the best solution but i don't have time now to investigate proper one - sed -i 's|CapabilityBoundingSet=CAP_NET_ADMIN|#CapabilityBoundingSet=CAP_NET_ADMIN|g' /lib/systemd/system/suricata.service - systemctl daemon-reload + cat > /etc/suricata/cape.yaml <