Name: chkrootkit
Version: 0.46a
Release: 1%{?dist}
Summary: Tool to locally check for signs of a rootkit
Group: Applications/System
License: BSD-like
URL: http://www.chkrootkit.org
Source0: ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit-%{version}.tar.gz
Source1: chkrootkitX
Source2: chkrootkit.png
Source3: chkrootkit.desktop
Source4: chkrootkit.console
Source5: chkrootkit.pam
Patch1: chkrootkit-0.44-getCMD.patch
Patch2: chkrootkit-0.44-inetd.patch
Patch3: chkrootkit-0.45-includes.patch
Patch4: chkrootkit-0.46a-warnings.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils
Requires: %{_bindir}/consolehelper
%description
chkrootkit is a tool to locally check for signs of a rootkit.
It contains:
* chkrootkit: shell script that checks system binaries for
rootkit modification.
* ifpromisc: checks if the network interface is in promiscuous mode.
* chklastlog: checks for lastlog deletions.
* chkwtmp: checks for wtmp deletions.
* chkproc: checks for signs of LKM trojans.
* chkdirs: checks for signs of LKM trojans.
* strings: quick and dirty strings replacement.
* chkutmp: checks for utmp deletions.
%prep
%setup -q -n %{name}-%{version}
%patch1 -p1 -b .getCMD
%patch2 -p1 -b .inetd
%patch3 -p1 -b .includes
%patch4 -p1 -b .warnings
sed -i -e 's!\s\+@strip.*!!g' Makefile
%build
make sense CC="%{__cc} $RPM_OPT_FLAGS"
%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
cat << EOF > .tmp.chkrootkit.sbin
#! /bin/sh
cd %{_libdir}/%{name}-%{version}
exec ./chkrootkit "\$@"
EOF
install -p -D -m0755 .tmp.chkrootkit.sbin ${RPM_BUILD_ROOT}%{_sbindir}/chkrootkit
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
ln -s %{_bindir}/consolehelper ${RPM_BUILD_ROOT}%{_bindir}/chkrootkit
install -p -D -m0755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_bindir}/chkrootkitX
perl -pi -e 's!/usr/bin!%{_bindir}!' ${RPM_BUILD_ROOT}%{_bindir}/chkrootkitX
install -p -D -m0644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/chkrootkit.png
install -p -D -m0644 %{SOURCE4} ${RPM_BUILD_ROOT}%{_sysconfdir}/security/console.apps/chkrootkit
perl -pi -e 's!/usr/sbin!%{_sbindir}!' ${RPM_BUILD_ROOT}%{_sysconfdir}/security/console.apps/chkrootkit
install -p -D -m0644 %{SOURCE5} ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d/chkrootkit
for f in \
check_wtmpx \
chkdirs \
chklastlog \
chkproc \
chkrootkit \
chkutmp \
chkwtmp \
ifpromisc \
strings-static \
; do
install -p -D -m0755 $f ${RPM_BUILD_ROOT}%{_libdir}/%{name}-%{version}/${f}
done
ln -s strings-static ${RPM_BUILD_ROOT}%{_libdir}/%{name}-%{version}/strings
desktop-file-install --vendor fedora \
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
--add-category X-Fedora \
%{SOURCE3}
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root,-)
%doc ACKNOWLEDGMENTS COPYRIGHT README README.chklastlog README.chkwtmp chkrootkit.lsm
%{_sbindir}/chkrootkit
%{_bindir}/chkrootkit
%{_bindir}/chkrootkitX
%{_sysconfdir}/pam.d/chkrootkit
%{_sysconfdir}/security/console.apps/chkrootkit
%{_libdir}/%{name}-%{version}
%{_datadir}/applications/fedora-chkrootkit.desktop
%{_datadir}/pixmaps/chkrootkit.png
%changelog
* Thu Nov 10 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.46a-1
- Update to 0.46a.
* Fri Aug 19 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.45-4
- Pass on command-line arguments to main program (#166321).
* Mon May 9 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.45-3
- Create debuginfo package, remove stripping from Makefile in %%prep,
build with optflags.
* Thu Mar 17 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.45-2
- Make GCC4 shut up by including more C headers in chkproc.c/chkwtmp.c
* Thu Feb 24 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:0.45-1
- Update to 0.45, trim description.
* Mon Oct 4 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:0.44-0.fdr.2
- Fix inetd/sshd checks.
* Sat Sep 11 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:0.44-0.fdr.1
- Update to 0.44.
* Wed Aug 18 2004 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:0.43-0.fdr.5
- License COPYRIGHTED -> BSD-like (#1746).
* Sat Mar 13 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:0.43-0.fdr.4
- rh80 doesn't have sed -i, use perl instead (#1326).
- Obsolete chkrootkit-strings patch due to soft-link since 0.43-0.fdr.1.
* Fri Feb 27 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:0.43-0.fdr.3
- Make in %%build section (#1326).
* Fri Feb 27 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:0.43-0.fdr.2
- Substitute a few hardcoded paths (#1326).
* Thu Feb 26 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:0.43-0.fdr.1
- Update to 0.43.
- Add dependency on consolehelper binary.
- Drop patched chkrootkit script due to change in 0.42-0.fdr.3.b.
- Make available "strings-static" as "strings", too.
* Wed Dec 10 2003 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:0.42-0.fdr.3.b
- Make /usr/bin/chkrootkit enter chkrootkit home directory.
This puts its own helper tools into its search path.
* Thu Dec 04 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:0.42-0.fdr.2.b
- Move binaries out of %%{_datadir}.
* Sun Sep 21 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:0.42-0.fdr.1.b
- Updated to 0.42b.
* Mon Sep 15 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:0.42-0.fdr.1
- Updated to 0.42.
- Moved pam and console entries into seperate files.
- Install into %%{_datadir} not %%{_libdir}.
* Fri Jun 27 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:0.41-0.fdr.3
- Moved chkrootkit.lsm into docs.
- Explicitly set file permissions for icon and desktop entry on install.
- No longer include backup of original chkrootkit script.
* Fri Jun 27 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:0.41-0.fdr.2
- Removed unnecessary files.
* Sat Jun 21 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:0.41-0.fdr.1
- Updated to 0.41.
* Fri Apr 04 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:0.40-0.fdr.3
- Modified the chkrootkit scrip to execute the other sub programs correctly when called from the menu entry.
* Fri Apr 04 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:0.40-0.fdr.2
- Removed hardcoded path.
* Thu Apr 03 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:0.40-0.fdr.1
- Updated to 0.40
* Tue Apr 01 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0:0.39a-0.fdr.4
- Added Epoch:0.
- Added desktop-file-utils to BuildRequires.
- Changed category to X-Fedora-Extra.
- Moved desktop entry into seperate file.
* Wed Mar 26 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0.39a-0.fdr.3
- Added Icon.
- Added desktop entry.
- Added pam entry.
* Sat Mar 22 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0.39a-0.fdr.2
- Spec Cleanup.
* Sat Mar 08 2003 Phillip Compton <pcompton[AT]proteinmedia.com> - 0.39a-0.fdr.1
- Initial RPM release.