pfSense Support Subscription

Author Topic: Squid ClamAV Not Reporting Virus'  (Read 9129 times)

0 Members and 1 Guest are viewing this topic.

Offline PlowHouse

  • Newbie
  • *
  • Posts: 14
  • Karma: +2/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #15 on: September 22, 2016, 03:38:17 pm »
I tried a redirect to my internal pfsense ip with the /squid_clwarn extension rather than the default redirect address and I noticed I was able to get the message working on IE but on Chrome the page says the site can't be reached. What's interesting is that on IE it uses the redirected IP address I used within the "Antivirus" settings however, Chrome reverts back to https://pfsense.localdomain/squid_clwarn.php...

I attempted to clear my local cache to see if this would resolve the problem but it did not. From what I see in the logs and with the real-time monitor, its actually doing what its intended to do on both browsers. I'm just getting mixed results based on the browser of choice in regards to a message being displayed to the user via Chrome vs. IE. If there's another location the redirect address is stored then that's probably the root of my problem but until I figure out why Chrome gets the old https://pfsense.localdomain/squid_clwarn.php and not https://<IP_ADDRESS>/squid_clwarn.php, it's just going to have to stay the way it is.

Figured I'd share that here in case anyone else runs into this and has a solution.

Offline newUser2pfSense

  • Jr. Member
  • **
  • Posts: 35
  • Karma: +1/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #16 on: September 22, 2016, 07:23:43 pm »
PlowHouse...Thanks for the response.  Very informative.  Have you tried Firefox?

Offline PlowHouse

  • Newbie
  • *
  • Posts: 14
  • Karma: +2/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #17 on: September 23, 2016, 02:05:12 pm »
Just did, same result as Chrome. Interestingly enough, IE has stopped issuing me a warning now and reverted to using the old url rather than the IP re-direct I created. However, I tried downloading the file from a separate laptop and got a blocked notification on all three browsers. I was even blocked on my cell phone while connected to the wireless during my tests.

I know the AV is doing it's job whether it's displaying a notification or not, but maybe the previous message where it cannot resolve DNS while it blocks the virus is something that just cached for my MAC or IP... I even went as far as enabling "Manual Configuration" - Load Advanced files - and replacing the redirect there with the IP redirect I have. Even after doing that the old URL is still what is shown on my laptop or phone but the AV notification displays. I doubt this is OS specific but the system that isn't receiving the alerts is Windows 10 while the laptop is Windows 8.1 and the phone is Android.

I'm kind of stumped why the redirect isn't using the IP, because that works on it's own if I copy and paste that into any browser. Instead, pfSense keeps using https://pfsense.localdomain/squid_clwarn.php when it really should be https://<IP_ADDRESS>/squid_clwarn.php...

I think if I can figure out the root to why that IP isn't sticking it should work for your environment as well. Just to test, try using https://<IP_ADDRESS>/squid_clwarn.php (or http://) on your firefox browser and see if the notification shows. At least you'll know that the contents its pulling that information to display the notification works. If I think of anything else I'll post it here.

Offline newUser2pfSense

  • Jr. Member
  • **
  • Posts: 35
  • Karma: +1/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #18 on: September 25, 2016, 07:04:25 pm »
PlowHouse...As you suggested, I tried using https://<IP_ADDRESS>/squid_clwarn.php and http://<IP_ADDRESS>/squid_clwarn.php on my Firefox browser.  Both worked.  Good catch!

So this is interesting...about a week and a half ago I added an interface for my wireless LAN on my pfSense box.  In the Squid General Settings, I made sure I highlighted my WLAN with the default that was already highlighted which is the LAN.  I then restarted my router.  I then went back to the EICAR site to attempt to download the virus test files from my LAN.  I couldn't reach the EICAR site for whatever reason but had connectivity to any other website I tried.  About two days later I attempted to go to the EICAR site again and it finally displayed.  I then tried to download all 8 of the virus test files and they weren't being blocked at all.  Very odd, especially when they were being blocked before the addition of the interface and before I couldn't reach EICAR.  I don't know if EICAR changed something in their test files or if the addition of the interface on pfSense changed something in my pfSense box.  I know I can't really use pfSense until this gets fixed.  I may wipe my drive and try a fresh installation again to see if I get the same results.

