Bug 996369

Summary: rkhunter gives false positives on /usr/sbin/ifup and /usr/sbin/ifdown because are scripts but not whitelisted?
Product: [Fedora] Fedora Reporter: collura
Component: rkhunterAssignee: Kevin Fenzi <kevin>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: collura, eddie.kuns, kevin, nonamedotc, pcfe, pv.bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-18 14:05:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
var log rkhunter log file with warning about ifup and ifdown scripts not being whitelisted none

Description collura 2013-08-13 04:45:06 UTC
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 16:30:21 UTC
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 04:31:22 UTC
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 04:40:36 UTC
comment#2: 'not that the machine' --> 'note that the machine'

Comment 4 Kevin Fenzi 2013-10-16 03:08:31 UTC
If you do run a 'rkhunter --propupd' it goes away?

Comment 5 collura 2013-10-19 19:23:29 UTC
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 22:06:06 UTC
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-14 02:09:49 UTC
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 15:30:20 UTC
(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 16:00:23 UTC
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 16:07:15 UTC
(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 22:15:33 UTC
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 14:05:13 UTC
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 20:40:03 UTC
Bug still present in current F20. Reopen?

Comment 14 Kevin Fenzi 2015-03-30 21:27:34 UTC
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.