2 # TODO: - snort rules - fix description
5 %bcond_without pgsql # build without PostgreSQL storage support
6 %bcond_without mysql # build without MySQL storage support
7 %bcond_without snmp # build without SNMP support
8 %bcond_without inline # build without inline support
9 %bcond_without prelude # build without prelude support
11 Summary: Network intrusion detection system (IDS/IPS)
12 Summary(pl): System wykrywania intruzów w sieciach (IDS/IPS)
13 Summary(pt_BR): Ferramenta de detecção de intrusos
14 Summary(ru): Snort - ÓÉÓÔÅÍÁ ÏÂÎÁÒÕÖÅÎÉÑ ÐÏÐÙÔÏË ×ÔÏÒÖÅÎÉÑ × ÓÅÔØ
15 Summary(uk): Snort - ÓÉÓÔÅÍÁ ×ÉÑ×ÌÅÎÎÑ ÓÐÒÏ ×ÔÏÒÇÎÅÎÎÑ × ÍÅÒÅÖÕ
21 Source0: http://www.snort.org/dl/current/%{name}-%{version}.tar.gz
22 # Source0-md5: 9dc9060d1f2e248663eceffadfc45e7e
23 Source1: http://www.snort.org/pub-bin/downloads.cgi/Download/vrt_pr/%{name}rules-pr-2.4.tar.gz
24 # Source1-md5: 35d9a2486f8c0280bb493aa03c011927
26 Source3: %{name}.logrotate
28 Patch0: %{name}-libnet1.patch
29 Patch1: %{name}-lib64.patch
30 URL: http://www.snort.org/
31 BuildRequires: autoconf
32 BuildRequires: automake
33 %{?with_inline:BuildRequires: iptables-devel}
34 BuildRequires: libnet1-devel = 1.0.2a
35 BuildRequires: libpcap-devel
36 %{?with_prelude:BuildRequires: libprelude-devel}
37 %{?with_mysql:BuildRequires: mysql-devel}
38 %{?with_snmp:BuildRequires: net-snmp-devel >= 5.0.7}
39 BuildRequires: openssl-devel >= 0.9.7d
40 BuildRequires: pcre-devel
41 %{?with_pgsql:BuildRequires: postgresql-devel}
42 BuildRequires: rpmbuild(macros) >= 1.202
43 BuildRequires: rpmbuild(macros) >= 1.268
44 BuildRequires: zlib-devel
45 Requires(post,preun): /sbin/chkconfig
46 Requires(postun): /usr/sbin/groupdel
47 Requires(postun): /usr/sbin/userdel
48 Requires(pre): /bin/id
49 Requires(pre): /usr/bin/getgid
50 Requires(pre): /usr/sbin/groupadd
51 Requires(pre): /usr/sbin/useradd
52 Requires: libnet1 = 1.0.2a
53 Requires: rc-scripts >= 0.2.0
54 Provides: group(snort)
55 %{?with_mysql:Provides: snort(mysql) = %{version}}
56 %{?with_pgsql:Provides: snort(pgsql) = %{version}}
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60 %define _sysconfdir /etc/snort
61 %define _bindir %{_sbindir}
64 Snort is an open source network intrusion detection system, capable of
65 performing real-time traffic analysis and packet logging on IP
66 networks. It can perform protocol analysis and content
67 searching/matching in order to detect a variety of attacks and probes,
68 such as buffer overflows, stealth port scans, CGI attacks, SMB probes,
69 OS fingerprinting attempts, and much more. Snort uses a flexible rules
70 language to describe traffic that it should collect or pass, as well
71 as a detection engine that utilizes a modular plugin architecture.
72 Snort has a real- time alerting capability as well, incorporating
73 alerting mechanisms for syslog, user specified files, a UNIX socket,
74 or WinPopup messages to Windows clients using Samba's smbclient.
76 Sourcefire VRT Certified Rules requires registration.
77 https://www.snort.org/pub-bin/register.cgi
80 Snort to bazuj±cy na open source NIDS (network intrusion detection
81 systems) wykonuj±cy w czasie rzeczywistym analizê ruchu oraz logowanie
82 pakietów w sieciach IP. Jego mo¿liwo¶ci to analiza protoko³u oraz
83 zawarto¶ci w poszukiwaniu ró¿nego rodzaju ataków lub prób takich jak
84 przepe³nienia bufora, skanowanie portów typu stealth, ataki CGI,
85 próbkowanie SMB, OS fingerprinting i du¿o wiêcej. Snort u¿ywa
86 elastycznego jêzyka regu³ek do opisu ruchu, który nale¿y
87 przeanalizowaæ jak równie¿ silnika wykrywaj±cego, wykorzystuj±cego
88 modu³ow± architekturê. Snort umo¿liwia alarmowanie w czasie
89 rzeczywistym poprzez sysloga, osobny plik lub jako wiadomo¶æ WinPopup
90 poprzez klienta Samby: smbclient.
92 Regu³y certyfikowane poprzez Sourcefire wymagaj± rejestracji.
93 https://www.snort.org/pub-bin/register.cgi
96 Snort é um sniffer baseado em libpcap que pode ser usado como um
97 pequeno sistema de detecção de intrusos. Tem como característica o
98 registro de pacotes baseado em regras e também pode executar uma
99 análise do protocolo, pesquisa de padrões e detectar uma variedade de
100 assinaturas de ataques, como estouros de buffer, varreduras "stealth"
101 de portas, ataques CGI, pesquisas SMB, tentativas de descobrir o
102 sistema operacional e muito mais. Possui um sistema de alerta em tempo
103 real, com alertas enviados para o syslog, um arquivo de alertas em
104 separado ou como uma mensagem Winpopup.
107 Snort - ÜÔÏ ÓÎÉÆÆÅÒ ÐÁËÅÔÏ×, ËÏÔÏÒÙÊ ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ ËÁË ÓÉÓÔÅÍÁ
108 ÏÂÎÁÒÕÖÅÎÉÑ ÐÏÐÙÔÏË ×ÔÏÒÖÅÎÉÑ × ÓÅÔØ. Snort ÐÏÄÄÅÒÖÉ×ÁÅÔ
109 ÐÒÏÔÏËÏÌÉÒÏ×ÁÎÉÅ ÐÁËÅÔÏ× ÎÁ ÏÓÎÏ×Å ÐÒÁ×ÉÌ, ÍÏÖÅÔ ×ÙÐÏÌÎÑÔØ ÁÎÁÌÉÚ
110 ÐÒÏÔÏËÏÌÏ×, ÐÏÉÓË × ÓÏÄÅÒÖÉÍÏÍ ÐÁËÅÔÏ×. íÏÖÅÔ ÔÁËÖÅ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ ÄÌÑ
111 ÏÂÎÁÒÕÖÅÎÉÑ ÁÔÁË É "ÒÁÚ×ÅÄÏË", ÔÁËÉÈ ËÁË ÐÏÐÙÔËÉ ÁÔÁË ÔÉÐÁ
112 "ÐÅÒÅÐÏÌÎÅÎÉÅ ÂÕÆÅÒÁ", ÓËÒÙÔÏÇÏ ÓËÁÎÉÒÏ×ÁÎÉÑ ÐÏÒÔÏ×, CGI ÁÔÁË, SMB
113 ÒÁÚ×ÅÄÏË, ÐÏÐÙÔÏË ÏÂÎÁÒÕÖÅÎÉÑ ÔÉÐÁ ïó É ÍÎÏÇÏ ÄÒÕÇÏÇÏ. Snort ÍÏÖÅÔ
114 ÉÎÆÏÒÍÉÒÏ×ÁÔØ Ï ÓÏÂÙÔÉÑÈ × ÒÅÁÌØÎÏÍ ×ÒÅÍÅÎÉ, ÐÏÓÙÌÁÑ ÓÏÏÂÝÅÎÉÑ ×
115 syslog, ÏÔÄÅÌØÎÙÊ ÆÁÊÌ ÉÌÉ ËÁË WinPopup ÓÏÏÂÝÅÎÉÑ ÞÅÒÅÚ smbclient.
118 Snort - ÃÅ ÓΦÆÅÒ ÐÁËÅÔ¦×, ÝÏ ÍÏÖÅ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉÓØ ÑË ÓÉÓÔÅÍÁ
119 ×ÉÑ×ÌÅÎÎÑ ÓÐÒÏ ×ÔÏÒÇÎÅÎØ × ÍÅÒÅÖÕ. Snort ЦÄÔÒÉÍÕ¤ ÐÒÏÔÏËÏÌÀ×ÁÎÎÑ
120 ÐÁËÅÔ¦× ÎÁ ÏÓÎÏצ ÐÒÁ×ÉÌ, ÍÏÖÅ ×ÉËÏÎÕ×ÁÔÉ ÁÎÁÌ¦Ú ÐÒÏÔÏËÏ̦×, ÐÏÛÕË Õ
121 ×ͦÓÔ¦ ÐÁËÅÔ¦×. íÏÖÅ ÔÁËÏÖ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉÓØ ÄÌÑ ×ÉÑ×ÌÅÎÎÑ ÁÔÁË ÔÁ
122 "ÒÏÚצÄÏË", ÔÁËÉÈ ÑË ÓÐÒÏÂÉ ÁÔÁË ÔÉÐÕ "ÐÅÒÅÐÏ×ÎÅÎÎÑ ÂÕÆÅÒÁ",
123 ÐÒÉÈÏ×ÁÎÏÇÏ ÓËÁÎÕ×ÁÎÎÑ ÐÏÒÔ¦×, CGI ÁÔÁË, SMB ÒÏÚצÄÏË, ÓÐÒÏ ×ÉÑ×ÌÅÎÎÑ
124 ÔÉÐÕ ïó ÔÁ ÂÁÇÁÔÏ ¦ÎÛÏÇÏ. Snort ÍÏÖÅ ¦ÎÆÏÒÍÕ×ÁÔÉ ÐÒÏ ÐÏĦ§ × ÒÅÁÌØÎÏÍÕ
125 ÞÁÓ¦, ÎÁÄÓÉÌÁÀÞÉ ÐÏצÄÏÍÌÅÎÎÑ ÄÏ syslog, ÏËÒÅÍÏÇÏ ÆÁÊÌÕ ÞÉ ÑË WinPopup
126 ÐÏצÄÏÍÌÅÎÎÑ ÞÅÒÅÚ smbclient.
130 Summary(pl): Regu³ki snorta
132 Requires: %{name} = %{version}-%{release}
137 %description rules -l pl
143 %if "%{_lib}" == "lib64"
151 # we don't need libnsl, so don't use it
156 %{?with_inline:--enable-inline } \
157 %{?with_inline:--with-libipq-includes=%{_includedir}/libipq } \
158 --with-libnet-includes=%{_includedir} \
159 --with%{!?with_snmp:out}-snmp \
161 --enable-perfmonitor \
162 --with%{!?with_pgsql:out}-postgresql \
163 --with%{!?with_mysql:out}-mysql \
164 %{?with_prelude:--enable-prelude }
169 rm -rf $RPM_BUILD_ROOT
170 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,%{name},cron.daily,logrotate.d} \
171 $RPM_BUILD_ROOT%{_var}/log/{%{name},archiv/%{name}} \
172 $RPM_BUILD_ROOT%{_datadir}/mibs/site \
173 $RPM_BUILD_ROOT%{_sysconfdir}/rules
176 DESTDIR=$RPM_BUILD_ROOT
178 install rules/*.config $RPM_BUILD_ROOT%{_sysconfdir}
179 install etc/unicode.map $RPM_BUILD_ROOT%{_sysconfdir}
180 install rules/*.rules $RPM_BUILD_ROOT%{_sysconfdir}/rules
181 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
182 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
183 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
185 mv schemas/create_mysql schemas/create_mysql.sql
186 mv schemas/create_postgresql schemas/create_postgresql.sql
189 rm -rf $RPM_BUILD_ROOT
192 %groupadd -g 46 -r snort
193 %useradd -u 46 -g snort -M -r -d %{_var}/log/snort -s /bin/false -c "SNORT IDS/IPS" snort
196 /sbin/chkconfig --add snort
197 %service snort restart
198 if [ "$1" = 1 ]; then
199 %banner -e %{name} <<-EOF
200 To run snort you must download and install snort rules.
201 poldek -u snort-rules or download from http://www.snort.org/
207 if [ "$1" = "0" ] ; then
209 /sbin/chkconfig --del snort
213 if [ "$1" = "0" ] ; then
219 %defattr(644,root,root,755)
220 %doc doc/{AUTHORS,BUGS,CREDITS,NEWS,PROBLEMS,README*,RULES.todo,TODO,USAGE,WISHLIST,*.pdf}
221 %doc schemas/create_{mysql,postgresql}.sql
222 %attr(755,root,root) %{_sbindir}/*
223 %attr(770,root,snort) %dir %{_var}/log/snort
224 %attr(770,root,snort) %dir %{_var}/log/archiv/%{name}
225 %attr(750,root,snort) %dir %{_sysconfdir}
226 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/unicode.map
227 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.config
228 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snort.conf
229 %attr(750,root,snort) %dir %{_sysconfdir}/rules
230 %attr(754,root,root) /etc/rc.d/init.d/%{name}
231 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
235 %defattr(644,root,root,755)
236 %attr(640,root,snort) %{_sysconfdir}/rules/*