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_with inline # build with inline support
10 Summary: Network intrusion detection system (IDS/IPS)
11 Summary(pl): System wykrywania intruzów w sieciach (IDS/IPS)
12 Summary(pt_BR): Ferramenta de detecção de intrusos
13 Summary(ru): Snort - ÓÉÓÔÅÍÁ ÏÂÎÁÒÕÖÅÎÉÑ ÐÏÐÙÔÏË ×ÔÏÒÖÅÎÉÑ × ÓÅÔØ
14 Summary(uk): Snort - ÓÉÓÔÅÍÁ ×ÉÑ×ÌÅÎÎÑ ÓÐÒÏ ×ÔÏÒÇÎÅÎÎÑ × ÍÅÒÅÖÕ
19 Vendor: Marty Roesch <roesch@sourcefire.com>
21 Source0: http://www.snort.org/dl/current/%{name}-%{version}.tar.gz
22 # Source0-md5: 5c3c8c69f2459bbe0c1f2057966c88a7
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 BuildRequires: libnet1-devel = 1.0.2a
34 BuildRequires: libpcap-devel
35 %{?with_mysql:BuildRequires: mysql-devel}
36 %{?with_snmp:BuildRequires: net-snmp-devel >= 5.0.7}
37 BuildRequires: openssl-devel >= 0.9.7d
38 BuildRequires: pcre-devel
39 %{?with_pgsql:BuildRequires: postgresql-devel}
40 BuildRequires: rpmbuild(macros) >= 1.202
41 BuildRequires: zlib-devel
42 %{?with_inline:BuildRequires: iptables-devel}
43 PreReq: rc-scripts >= 0.2.0
44 Requires(pre): /bin/id
45 Requires(pre): /usr/bin/getgid
46 Requires(pre): /usr/sbin/groupadd
47 Requires(pre): /usr/sbin/useradd
48 Requires(post,preun): /sbin/chkconfig
49 Requires(postun): /usr/sbin/groupdel
50 Requires(postun): /usr/sbin/userdel
51 Requires: libnet1 = 1.0.2a
52 Provides: group(snort)
53 %{?with_mysql:Provides: snort(mysql) = %{version}}
54 %{?with_pgsql:Provides: snort(pgsql) = %{version}}
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 %define _sysconfdir /etc/snort
59 %define _bindir %{_sbindir}
62 Snort is an open source network intrusion detection system, capable of
63 performing real-time traffic analysis and packet logging on IP
64 networks. It can perform protocol analysis and content
65 searching/matching in order to detect a variety of attacks and probes,
66 such as buffer overflows, stealth port scans, CGI attacks, SMB probes,
67 OS fingerprinting attempts, and much more. Snort uses a flexible rules
68 language to describe traffic that it should collect or pass, as well
69 as a detection engine that utilizes a modular plugin architecture.
70 Snort has a real- time alerting capability as well, incorporating
71 alerting mechanisms for syslog, user specified files, a UNIX socket,
72 or WinPopup messages to Windows clients using Samba's smbclient.
74 Sourcefire VRT Certified Rules requires registration.
75 https://www.snort.org/pub-bin/register.cgi
78 Snort to bazuj±cy na open source NIDS (network intrusion detection
79 systems) wykonuj±cy w czasie rzeczywistym analizê ruchu oraz logowanie
80 pakietów w sieciach IP. Jego mo¿liwo¶ci to analiza protoko³u oraz
81 zawarto¶ci w poszukiwaniu ró¿nego rodzaju ataków lub prób takich jak
82 przepe³nienia bufora, skanowanie portów typu stealth, ataki CGI,
83 próbkowanie SMB, OS fingerprinting i du¿o wiêcej. Snort u¿ywa
84 elastycznego jêzyka regu³ek do opisu ruchu, który nale¿y
85 przeanalizowaæ jak równie¿ silnika wykrywaj±cego, wykorzystuj±cego
86 modu³ow± architekturê. Snort umo¿liwia alarmowanie w czasie
87 rzeczywistym poprzez sysloga, osobny plik lub jako wiadomo¶æ WinPopup
88 poprzez klienta Samby: smbclient.
90 Regu³y certyfikowane poprzez Sourcefire wymagaj± rejestracji.
91 https://www.snort.org/pub-bin/register.cgi
94 Snort é um sniffer baseado em libpcap que pode ser usado como um
95 pequeno sistema de detecção de intrusos. Tem como característica o
96 registro de pacotes baseado em regras e também pode executar uma
97 análise do protocolo, pesquisa de padrões e detectar uma variedade de
98 assinaturas de ataques, como estouros de buffer, varreduras "stealth"
99 de portas, ataques CGI, pesquisas SMB, tentativas de descobrir o
100 sistema operacional e muito mais. Possui um sistema de alerta em tempo
101 real, com alertas enviados para o syslog, um arquivo de alertas em
102 separado ou como uma mensagem Winpopup.
105 Snort - ÜÔÏ ÓÎÉÆÆÅÒ ÐÁËÅÔÏ×, ËÏÔÏÒÙÊ ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ ËÁË ÓÉÓÔÅÍÁ
106 ÏÂÎÁÒÕÖÅÎÉÑ ÐÏÐÙÔÏË ×ÔÏÒÖÅÎÉÑ × ÓÅÔØ. Snort ÐÏÄÄÅÒÖÉ×ÁÅÔ
107 ÐÒÏÔÏËÏÌÉÒÏ×ÁÎÉÅ ÐÁËÅÔÏ× ÎÁ ÏÓÎÏ×Å ÐÒÁ×ÉÌ, ÍÏÖÅÔ ×ÙÐÏÌÎÑÔØ ÁÎÁÌÉÚ
108 ÐÒÏÔÏËÏÌÏ×, ÐÏÉÓË × ÓÏÄÅÒÖÉÍÏÍ ÐÁËÅÔÏ×. íÏÖÅÔ ÔÁËÖÅ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ ÄÌÑ
109 ÏÂÎÁÒÕÖÅÎÉÑ ÁÔÁË É "ÒÁÚ×ÅÄÏË", ÔÁËÉÈ ËÁË ÐÏÐÙÔËÉ ÁÔÁË ÔÉÐÁ
110 "ÐÅÒÅÐÏÌÎÅÎÉÅ ÂÕÆÅÒÁ", ÓËÒÙÔÏÇÏ ÓËÁÎÉÒÏ×ÁÎÉÑ ÐÏÒÔÏ×, CGI ÁÔÁË, SMB
111 ÒÁÚ×ÅÄÏË, ÐÏÐÙÔÏË ÏÂÎÁÒÕÖÅÎÉÑ ÔÉÐÁ ïó É ÍÎÏÇÏ ÄÒÕÇÏÇÏ. Snort ÍÏÖÅÔ
112 ÉÎÆÏÒÍÉÒÏ×ÁÔØ Ï ÓÏÂÙÔÉÑÈ × ÒÅÁÌØÎÏÍ ×ÒÅÍÅÎÉ, ÐÏÓÙÌÁÑ ÓÏÏÂÝÅÎÉÑ ×
113 syslog, ÏÔÄÅÌØÎÙÊ ÆÁÊÌ ÉÌÉ ËÁË WinPopup ÓÏÏÂÝÅÎÉÑ ÞÅÒÅÚ smbclient.
116 Snort - ÃÅ ÓΦÆÅÒ ÐÁËÅÔ¦×, ÝÏ ÍÏÖÅ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉÓØ ÑË ÓÉÓÔÅÍÁ
117 ×ÉÑ×ÌÅÎÎÑ ÓÐÒÏ ×ÔÏÒÇÎÅÎØ × ÍÅÒÅÖÕ. Snort ЦÄÔÒÉÍÕ¤ ÐÒÏÔÏËÏÌÀ×ÁÎÎÑ
118 ÐÁËÅÔ¦× ÎÁ ÏÓÎÏצ ÐÒÁ×ÉÌ, ÍÏÖÅ ×ÉËÏÎÕ×ÁÔÉ ÁÎÁÌ¦Ú ÐÒÏÔÏËÏ̦×, ÐÏÛÕË Õ
119 ×ͦÓÔ¦ ÐÁËÅÔ¦×. íÏÖÅ ÔÁËÏÖ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉÓØ ÄÌÑ ×ÉÑ×ÌÅÎÎÑ ÁÔÁË ÔÁ
120 "ÒÏÚצÄÏË", ÔÁËÉÈ ÑË ÓÐÒÏÂÉ ÁÔÁË ÔÉÐÕ "ÐÅÒÅÐÏ×ÎÅÎÎÑ ÂÕÆÅÒÁ",
121 ÐÒÉÈÏ×ÁÎÏÇÏ ÓËÁÎÕ×ÁÎÎÑ ÐÏÒÔ¦×, CGI ÁÔÁË, SMB ÒÏÚצÄÏË, ÓÐÒÏ ×ÉÑ×ÌÅÎÎÑ
122 ÔÉÐÕ ïó ÔÁ ÂÁÇÁÔÏ ¦ÎÛÏÇÏ. Snort ÍÏÖÅ ¦ÎÆÏÒÍÕ×ÁÔÉ ÐÒÏ ÐÏĦ§ × ÒÅÁÌØÎÏÍÕ
123 ÞÁÓ¦, ÎÁÄÓÉÌÁÀÞÉ ÐÏצÄÏÍÌÅÎÎÑ ÄÏ syslog, ÏËÒÅÍÏÇÏ ÆÁÊÌÕ ÞÉ ÑË WinPopup
124 ÐÏצÄÏÍÌÅÎÎÑ ÞÅÒÅÚ smbclient.
128 Summary(pl): Regu³ki snorta
130 PreReq: %{name} = %{version}-%{release}
135 %description rules -l pl
141 %if "%{_libdir}" == "%{_prefix}/lib64"
149 # we don't need libnsl, so don't use it
154 %{?with_inline:--enable-inline } \
155 %{?with_inline:--with-libipq-includes=%{_includedir}/libipq} \
156 --with-libnet-includes=%{_includedir}/libnet1 \
157 --with%{!?with_snmp:out}-snmp \
159 --enable-perfmonitor \
160 --with%{!?with_pgsql:out}-postgresql \
161 --with%{!?with_mysql:out}-mysql
166 rm -rf $RPM_BUILD_ROOT
167 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,%{name},cron.daily,logrotate.d} \
168 $RPM_BUILD_ROOT%{_var}/log/{%{name},archiv/%{name}} \
169 $RPM_BUILD_ROOT%{_datadir}/mibs/site \
170 $RPM_BUILD_ROOT%{_sysconfdir}/rules
173 DESTDIR=$RPM_BUILD_ROOT
175 install rules/*.config $RPM_BUILD_ROOT%{_sysconfdir}
176 install etc/unicode.map $RPM_BUILD_ROOT%{_sysconfdir}
177 install rules/*.rules $RPM_BUILD_ROOT%{_sysconfdir}/rules
178 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
179 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
180 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
183 rm -rf $RPM_BUILD_ROOT
186 %groupadd -g 46 -r snort
187 %useradd -u 46 -g snort -M -r -d %{_var}/log/snort -s /bin/false -c "SNORT IDS/IPS" snort
190 if [ "$1" = "1" ] ; then
191 /sbin/chkconfig --add snort
193 if [ -f /var/lock/subsys/snort ]; then
194 /etc/rc.d/init.d/snort restart 1>&2
196 echo "Run \"/etc/rc.d/init.d/snort start\" to start Snort daemon."
197 echo "To run snort you must download and install snort rules."
198 echo "poldek --install snort-rules or download from http://www.snort.org/"
203 if [ "$1" = "0" ] ; then
204 if [ -f /var/lock/subsys/snort ]; then
205 /etc/rc.d/init.d/snort stop 1>&2
207 /sbin/chkconfig --del snort
211 if [ "$1" = "0" ] ; then
217 %defattr(644,root,root,755)
218 %doc doc/{AUTHORS,BUGS,CREDITS,NEWS,PROBLEMS,README*,RULES.todo,TODO,USAGE,WISHLIST,*.pdf}
219 %attr(755,root,root) %{_sbindir}/*
220 %attr(770,root,snort) %dir %{_var}/log/snort
221 %attr(770,root,snort) %dir %{_var}/log/archiv/%{name}
222 %attr(750,root,snort) %dir %{_sysconfdir}
223 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/unicode.map
224 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.config
225 %attr(640,root,snort) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snort.conf
226 %attr(750,root,snort) %dir %{_sysconfdir}/rules
227 %attr(754,root,root) /etc/rc.d/init.d/%{name}
228 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
232 %defattr(644,root,root,755)
233 %attr(640,root,snort) %{_sysconfdir}/rules/*