I hope I don't anger the good people at pfSense, but, have you tried IPFire?  I don't want to move away from pfSense, and I'm a gold member, but I just need something that works.
« Last Edit: September 25, 2016, 07:13:19 pm by newUser2pfSense »

Offline PlowHouse

  • Newbie
  • *
  • Posts: 14
  • Karma: +2/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #19 on: September 27, 2016, 02:34:38 pm »
You may have not been able to connect to the eicar site because of local browser cache on the system and not necessarily because of squidav. One thing to mention about the AV is that I believe its only going to catch sites/files over http and not https unless you have ssl man-in-the-middle filtering on. So the top four files on the test download site should be blocked as long as AV is active on for you LAN and WLAN interfaces. However, the https files will most likely be permitted to go through as the AV filter has no visibility into the signatures of those files.

As a test, I'd check to make sure you have the AV on for the LAN by selecting only the LAN interface in the "Proxy Interface/s" section of the Squid General settings, clear the browsing data/cache locally for the given test system, navigate to the eicar site and try to download any of the top eicar test files (only for http). On another tab I'd have the "real-time" monitor for squid open and you should see the files being blocked. Since you're testing the functionality of this setup I'd make sure wireless is off or insure it's only obtaining an address from the LAN rather than WLAN. Once you validate this is working I'd repeat the steps for WLAN. Let me know how you make out.


Offline newUser2pfSense

  • Jr. Member
  • **
  • Posts: 35
  • Karma: +1/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #20 on: September 27, 2016, 08:34:09 pm »
Well, I've wiped my drive and installed and configured once more.  I'm back to where I was.  The http eicar test files get blocked (without the warning page we are looking for) and this time the eicar https test files get this reply with the SSL Man In the Middle Filtering enabled: 

Your connection is not secure

The owner of secure.eicar.org has configured their website improperly. To protect your information from being stolen, Firefox has not connected to this website.

Interestingly, I had SSL Man In the Middle Filtering enabled on my first install and the https eicar test files were blocked; I didn't receive the above message at that time.  Odd that I'm receiving that message now.
« Last Edit: September 27, 2016, 08:39:26 pm by newUser2pfSense »

Offline PlowHouse

  • Newbie
  • *
  • Posts: 14
  • Karma: +2/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #21 on: September 27, 2016, 08:53:05 pm »
That's one way to go about troubleshooting something, just wipe the whole thing  :D

BTW, I've never heard of IPFire but I may give it a shot. I don't believe anyone here is going to flame you for mentioning another product that is functional and worth the mention. Although that's just me, I'm always interested in hearing about other products that may have something different to offer.

Offline beavis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #22 on: December 13, 2016, 12:18:13 am »
I have this same issue but only with opera browser when turbo mode is enabled.
Then browser can happily download Eicar test files and nothing detected in ClamAv logs.
But if I disable turbo mode or use FF or Chrome then Clam works and detect eicar files.

Offline P3R

  • Full Member
  • ***
  • Posts: 240
  • Karma: +8/-3
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #23 on: December 13, 2016, 01:10:16 am »
I have this same issue but only with opera browser when turbo mode is enabled.
Then browser can happily download Eicar test files and nothing detected in ClamAv logs.
Not surprising as Opera turbo mode compresses the data so all signature based AV intercepting the traffic is effectively made useless.

If using Opera turbo mode, pray that Opera do the AV for you before compressing.

