Author Topic: Firewall Rules for Changed application  (Read 9642 times)

Offline Cerberus

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 676
Firewall Rules for Changed application
« on: March 15, 2011, 04:58:49 AM »
Hello everyone!

I have one little question. I tried to search answer on forum, but may be I missed it.

Let's imagine such situation:
1) We have some application. We have some Allow Rules in AppRules for it.
2) We received "new" version of this application. Builded from sources or upgraded or some how else.
3) At this moment we receive alerts from D+. We agree to replace it.
4) After all that "new" application gets access to network via Allow Rules for "prev." version.

But is it Normal - such behavior?
May be I just want to "replace" application, but also I want to receive  alerts from Firewall, because application was changed.

Is it more secure to keep, may be, hash of application for Firewall Rules?

Offline Radaghast

  • Star Group
  • Comodo's Hero
  • *****
  • Posts: 4068
Re: Firewall Rules for Changed application
« Reply #1 on: March 15, 2011, 05:42:00 AM »
If the path and executable name remain the same, the firewall will use existing rules, regardless of the policy or alert level.

“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.”

Offline Cerberus

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 676
Re: Firewall Rules for Changed application
« Reply #2 on: March 15, 2011, 06:01:21 AM »
1) I know how Firewall do his job NOW. I'd like to know - isn't it a huge security hole?
2) If we change executable from other OS, will I receive alerts from D+?

I think - best way to keep not only path+name, but hash of file+path+name
With such parameters we can try to stop unwanted activity of replaced, upgraded, etc application. Even replaced from other OS.

Can developers say some words about such situation?
« Last Edit: March 15, 2011, 06:05:30 AM by exproff »

Offline Cerberus

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 676
Re: Firewall Rules for Changed application
« Reply #3 on: March 15, 2011, 07:35:58 AM »
I read some posts about hash and wildcards in Rules.
But still I don't understand why we should allow network activity for "new" application.
If application was changed - it is a NEW applications. No matter if it has same name and same path.

Offline Radaghast

  • Star Group
  • Comodo's Hero
  • *****
  • Posts: 4068
Re: Firewall Rules for Changed application
« Reply #4 on: March 15, 2011, 08:24:50 AM »
Without testing, I'm not sure what the limits are, in terms of what is and what is not recognised as a 'new' executable.

I only know the rules don't change because I run several applications that are nightly builds, so the executable changes, for each application, everyday. However, the path and the file name remain the same.

For interest, I just performed a small test on a clean system with a fresh install of CIS. I put D+ in paranoid mode and the firewall in custom policy with alerts on very high.

Then using a zip build of firefox 4.b13pre I created a short-cut on the desktop and launched the application with the profile manager active. I created a profile called test and let the application run. It gave alerts for both D+ and the firewall.

I then replaced the files in the firefox 4 folder with those from firefox 3.6.16pre. Nothing else was changed. I launched the application from the same short-cut and selected the test profile. I did not receive any additional alerts.

That's as far as my testing went.

Including a file hash might be a useful addition, providing it can be controlled. Being a beta tester, I really don't want alerts every time something changes. Perhaps a check-box on each application rule to enable of disable the check...

“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.”

Offline Cerberus

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 676
Re: Firewall Rules for Changed application
« Reply #5 on: March 16, 2011, 11:51:39 AM »
Anyone else?
We need you vision to improove COMODO Products =)

Offline HeffeD

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 6827
Re: Firewall Rules for Changed application
« Reply #6 on: March 17, 2011, 09:56:17 AM »
Please calm down MrEngland...

Offline SerB

  • Comodo's Hero
  • *****
  • Posts: 673
Re: Firewall Rules for Changed application
« Reply #7 on: March 18, 2011, 05:44:08 AM »
Quote
Including a file hash might be a useful addition, providing it can be controlled. Being a beta tester, I really don't want alerts every time something changes. Perhaps a check-box on each application rule to enable of disable the check...

This is a very good idea  :-TU
Checking the hash is needed when exiting an application on the Internet. Especially in cases of possible substitution of the application.

Offline Cerberus

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 676
Re: Firewall Rules for Changed application
« Reply #8 on: March 18, 2011, 06:01:29 AM »
I'll do a cross-post.
Here is bug-report about D+. That Bug + this "issue"  can do a data leak from computer without any Alert.
« Last Edit: March 18, 2011, 10:02:08 AM by exproff »

Offline Citizen K

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 26183
Re: Firewall Rules for Changed application
« Reply #9 on: March 20, 2011, 05:00:50 PM »
Without testing, I'm not sure what the limits are, in terms of what is and what is not recognised as a 'new' executable.

I only know the rules don't change because I run several applications that are nightly builds, so the executable changes, for each application, everyday. However, the path and the file name remain the same.

For interest, I just performed a small test on a clean system with a fresh install of CIS. I put D+ in paranoid mode and the firewall in custom policy with alerts on very high.

