Bug 996369 - rkhunter gives false positives on /usr/sbin/ifup and /usr/sbin/ifdown because are scripts but not whitelisted?
rkhunter gives false positives on /usr/sbin/ifup and /usr/sbin/ifdown because...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: rkhunter (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kevin Fenzi
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-13 00:45 EDT by collura
Modified: 2015-03-30 17:27 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-18 09:05:13 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
var log rkhunter log file with warning about ifup and ifdown scripts not being whitelisted (122.24 KB, text/plain)
2013-10-02 00:31 EDT, collura
no flags Details

  None (edit)
Description collura 2013-08-13 00:45:06 EDT
Description of problem:

  '/sbin/ifup' and '/sbin/ifdown' 
  are whitelisted in the /etc/rkhunter.conf by default 
  but the linked files '/usr/sbin/ifup' and '/usr/sbin/ifdown' 
  arent whitelisted by default and so generate false positives?

Version-Release number of selected component (if applicable):

  rkhunter-1.4.0-6.fc19.x86_64

How reproducible:

  

Steps to Reproduce:
1.  rkhunter --update
2.  rkhunter --check
3.  get warning message

Actual results:

  generates warning 

Expected results:

  no warning generated because the files are links to whitelisted files so should be whitelisted as well

Additional info:


part of /etc/rkhunter.conf:

   #
   # Allow the specified commands to be scripts.
   #
   # This is a space-separated list of filenames. The option may
   # be specified more than once. The option may use wildcard
   # characters.
   #
   #SCRIPTWHITELIST="/sbin/ifup /sbin/ifdown"
   #SCRIPTWHITELIST="/usr/bin/groups"
   SCRIPTWHITELIST=/usr/bin/whatis
   SCRIPTWHITELIST=/usr/bin/ldd
   SCRIPTWHITELIST=/usr/bin/groups
   SCRIPTWHITELIST=/usr/bin/GET
   SCRIPTWHITELIST=/sbin/ifup
   SCRIPTWHITELIST=/sbin/ifdown

but flagged files/links are in /usr/sbin/ifup and /usr/sbin/ifdown
so add those to the whitelist by default?
Comment 1 Kevin Fenzi 2013-08-18 12:30:21 EDT
I'm not able to reproduce this here... ;( 

[root@ningauble ~]# egrep "ifup|ifdown" /etc/rkhunter.conf  | grep -v ^#
SCRIPTWHITELIST=/sbin/ifup
SCRIPTWHITELIST=/sbin/ifdown
[root@ningauble ~]# rkhunter -c -sk
[ Rootkit Hunter version 1.4.0 ]
...
All results have been written to the log file (/var/log/rkhunter/rkhunter.log)

No warnings were found while checking the system

Can you attach your log files/output? Thanks.
Comment 2 collura 2013-10-02 00:31:22 EDT
Created attachment 806265 [details]
var log rkhunter log file with warning about ifup and ifdown scripts not being whitelisted

here is copy of rkhunter log file.  not that the machine hasnt been personalized with using 'rkhunter --propupd' to create a local properties file.

hmm maybe just something local to machine or maybe you not seeing error because you propupd'd it away?
Comment 3 collura 2013-10-02 00:40:36 EDT
comment#2: 'not that the machine' --> 'note that the machine'
Comment 4 Kevin Fenzi 2013-10-15 23:08:31 EDT
If you do run a 'rkhunter --propupd' it goes away?
Comment 5 collura 2013-10-19 15:23:29 EDT
right the propupd clears the error for those files. 

the bug report is against the defaults of the whitelist in '/etc/rkhunter.conf'.

the links to script files showing as an error 
were just from a standard install 
so expect should be accounted for by the defaults of the whitelist 
in the '/etc/rkhunter.conf' file without depending on propupd. :')
Comment 6 Kevin Fenzi 2013-10-19 18:06:06 EDT
ok, I'll see what I can do. Trying to use rkhunter without --propupd doesn't seem like a good long term plan however (since it means you're not applying updates, etc). 

Anyhow, I agree it should work out of the box...
Comment 7 Mukundan Ragavan 2014-03-13 22:09:49 EDT
It is possible that this is fixed - 

# cat /var/log/rkhunter/rkhunter.log | egrep "ifup|ifdown"
[20:49:22]   /usr/sbin/ifdown                                [ OK ]
[20:49:22]   /usr/sbin/ifup                                  [ OK ]


# rkhunter -V
Rootkit Hunter 1.4.2

Currently under active development by the Rootkit Hunter project team.
Please review your rkhunter.conf before using.


# egrep "ifup|ifdown" /etc/rkhunter.conf 
SCRIPTWHITELIST=/sbin/ifup
SCRIPTWHITELIST=/sbin/ifdown
Comment 8 Kevin Fenzi 2014-03-14 11:30:20 EDT
(In reply to Mukundan Ragavan from comment #7)
> It is possible that this is fixed - 

Was this from a fresh install without running --propupd?
Comment 9 Kevin Fenzi 2014-03-14 12:00:23 EDT
Just did a fresh test here and it still seems to show the issue with 1.4.2. ;( 

    /usr/sbin/ifdown                                         [ Warning ]
    /usr/sbin/ifup                                           [ Warning ]
Comment 10 Mukundan Ragavan 2014-03-14 12:07:15 EDT
(In reply to Kevin Fenzi from comment #8)
> (In reply to Mukundan Ragavan from comment #7)
> > It is possible that this is fixed - 
> 
> Was this from a fresh install without running --propupd?

Never mind. 

I found why I do not have the warning. I have used --propupd (just looked at my bash history). That's why - which basically agrees with rest of the bug. 

Sorry for the miscommunication.
Comment 11 Fedora End Of Life 2015-01-09 17:15:33 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 12 Fedora End Of Life 2015-02-18 09:05:13 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 13 Phil V 2015-03-30 16:40:03 EDT
Bug still present in current F20. Reopen?
Comment 14 Kevin Fenzi 2015-03-30 17:27:34 EDT
Well, I suppose we could, but really this seems like something thats hard/impossible to fix. Running without having run --propupd is really not using the tool correctly.

Note You need to log in before you can comment on or make changes to this bug.