Offline rcooper

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #24 on: April 02, 2017, 05:34:40 am »
Ok...I wiped my drive and installed a fresh pfSense 2.3.2-RELEASE (amd64).  I do not have Snort installed at  this time.  I installed Squid and setup with no issues.  I did notice this - in the General tab, if I don't enable the Transparent HTTP Proxy, I am able to download the http eicar virus test files.  If I enable the Transparent HTTP Proxy, I get the "Server not found" error page when trying to download the http eicar virus test files.  I've attached screenshots of the General, Local Cache, and Antivirus pages.  Maybe you can find something that I've completely missed.

I check the thread you posted.  The process seems quite involved; not that I can't do it.  It's a bit of work to get it to work correctly.

Hey I am just wondering how you guys done the warning for a virus I have it set up but would like to see a page with a warning like your showing newuser 192.168.1.1/ just wondering myself is that something that's already there or did you make it?

Robert

Offline chudak

  • Jr. Member
  • **
  • Posts: 98
  • Karma: +2/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #25 on: November 25, 2017, 12:00:24 pm »
Well, I've wiped my drive and installed and configured once more.  I'm back to where I was.  The http eicar test files get blocked (without the warning page we are looking for) and this time the eicar https test files get this reply with the SSL Man In the Middle Filtering enabled: 

Your connection is not secure

The owner of secure.eicar.org has configured their website improperly. To protect your information from being stolen, Firefox has not connected to this website.

Interestingly, I had SSL Man In the Middle Filtering enabled on my first install and the https eicar test files were blocked; I didn't receive the above message at that time.  Odd that I'm receiving that message now.

@PlowHouse @newUser2pfSense

trying to follow your thread but with no success.  Having the same issue with AV and wonder if you could summarize your findings/suggestions in short form?

Thx in advance!

Offline mtarbox

  • Jr. Member
  • **
  • Posts: 40
  • Karma: +1/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #26 on: November 26, 2017, 04:12:44 pm »
I decided to test mine and it too is not triggering the warning or the blocked pages.
I am not using HTTPS/SSL Interception, but I would expect it to block the http files.
I've uninstalled squid, rebooted, and then re-installed squid, however still no dice.


2.4.2-RELEASE (amd64)
built on Mon Nov 20 08:12:56 CST 2017
FreeBSD 11.1-RELEASE-p4

c-icap and clamd both show a green light status.

C-ICAP Server Table shows as empty, even after downloading the eicar test file which it doesn't catch.

And upon further discovery on the web, this was my solution. Not sure if it is correct, but it is once again working. https://www.ceos3c.com/2017/06/23/install-squid-clamav-pfsense-2-3-3/ except I did not have to set the proxy on my browser since it was already in transparent mode.

So it makes me wonder what exactly I did to knock c-icap offline and not scan traffic, even though it was showing the green light status. I can't remember testing it after updating to 2.4.2, or even the prior release.
« Last Edit: November 26, 2017, 04:31:43 pm by mtarbox »

Offline chudak

  • Jr. Member
  • **
  • Posts: 98
  • Karma: +2/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #27 on: November 27, 2017, 10:03:52 am »
No sure why we need FW rule it used to work before w/o it?

Tried as was suggested by @mtarbox https://www.ceos3c.com/2017/06/23/install-squid-clamav-pfsense-2-3-3/ and still no love

??!!
« Last Edit: November 27, 2017, 04:51:44 pm by chudak »

Offline chudak

  • Jr. Member
  • **
  • Posts: 98
  • Karma: +2/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #28 on: November 27, 2017, 08:23:11 pm »
If I were to guess I'd say that Transparent Proxy Settings stopped working roughly at the time of upgrading to 2.4.1

Offline Impatient

  • Newbie
  • *
  • Posts: 24
  • Karma: +1/-0
    • View Profile
Re: Squid ClamAV Not Reporting Virus'
« Reply #29 on: December 01, 2017, 03:16:55 pm »
 I don't get the response page but it is blocked and I don't use a firewall rule.

 I have squid setup with mitm and transparent.

 When I check the real time tab the (clamd table) show's the eicar file is found instream
and also the C-ICAP server is showing that it generated a response page even though
none appeared.

 I had just assumed it was a conflict between one of the other package's I have installed.