Then using a zip build of firefox 4.b13pre I created a short-cut on the desktop and launched the application with the profile manager active. I created a profile called test and let the application run. It gave alerts for both D+ and the firewall.

I then replaced the files in the firefox 4 folder with those from firefox 3.6.16pre. Nothing else was changed. I launched the application from the same short-cut and selected the test profile. I did not receive any additional alerts.

That's as far as my testing went.

Including a file hash might be a useful addition, providing it can be controlled. Being a beta tester, I really don't want alerts every time something changes. Perhaps a check-box on each application rule to enable of disable the check...
Did you switch to Paranoid mode in your testing to eliminate TVL and white list?

Offline Radaghast

  • Star Group
  • Comodo's Hero
  • *****
  • Posts: 4068
Re: Firewall Rules for Changed application
« Reply #10 on: March 20, 2011, 07:12:11 PM »
Paranoid mode makes no difference if the path and executable name are the same. Likewise, deleting the vendor from the TVL.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.”

Offline Black_ice_Spain

  • Comodo Member
  • **
  • Posts: 25
Re: Firewall Rules for Changed application
« Reply #11 on: March 20, 2011, 07:19:13 PM »
It could be defense+ changing firewall options. Altho people who uses firewall without d+ would be secureless too and maybe its not how comodo programmers like to do it.

When hash changes, throw a new alert Something like Comodo detected exe changed bla bla bla... "keep old rules for this updated app", "keep old rules for this updated app and dont ask again" (current behaviour). And the options we get normally in a comodo alert (this deletes old rules and create the new one). <- Like current d+ implementation but deleting/updating firewall rules on it.
« Last Edit: March 20, 2011, 07:35:09 PM by Black_ice_Spain »

Offline Citizen K

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 26183
Re: Firewall Rules for Changed application
« Reply #12 on: March 21, 2011, 10:45:57 AM »
Egemen stated in the past that the reason for not using hash codes to see if files have changed was because there was sufficient trust that D+ would prevent unauthorized programs from being able to change programs (%Program Files% is a protected folder).

Offline Radaghast

  • Star Group
  • Comodo's Hero
  • *****
  • Posts: 4068
Re: Firewall Rules for Changed application
« Reply #13 on: March 21, 2011, 09:13:51 PM »
Egemen stated in the past that the reason for not using hash codes to see if files have changed was because there was sufficient trust that D+ would prevent unauthorized programs from being able to change programs (%Program Files% is a protected folder).

As a test, I installed firefox 4 in the default location. This places the application files in Program Files\Mozilla Firefox. I then ran the application, received firewall and D+  alerts and created a rule for the browser using the default web browser rule.  I then replaced the files in the Program Files \Mozilla Firefox with the application files from fireox 3.6. ran the browser and received no additional alerts.

Firewall is in Custom Policy Mode with Alerts on Very High. D+ is in Paranoid mode.

As an additional test, I replaced explorer.exe from default Windows 7 with explorer.exe from Windows 7 SP1, simply by taking ownership and renaming the old file. This process did not raise any alerts.

Granted, I have full access to the PCs and I have administrative control, which is two thirds of the battle.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.”

Offline Citizen K

  • Global Moderator
  • Comodo's Hero
  • *****
  • Posts: 26183
Re: Firewall Rules for Changed application
« Reply #14 on: March 22, 2011, 11:14:13 AM »
As a test, I installed firefox 4 in the default location. This places the application files in Program Files\Mozilla Firefox. I then ran the application, received firewall and D+  alerts and created a rule for the browser using the default web browser rule.  I then replaced the files in the Program Files \Mozilla Firefox with the application files from fireox 3.6. ran the browser and received no additional alerts.

Firewall is in Custom Policy Mode with Alerts on Very High. D+ is in Paranoid mode.
Thx for testing. It seems there is only a hash check when programs get loaded in memory when CIS is in Training or Clean PC mode:
Quote
Image Execution Control is an integral part of the Defense+ engine.  If your Defense+ Security Level is set to 'Training Mode' or 'Clean PC Mode', then it is responsible for authenticating every executable image that is loaded into the memory. 

Comodo Internet Security calculates the hash of an executable at the point it attempts to load into memory. It then compares this hash with the list of known/recognized applications that are on the Comodo safe list. If the hash matches the one on record for the executable, then the application is safe. If no matching hash is found on the safe list, then the executable is 'unrecognized' and you will receive an alert.
Src: http://help.comodo.com/topic-72-1-155-1142-Execution-Control-Settings.html .

Quote
As an additional test, I replaced explorer.exe from default Windows 7 with explorer.exe from Windows 7 SP1, simply by taking ownership and renaming the old file. This process did not raise any alerts.
CIS allows users to do such things without alerting. It allows the user to do "stupid things". CIS is the nanny of program behaviour; not of user behaviour.

Quote
Granted, I have full access to the PCs and I have administrative control, which is two thirds of the battle.
The same comment as in the above.

 

Free Endpoint Protection
Seo4Smf 2.0 © SmfMod.Com Smf Destek