Репозитории ALT
S: | 1.4.7-alt0_git_0_7b287f4 |
5.1: | 1.3.4-alt1 |
4.1: | 1.3.4-alt0.M41.1 |
4.0: | 1.2.7-alt1 |
3.0: | 1.2.7-alt1 |
Группа :: Мониторинг
Пакет: rkhunter
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Name: rkhunter
Version: 1.2.7
Release: alt1
Summary: Rootkit scans for rootkits, backdoors and local exploits
License: GPL
Group: Monitoring
URL: http://www.rootkit.nl
BuildArch: noarch
Source0: http://downloads.rootkit.nl/%name-%version.tar.gz
Patch1: rkhunter-1.2.1-alt-devhelpers.patch
Patch2: rkhunter-1.2.1-alt-noksh.patch
Patch3: rkhunter-1.2.1-alt-updates.patch
Requires: mailx, crontabs
BuildPreReq: mailx, crontabs, perl(Digest/MD5.pm), perl(Digest/SHA1.pm), perl(IO/Socket.pm), perl(strict.pm)
# Note: mailx and crontabs are not needed to be noticed explicitly,
# but are placed here for better manageability at install stage
# and for suppress warnings from find-requires at build stage.
Summary(ru_RU.KOI8-R): Поиск троянских коней и закладок в программах
# ToDo: /usr/bin/rkhunter strictly lookups helper scripts in /usr/lib/%name.
# More correct should be to place them to /usr/share/%name (%_datadir/%name)
# because they are platform-independent.
%define util_dir %_libexecdir/%name
%define scripts_dir %util_dir/scripts
%define runonce_dir %util_dir/adminutils
%define data_dir %_localstatedir/%name
%define tmp_dir %data_dir/tmp
%define db_dir %data_dir/db
%define hash_list defaulthashes.dat
%define doc_dir %_docdir/%name-%version
%define cron_daily %_sysconfdir/cron.daily
%define cron_script %cron_daily/01-%name
%description
Rootkit scanner is scanning tool to ensure you for about 99.9%% you're
clean of nasty tools. This tool scans for rootkits, backdoors and local
exploits by running tests like:
- MD5 hash compare
- Look for default files used by rootkits
- Wrong file permissions for binaries
- Look for suspected strings in LKM and KLD modules
- Look for hidden files
- Optional scan within plaintext and binary files
- Software version checks
- Application tests
Rootkit Hunter is released as a GPL licensed project
and free for everyone to use.
%description -l ru_RU.KOI8-R
Сканер Rootkit проверяет вашу систему на наличие закладок и троянских коней.
Для этого используются следующие тесты:
- проверка контрольных сумм MD5
- поиск файлов, используемых закладками
- неверные права доступа к программам
- сигнатуры закладок в модулях ядра
- поиск невидимых файлов
- дополнительное сканирование внутри текстовых и двоичных файлов
- проверка версий программ
- тесты для приложений
%prep
%setup -q -n %name
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
#%%configure ...
# We have nothing to configure... yet...
%install
%__mkdir_p %buildroot{%_bindir,%_sysconfdir,%_man8dir}
%__mkdir_p %buildroot{%scripts_dir,%runonce_dir,%doc_dir,%db_dir,%tmp_dir}
%__chmod ug+rwx,o-rwx %buildroot%tmp_dir
%__install -m750 -p files/rkhunter %buildroot%_bindir/
%__install -m750 -p files/{*.pl,*.sh} %buildroot%scripts_dir/
%__install -m750 -p files/development/{*.pl,*.sh} %buildroot%runonce_dir/
%__install -m644 -p files/development/*.8 %buildroot%_man8dir/
%__install -m640 -p files/*.dat %buildroot%db_dir/
%__install -m644 -p files/{CHANGELOG,LICENSE,README,WISHLIST} %buildroot%doc_dir/
# (cjo) Put installation root in configuration file,
# then copy the rest of the file from the original.
cat >> %buildroot%_sysconfdir/%name.conf << __EOF__
## Next three lines installed automatically by RPM.
## Do not change unless you know what you're doing...
INSTALLDIR=%_prefix
DBDIR=%db_dir
TMPDIR=%tmp_dir
__EOF__
cat files/%name.conf >> %buildroot%_sysconfdir/%name.conf
%__chmod 640 %buildroot%_sysconfdir/%name.conf
# Only root should use rkhunter (at least for now)
%__chmod o-rwx -R %buildroot{%scripts_dir,%db_dir}
# make a cron.daily file to mail us the reports
%__mkdir_p "%buildroot%cron_daily"
%__cat > "%buildroot%cron_script" << __EOF__
#!/bin/sh
( echo "Rootkit Hunter daily report"
date
echo "========================================="
echo
echo "Empty message means that no errors found."
echo
%_bindir/%name -c --cronjob --quiet --skip-application-check
) | /bin/mail -s '%name Daily Run' root
__EOF__
%__chmod a+rwx,g-w,o-rwx %buildroot%cron_script
# make script for update MD5 hashes
%__cat > %buildroot%runonce_dir/create_defaulthashes << __EOF__
#!/bin/sh
#
# %runonce_dir/create_defaulthashes -- part of Rootkit Hunter
#
# Purpose: updates MD5 signatures of your binary stuff.
#
# Uses GnuPG for signing created list:
# - you should have already generated GPG key
# - should be executed interactively for passing key password
#
cd %db_dir
tstamp=\$(LANG=en date '+%%Y%%m%%d_%%H%%M%%S')
for f in %hash_list %hash_list.asc %hash_list.sig; do
test -f "\$f" && mv -f "\$f" "\$f.saved.\$tstamp"
done
cd %runonce_dir
./rpmhashes.sh > %db_dir/%hash_list
# ./createhashes.sh >> %db_dir/%hash_list
cd %db_dir
gpg --detach-sign --armor --yes %hash_list
gpg --verify %hash_list.asc
echo "
Don't forget to repeat this command after every software upgrade!"
## EOF ##
__EOF__
chmod 750 %buildroot%runonce_dir/create_defaulthashes
%post
echo ' Refresh your MD5 checksum database by following command:
GNUPGHOME=~user/.gnupg %runonce_dir/create_defaulthashes'
%preun
rm -f %db_dir/%hash_list.{asc,*saved.*}
%verifyscript
echo '%name checksum database should be verified separately by following command:
GNUPGHOME=~user/.gnupg gpg --verify %db_dir/%hash_list.asc'
%files
%_bindir/%name
%cron_script
%util_dir
%data_dir
%doc_dir
%_man8dir/*
%config(noreplace) %verify(not mtime) %_sysconfdir/%name.conf
%exclude %db_dir/%hash_list
%config(noreplace) %verify(not mtime size md5) %db_dir/%hash_list
#%exclude %scripts_dir/check_update.sh
#%exclude %db_dir/mirrors.dat
%changelog
…
Полный changelog можно просмотреть здесь
Version: 1.2.7
Release: alt1
Summary: Rootkit scans for rootkits, backdoors and local exploits
License: GPL
Group: Monitoring
URL: http://www.rootkit.nl
BuildArch: noarch
Source0: http://downloads.rootkit.nl/%name-%version.tar.gz
Patch1: rkhunter-1.2.1-alt-devhelpers.patch
Patch2: rkhunter-1.2.1-alt-noksh.patch
Patch3: rkhunter-1.2.1-alt-updates.patch
Requires: mailx, crontabs
BuildPreReq: mailx, crontabs, perl(Digest/MD5.pm), perl(Digest/SHA1.pm), perl(IO/Socket.pm), perl(strict.pm)
# Note: mailx and crontabs are not needed to be noticed explicitly,
# but are placed here for better manageability at install stage
# and for suppress warnings from find-requires at build stage.
Summary(ru_RU.KOI8-R): Поиск троянских коней и закладок в программах
# ToDo: /usr/bin/rkhunter strictly lookups helper scripts in /usr/lib/%name.
# More correct should be to place them to /usr/share/%name (%_datadir/%name)
# because they are platform-independent.
%define util_dir %_libexecdir/%name
%define scripts_dir %util_dir/scripts
%define runonce_dir %util_dir/adminutils
%define data_dir %_localstatedir/%name
%define tmp_dir %data_dir/tmp
%define db_dir %data_dir/db
%define hash_list defaulthashes.dat
%define doc_dir %_docdir/%name-%version
%define cron_daily %_sysconfdir/cron.daily
%define cron_script %cron_daily/01-%name
%description
Rootkit scanner is scanning tool to ensure you for about 99.9%% you're
clean of nasty tools. This tool scans for rootkits, backdoors and local
exploits by running tests like:
- MD5 hash compare
- Look for default files used by rootkits
- Wrong file permissions for binaries
- Look for suspected strings in LKM and KLD modules
- Look for hidden files
- Optional scan within plaintext and binary files
- Software version checks
- Application tests
Rootkit Hunter is released as a GPL licensed project
and free for everyone to use.
%description -l ru_RU.KOI8-R
Сканер Rootkit проверяет вашу систему на наличие закладок и троянских коней.
Для этого используются следующие тесты:
- проверка контрольных сумм MD5
- поиск файлов, используемых закладками
- неверные права доступа к программам
- сигнатуры закладок в модулях ядра
- поиск невидимых файлов
- дополнительное сканирование внутри текстовых и двоичных файлов
- проверка версий программ
- тесты для приложений
%prep
%setup -q -n %name
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
#%%configure ...
# We have nothing to configure... yet...
%install
%__mkdir_p %buildroot{%_bindir,%_sysconfdir,%_man8dir}
%__mkdir_p %buildroot{%scripts_dir,%runonce_dir,%doc_dir,%db_dir,%tmp_dir}
%__chmod ug+rwx,o-rwx %buildroot%tmp_dir
%__install -m750 -p files/rkhunter %buildroot%_bindir/
%__install -m750 -p files/{*.pl,*.sh} %buildroot%scripts_dir/
%__install -m750 -p files/development/{*.pl,*.sh} %buildroot%runonce_dir/
%__install -m644 -p files/development/*.8 %buildroot%_man8dir/
%__install -m640 -p files/*.dat %buildroot%db_dir/
%__install -m644 -p files/{CHANGELOG,LICENSE,README,WISHLIST} %buildroot%doc_dir/
# (cjo) Put installation root in configuration file,
# then copy the rest of the file from the original.
cat >> %buildroot%_sysconfdir/%name.conf << __EOF__
## Next three lines installed automatically by RPM.
## Do not change unless you know what you're doing...
INSTALLDIR=%_prefix
DBDIR=%db_dir
TMPDIR=%tmp_dir
__EOF__
cat files/%name.conf >> %buildroot%_sysconfdir/%name.conf
%__chmod 640 %buildroot%_sysconfdir/%name.conf
# Only root should use rkhunter (at least for now)
%__chmod o-rwx -R %buildroot{%scripts_dir,%db_dir}
# make a cron.daily file to mail us the reports
%__mkdir_p "%buildroot%cron_daily"
%__cat > "%buildroot%cron_script" << __EOF__
#!/bin/sh
( echo "Rootkit Hunter daily report"
date
echo "========================================="
echo
echo "Empty message means that no errors found."
echo
%_bindir/%name -c --cronjob --quiet --skip-application-check
) | /bin/mail -s '%name Daily Run' root
__EOF__
%__chmod a+rwx,g-w,o-rwx %buildroot%cron_script
# make script for update MD5 hashes
%__cat > %buildroot%runonce_dir/create_defaulthashes << __EOF__
#!/bin/sh
#
# %runonce_dir/create_defaulthashes -- part of Rootkit Hunter
#
# Purpose: updates MD5 signatures of your binary stuff.
#
# Uses GnuPG for signing created list:
# - you should have already generated GPG key
# - should be executed interactively for passing key password
#
cd %db_dir
tstamp=\$(LANG=en date '+%%Y%%m%%d_%%H%%M%%S')
for f in %hash_list %hash_list.asc %hash_list.sig; do
test -f "\$f" && mv -f "\$f" "\$f.saved.\$tstamp"
done
cd %runonce_dir
./rpmhashes.sh > %db_dir/%hash_list
# ./createhashes.sh >> %db_dir/%hash_list
cd %db_dir
gpg --detach-sign --armor --yes %hash_list
gpg --verify %hash_list.asc
echo "
Don't forget to repeat this command after every software upgrade!"
## EOF ##
__EOF__
chmod 750 %buildroot%runonce_dir/create_defaulthashes
%post
echo ' Refresh your MD5 checksum database by following command:
GNUPGHOME=~user/.gnupg %runonce_dir/create_defaulthashes'
%preun
rm -f %db_dir/%hash_list.{asc,*saved.*}
%verifyscript
echo '%name checksum database should be verified separately by following command:
GNUPGHOME=~user/.gnupg gpg --verify %db_dir/%hash_list.asc'
%files
%_bindir/%name
%cron_script
%util_dir
%data_dir
%doc_dir
%_man8dir/*
%config(noreplace) %verify(not mtime) %_sysconfdir/%name.conf
%exclude %db_dir/%hash_list
%config(noreplace) %verify(not mtime size md5) %db_dir/%hash_list
#%exclude %scripts_dir/check_update.sh
#%exclude %db_dir/mirrors.dat
%changelog
…
Полный changelog можно просмотреть здесь