I just tried e2guardian 5.1 on Ubuntu 18.04 with enabled contentscanners/icapscan.conf.
My goal: Scan all content with http and https (mitm) by FSIGK (F-Secure Internet Gatekeeper) ICAP Service. MITM works, ICAP doesnt.
content of contentscanners/icapscan.conf:
---
plugname = 'icapscan'
# ICAP URL
# Use hostname rather than IP address
# Always specify the port
#
icapurl = 'icap://localhost:1344/'
exceptionvirusmimetypelist = '/etc/e2guardian/lists/contentscanners/exceptionvirusmimetypelist'
exceptionvirusextensionlist = '/etc/e2guardian/lists/contentscanners/exceptionvirusextensionlist'
exceptionvirussitelist = '/etc/e2guardian/lists/contentscanners/exceptionvirussitelist'
exceptionvirusurllist = '/etc/e2guardian/lists/contentscanners/exceptionvirusurllist'
---
But FSIGK logfile is only throwing errors while opening websites (http and http it doesn't change aynthing.
netstat -anp | grep 1344
tcp 0 0 127.0.0.1:1344 0.0.0.0:* LISTEN 40532/fsicapd
### /opt/f-secure/fsigk/log/fsicapd/fsicapd.log
2018-08-03 15:21:56 fsicapd/src/server.c:1264[7] [750:1] ICAP header parsing failed at: 802
2018-08-03 15:21:56 fsicapd/src/server.c:1264[7] [751:1] ICAP header parsing failed at: 802
2018-08-03 15:21:56 fsicapd/src/server.c:1264[7] [752:1] ICAP header parsing failed at: 802
2018-08-03 15:21:57 fsicapd/src/server.c:1264[7] [753:1] ICAP header parsing failed at: 802
2018-08-03 15:21:59 fsicapd/src/server.c:1264[7] [754:1] ICAP header parsing failed at: f2
(...)
Has anyone fun to check out where the problem is? FSIGK is free for downloading, its activating a 30day trial while installing. I can provide a how-to install on ubuntu 18.04 if somebody has the time to trie it out?
by the way: enabling debug in e2guardian does create the debug folder, but nothing inside.
debuglevel = 'ICAP,NET'
debuglevelfile = '/var/log/e2guardian/debug' #debug folder exists after restart, but nothing inside.
icapurl = 'icap://localhost:1344/response'
icapurl = 'icap://localhost:1344/request'
but i cannot define 2 urls :-)`?
i've only an ansible playbook for Ubuntu 18.04, it's not flexible yet so it isn't for all OS or Containers yet.
Download FSIGK: https://www.f-secure.com/en/web/business_global/downloads/internet-gatekeeper
ICAP Documentation from F-Secure: https://help.f-secure.com/product.html#business/igk/5.40/en/topic_1C3448E80E42465C8525293E38A04E42-5.40-en
tasks.yml: https://pastebin.com/E4RK8PDx
Manual installation:
---------------------
unarchive fsigk-{{ fsigk_version }}-rtm.tar.gz
dpkg --add-architecture i386
apt install libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386 libglib2.0-0:i386 libc6-dev linux-libc-dev make gcc
cd (fsigk_unarchived_dir)
make
make install
# fsigk is installed in /opt
a) Enable ICAP in Webui (admin/admin) this way:
WebUI Login to enable ICAP localhost:9012 (admin/admin)
or b) Enable ICAP in fsigk.ini
edit /opt/f-secure/fsigk/conf/fsigk.ini
#fsicapd_service=yes
and
[icap]
bind_addr=127.0.0.1
bind_port=1344
max_conns=500
max_scan_size=2147483648
conn_timeout=600
orsp_file_check=yes
orsp_timeout=5000
block_riskware=no
scan_timeout=90
scan_timeout_block=no
enable_email_services=yes
fsasd_libpath=/opt/f-secure/fsigk/databases/commtouchunix
fsasd_sockpath=/opt/f-secure/fsigk/fsasd-socket
to your recommends.
------------------------------
Thats all. Does this help :-)?
For the record:
With Kaspersky, the file is always good (even eicar ...)
Kaspersky logs:
[11-08-2018 11:17:07 E] PROCESS pid = 30600 SID=w7BBH70000 Call
isContinue when 100 continue is not send
[11-08-2018 11:17:52 E] PROCESS pid = 30599 SID=w7BBHqx000 Call
isContinue when 100 continue is not send
[11-08-2018 11:18:23 E] PROCESS pid = 30599 SID=w7BBINx000 Call
isContinue when 100 continue is not send
E2guardian debug:
ICAP server is 127.0.0.1
ICAP/1.0 OPTIONS response: ICAP/1.0 200 OK
ICAP/1.0 OPTIONS response part: ISTag: "KAVPROXY"
ICAP/1.0 OPTIONS response part: Date: Sat, 11 Aug 2018 09:18:20
GMT
ICAP/1.0 OPTIONS response part: Methods: RESPMOD
ICAP/1.0 OPTIONS response part: Allow: 204
ICAP/1.0 OPTIONS response part: Service: KAV-ICAP-Sever/5.5
ICAP/1.0 OPTIONS response part: Preview: 0
ICAP/1.0 OPTIONS response part: Max-Connections: 5000
ICAP/1.0 OPTIONS response part: Service-ID: KAVIcap
ICAP/1.0 OPTIONS response part: X-Include: X-Client-IP
ICAP/1.0 OPTIONS response part: Transfer-Preview: *
ICAP/1.0 OPTIONS response part: Transfer-Ignore:
ICAP/1.0 OPTIONS response part: Options-TTL: 300
ICAP/1.0 OPTIONS response part: Encapsulated: null-body=0
ICAP/1.0 OPTIONS response part:
Message previews enabled; size: 0
response is TRANSLATION KEY 59 MISSING
hw0: About to send icapheader:
RESPMOD icap://127.0.0.1:1025/av/respmod ICAP/1.0
Host: 127.0.0.1
Allow: 204
Encapsulated: req-hdr=0, res-hdr=56, res-body=75
Preview: 0
GET http://www.eicar.org/download/eicar.com HTTP/1.0
HTTP/1.0 200 OK
0
hw0: Sending memory date to icap preview first
hw0: reply from icap: ICAP/1.0 100 Continue
hw0: ICAP says continue!
hw0: reply from icap: ICAP/1.0 200 OK
hw0: ICAP says maybe not clean!
hw0: Comparing original return code to modified:HTTP/1.1 200 OK
HTTP/1.0 200 OK
hw0: Comparing original body data to modified
hw0: ICAP says clean! (body byte comparison)
In this case comparing original body data to modified seems dangerous and ineffective
https://github.com/e2guardian/e2guardian/blob/v5.1-icapc/src/contentscanners/icapscan.cpp#L750
Sorry I was not able to write earlier here. Will try it out and update you as soon as possible again.
Hello Fred, I am just compiling now v5.1-icap, did autoremove+purge the v5.1 on the VM before. (but saved the configs for later)
Sorry I was not able to write earlier here. Will try it out and update you as soon as possible again.