/[ddp]/manuals/trunk/securing-howto/en/sec-tools.sgml
ViewVC logotype

Contents of /manuals/trunk/securing-howto/en/sec-tools.sgml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2793 - (show annotations) (download) (as text)
Wed Jan 12 00:57:50 2005 UTC (8 years, 5 months ago) by jfs
File MIME type: text/x-sgml
File size: 19896 byte(s)
Fixed another set of URLs thanks to Carlo Perassi
1 <!-- CVS revision of this document "$Revision: 1.4 $" -->
2
3 <chapt id="sec-tools">Security tools in Debian
4
5 <p>FIXME: More content needed.
6
7 <p>Debian provides also a number of security tools that can make a
8 Debian box suited for security purposes. This purposes include
9 protection of information systems through firewalls (either packet or
10 application-level), intrusion detection (both network and host based),
11 vulnerability assessment, antivirus, private networks, etc.
12
13 <p>Since Debian 3.0 (<em>woody</em>), the distribution features
14 cryptographic software integrated into the main distribution. OpenSSH
15 and GNU Privacy Guard are included in the default install, and strong
16 encryption is now present in web browsers and web servers, databases,
17 and so forth. Further integration of cryptography is planned for
18 future releases. This software, due to export restrictions in the US,
19 was not distributed along with the main distribution but included only
20 in non-US sites.
21
22 <sect id="vuln-asses">Remote vulnerability assessment tools
23 <p>The tools provided by Debian to perform remote vulnerability assessment
24 are:
25 <footnote>
26 Some of them are provided
27 when installing the <package>harden-remoteaudit</package> package.
28 </footnote>
29 <list>
30 <item>nessus
31 <item>raccess
32 <item>whisker
33 <item>nikto (whisker's replacement)
34 <item>bass (non-free)
35 <item>satan (non-free)
36 <!-- Will never be available, I uploaded it but their license is not proper
37 <item>saint (non-free)
38 -->
39 <!-- Might be available in the future since it holds the same license as satan
40 <item>sara (non-free)
41 -->
42 </list>
43
44 <p>By far, the most complete and up-to-date tools is
45 <package>nessus</package> which is composed of a client
46 (<package>nessus</package>) used as a GUI and a server
47 (<package>nessusd</package>) which launches the programmed
48 attacks. Nessus includes remote vulnerabilities for quite a number of
49 systems including network appliances, ftp servers, www servers,
50 etc. The latest security plugins are able even to parse a web site and
51 try to discover which interactive pages are available which could be
52 attacked. There are also Java and Win32 clients (not included in
53 Debian) which can be used to contact the management server.
54
55 <p>Notice that if you are using woody, the Nessus packages are really
56 out of date (see bug <url id="http://bugs.debian.org/183524"
57 name="#183524">). It is not difficult to backport the packages available in
58 unstable for woody, but if you find it difficult to do so you might
59 want to consider using the backported packages provided by one of the
60 co-maintainers and available at <url
61 id="http://people.debian.org/~jfs/nessus/"> (these versions might not
62 be as up-to-date as the versions available at <em>unstable</em>).
63
64 <p><package>Whisker</package> is a web-only vulnerability assessment scanner
65 including anti-IDS tactics (most of which are not <em>anti-IDS</em> anymore).
66 It is one of the best cgi-scanners available, being able to detect
67 WWW servers and launch only a given set of attacks against it. The database
68 used for scanning can be easily modified to provide for new information.
69
70 <p><package>Bass</package> (Bulk Auditing Security Scanner)
71 and <package>Satan</package> (Security Auditing Tool for Analyzing Networks)
72 must be thought of more like "proof of concept" programs than
73 as tools to be used
74 while performing audits. Both are quite ancient and are not kept up-to-date.
75 However, SATAN was the first tool to provide vulnerability assessment in
76 a simple (GUI) way and Bass is still a very high-performance assessment tool.
77
78 <sect>Network scanner tools
79 <p>Debian does provide some tools used for remote scanning of hosts
80 (but not vulnerability assessment). These tools are, in some cases,
81 used by vulnerability assessment scanners as the first type of
82 "attack" run against remote hosts in an attempt to
83 determine remote services available. Currently Debian provides:
84 <list>
85 <item>nmap
86 <item>xprobe
87 <item>queso
88 <item>knocker
89 <item>isic
90 <item>icmpush
91 <item>nbtscan (for NetBIOS audits)
92 <item>fragrouter
93 <item>strobe (from the <package>netdiag</package> package)
94 <item>hping2 (<em>Note:</em> out of date)
95 </list>
96
97 <!--
98 Ettercap is not included since its a sniffing tool not a remote probe
99 -->
100
101 <p>While as <package>queso</package> and <package>xprobe</package> provide
102 only remote operating system detection (using TCP/IP fingerprinting),
103 <package>nmap</package> and <package>knocker</package> do both operating
104 system detection and port scanning of the remote hosts. On the other
105 hand, <package>hping2</package> and <package>icmpush</package> can be
106 used for remote ICMP attack techniques.
107
108 <p>Designed specifically for Netbios networks, <package>nbtscan</package>
109 can be used to scan IP networks and retrieve name information from
110 SMB-enabled servers, including: usernames, network names, MAC
111 addresses...
112
113 <p>On the other hand, <package>fragrouter</package> can be used to
114 test network intrusion detection systems and see if the NIDS can be
115 eluded by fragmentation attacks.
116
117 <p>FIXME: Check <url id="http://bugs.debian.org/153117" name="Bug
118 #153117"> (ITP fragrouter) to see if it's included.
119
120
121 <p>FIXME add information based on
122 <url id="http://www.giac.org/practical/gcux/Stephanie_Thomas_GCUX.pdf"
123 name="Debian Linux Laptop for Road Warriors"> which describes how to
124 use Debian and a laptop to scan for wireless (803.1) networks. (Link not
125 there any more).
126
127 <sect>Internal audits
128 <p>Currently, only the <package>tiger</package> tool used in Debian can
129 be used to perform internal (also called white box) audit of hosts in
130 order to determine if the file system is properly set up, which processes
131 are listening on the host, etc.
132
133 <sect>Auditing source code
134 <p>Debian provides three packages that can be used to audit C/C++ source code
135 programs and find programming errors that might lead to potential security
136 flaws:
137 <list>
138 <item>flawfinder
139 <item>rats
140 <item>splint
141 </list>
142
143 <sect id="vpn">Virtual Private Networks
144
145 <p>A virtual private network (VPN) is a group of two or more computer
146 systems, typically connected to a private network with limited public
147 network access, that communicate securely over a public network. VPNs
148 may connect a single computer to a private network (client-server), or
149 a remote LAN to a private network (server-server). VPNs often include
150 the use of encryption, strong authentication of remote users or hosts,
151 and methods for hiding the private network's topology.
152
153 <p>Debian provides quite a few packages to set up encrypted virtual
154 private networks:
155
156 <list>
157
158 <item><package>vtun</package>
159 <item><package>tunnelv</package>
160 <item><package>cipe</package>
161 <item><package>vpnd</package>
162 <item><package>tinc</package>
163 <item><package>secvpn</package>
164 <item><package>pptpd</package>
165 <item><package>freeswan</package>
166
167 </list>
168
169 <p>The FreeSWAN package is probably the best choice overall, since it
170 promises to interoperate with almost anything that uses the IP
171 security protocol, IPsec (RFC 2411). However, the other packages
172 listed above can also help you get a secure tunnel up in a hurry. The
173 point to point tunneling protocol (PPTP) is a proprietary Microsoft
174 protocol for VPN. It is supported under Linux, but is known to have
175 serious security issues.
176
177 <p>For more information see the <url
178 id="http://www.tldp.org/HOWTO/VPN-Masquerade-HOWTO.html"
179 name="VPN-Masquerade HOWTO"> (covers IPsec and PPTP), <url
180 id="http://www.tldp.org/HOWTO/VPN-HOWTO.html" name="VPN HOWTO">
181 (covers PPP over SSH), and <url
182 id="http://www.tldp.org/HOWTO/mini/Cipe+Masq.html" name="Cipe
183 mini-HOWTO">, and <url
184 id="http://www.tldp.org/HOWTO/mini/ppp-ssh/index.html" name="PPP
185 and SSH mini-HOWTO">.
186
187 <p>Also worth checking out is
188 <url id="http://yavipin.sourceforge.net/" name="Yavipin">, but no Debian
189 GNU packages seem to be available yet.
190
191 <sect1>Point to Point tunneling
192
193 <p>If you want to provide a tunneling server for a mixed environment
194 (both Microsoft operating systems and Linux clients) and IPsec is not
195 an option (since it's only provided for Windows 2000 and Windows XP),
196 you can use <em>PoPToP</em> (Point to Point Tunneling Server),
197 provided in the <package>pptpd</package> package.
198
199 <p>If you want to use Microsoft's authentication and encryption with
200 the server provided in the <package>ppp</package> package, note the
201 following from the FAQ:
202
203 <example>
204 It is only necessary to use PPP 2.3.8 if you want Microsoft compatible
205 MSCHAPv2/MPPE authentication and encryption. The reason for this is that
206 the MSCHAPv2/MPPE patch currently supplied (19990813) is against PPP
207 2.3.8. If you don't need Microsoft compatible authentication/encryption
208 any 2.3.x PPP source will be fine.
209 </example>
210
211 <p>However, you also have to apply the kernel patch provided by the
212 <package>kernel-patch-mppe</package> package, which provides the
213 pp_mppe module for pppd.
214
215 <p>Take into account that the encryption in ppptp forces you to store
216 user passwords in clear text, and that the MS-CHAPv2 protocol contains
217 <url id="http://mopo.informatik.uni-freiburg.de/pptp_mschapv2/"
218 name="known security holes">.
219
220 <sect>Public Key Infrastructure (PKI)
221
222 <p>Public Key Infrastructure (PKI) is a security architecture
223 introduced to provide an increased level of confidence for exchanging
224 information over insecure networks. It makes use of the concept of
225 public and private cryptographic keys to verify the identity of the
226 sender (signing) and to ensure privacy (encryption).
227
228 <p>When considering a PKI, you are confronted with a wide variety of
229 issues:
230
231 <list>
232
233 <item>a Certificate Authority (CA) that can issue and verify
234 certificates, and that can work under a given hierarchy
235
236 <item>a Directory to hold user's public certificates
237
238 <item>a Database (?) to maintain Certificate Revocation Lists (CRL)
239
240 <item>devices that interoperate with the CA in order to print out
241 smart cards/USB tokens/whatever to securely store certificates
242
243 <item>certificate-aware applications that can use certificates issued
244 by a CA to enroll in encrypted communication and check given
245 certificates against CRL (for authentication and full Single Sign On
246 solutions)
247
248 <item>a Time stamping authority to digitally sign documents
249
250 <item>a management console from which all of this can be properly used
251 (certificate generation, revocation list control, etc...)
252
253 </list>
254
255 <p> Debian GNU/Linux has software packages to help you with some of
256 these PKI issues. They include <prgn>OpenSSL</prgn> (for certificate
257 generation), <prgn>OpenLDAP</prgn> (as a directory to hold the
258 certificates), <prgn>gnupg</prgn> and <prgn>freeswan</prgn> (with
259 X.509 standard support). However, as of the Woody release (Debian
260 3.0), Debian does not have any of the freely available Certificate
261 Authorities such as pyCA, <url id="http://www.openca.org"
262 name="OpenCA"> or the CA samples from OpenSSL. For more information
263 read the <url id="http://ospkibook.sourceforge.net/" name="Open PKI
264 book">.
265
266 <sect>SSL Infrastructure
267
268 <p>Debian does provide some SSL certificates with the distribution so
269 that they can be installed locally. They are found in the
270 <package>ca-certificates</package> package. This package provides a
271 central repository of certificates that have been submitted to Debian
272 and approved (that is, verified) by the package maintainer, useful for
273 any OpenSSL applications which verify SSL connections.
274
275 <p>FIXME: read debian-devel to see if there was something added to this.
276
277 <sect>Antivirus tools
278
279 <p>There are not many anti-virus tools included with Debian GNU/Linux,
280 probably because GNU/Linux users are not plagued by viruses. The UN*X
281 security model makes a distinction between privileged (root) processes
282 and user-owned processes, therefore a "hostile" executable that a
283 non-root user receives or creates and then executes cannot "infect" or
284 otherwise manipulate the whole system. However, GNU/Linux worms and
285 viruses do exist, although there has not (yet, hopefully) been any
286 that has spread in the wild over any Debian distribution. In any case,
287 administrators might want to build up anti-virus gateways that protect
288 against viruses arising on other, more vulnerable systems in their
289 network.
290
291 <p>Debian GNU/Linux currently provides the following tools for
292 building antivirus environments:
293
294 <list>
295
296 <item><url id="http://clamav.elektrapro.com/" name="Clam Antivirus">,
297 provided in Debian <em>sarge</em> (future 3.1 release). Packages are
298 provided both for the virus scanner (<package>clamav</package>) for
299 the scanner daemon (<package>clamav-daemon</package>) and for the data
300 files needed for the scanner. Since keeping an antivirus up-to-date is
301 critical for it to work properly there are two different ways to get
302 this data: <package>clamav-freshclam</package> provides a way to
303 update the database through the Internet automatically and
304 <package>clamav-data</package> which provides the data files directly
305 <footnote>If you use this last package and are running an official
306 Debian, the database will not be updated with security updates. You
307 should either use <package>clamav-freshclam</package>,
308 <prgn>clamav-getfiles</prgn> to generate new
309 <package>clamav-data</package> packages or update from the
310 maintainers location:
311 <example>
312 deb http://people.debian.org/~zugschlus/clamav-data/ /
313 deb-src http://people.debian.org/~zugschlus/clamav-data/ /
314 </example>
315 </footnote>
316
317 <item><package>mailscanner</package> an e-mail gateway virus scanner
318 and spam detector. Using <package>sendmail</package> or
319 <package>Exim</package> as its basis, it can use more than 17
320 different virus scanning engines (including <package>clamav</package>)
321
322 <item><package>libfile-scan-perl</package> which provides File::Scan,
323 a Perl extension for scanning files for viruses. This modules can be
324 used to make platform independent virus scanners.
325
326 <item><url id="http://www.sourceforge.net/projects/amavis"
327 name="Amavis Next Generation">, provided in the package
328 <package>amavis-ng</package> and available in <em>sarge</em>, which is
329 a mail virus scanner which integrates with different MTA (Exim,
330 Sendmail, Postfix, or Qmail) and supports over fifteen virus scanning
331 engines (including clamav, File::Scan and openantivirus).
332
333 <item><url id="http://packages.debian.org/sanitizer"
334 name="sanitizer">, a tool that uses the <package>procmail</package>
335 package, which can scan email attachments for viruses, block
336 attachments based on their filenames, and more.
337
338 <item><url id="http://packages.debian.org/amavis-postfix"
339 name="amavis-postfix">, a script that provides an interface from a
340 mail transport agent to one or more commercial virus scanners (this
341 package is built with support for the <prgn>postfix</prgn> MTA only).
342
343 <item><package>exiscan</package>, an e-mail virus scanner written in
344 Perl that works with Exim.
345
346 <item><package>sanitizer</package>, a scanner for mail that can remove
347 potentially dangerous attachments.
348
349 <item><package>blackhole-qmail</package> a spam filter for Qmail with
350 built-in support for Clamav.
351
352 </list>
353
354 <p>Some gateway daemons support already tools extensions to build
355 antivirus environments including <package>exim4-daemon-heavy</package>
356 (the <em>heavy</em> version of the Exim MTA), <package>frox</package>
357 (a transparent caching ftp proxy server),
358 <package>messagewall</package> (an SMTP proxy daemon) and
359 <package>pop3vscan</package> (a transparent POP3 proxy).
360
361 <p>As you can see, Debian does not currently provide antivirus
362 scanning software in the main official distribution (3.0 at the time
363 of this writing) but it does provide multiple interfaces to build
364 gateway antivirus. The <package>Clamav</package> scanner
365 will be provided in the next official release.
366
367 <p>Some other free software antivirus projects which might be included
368 in future Debian GNU/Linux releases:
369
370 <list>
371
372 <item><url id="http://sourceforge.net/projects/openantivirus/" name="Open
373 Antivirus"> (see
374 <url
375 id="http://bugs.debian.org/150698" name="Bug #150698 (ITP oav-scannerdaemon">
376 and <url id="http://bugs.debian.org/150695" name="Bug #150695 (ITP oav-update">
377 ).
378
379 </list>
380
381 <p><!-- FIXME: Not finding this package in Debian, maybe oav-update
382 replaced it? -->There is also a <package>virussignatures</package>
383 package, which provides signatures for all packages, this package
384 provides a script to download the latest virus signatures from <url
385 id="http://www.openantivirus.org/latest.php">.
386
387 <p>FIXME: check if scannerdaemon is the same as the open antivirus scanner
388 daemon (read ITPs).
389
390 <p>However, Debian will <em>never</em> provide commercial antivirus
391 software such as: Panda Antivirus,
392 <!--
393 <url
394 id="http://www.pandasoftware.com/com/linux/linux.asp" name="Panda
395 Antivirus">,
396 <url
397 id="http://www.networkassociates.com/us/downloads/evals/"
398 name="NAI Netshield (uvscan)">, -->
399 NAI Netshield,
400 <url id="http://www.sophos.com/"
401 name="Sophos Sweep">, <url id="http://www.antivirus.com"
402 name="TrendMicro Interscan">, or <url id="http://www.ravantivirus.com"
403 name="RAV">. For more pointers see the <url
404 id="http://www.computer-networking.de/~link/security/av-linux_e.txt"
405 name="Linux antivirus software mini-FAQ">. This does not mean that
406 this software can be installed properly in a Debian system.
407
408 <p>For more information on how to set up an a virus detection system
409 read Dave Jones' article <url
410 id="http://www.linuxjournal.com/article.php?sid=4882" name="Building
411 an E-mail Virus Detection System for Your Network">.
412
413 <sect id="gpg-agent">GPG agent
414
415 <p>It is very common nowadays to digitally sign (and sometimes
416 encrypt) e-mail. You might, for example, find that many people
417 participating on mailing lists sign their list e-mail. Public key
418 signatures are currently the only means to verify that an e-mail was
419 sent by the sender and not by some other person.
420
421 <p>Debian GNU/Linux provides a number of e-mail clients with built-in
422 e-mail signing capabilities that interoperate either with
423 <package>gnupg</package> or <package>pgp</package>:
424
425 <list>
426 <item><package>Evolution</package>.
427 <item><package>mutt</package>.
428 <item><package>kmail</package>.
429
430 <item><package>sylpheed</package>. Depending on how the stable version
431 of this package evolves, you may need to use the <em>bleeding edge
432 version</em>, <package>sylpheed-claws</package>.
433
434 <item><package>gnus</package>, which when installed with the
435 <package>mailcrypt</package> package, is an <prgn>emacs</prgn>
436 interface to <prgn>gnupg</prgn>.
437
438 <item><package>kuvert</package>, which provides this functionality
439 independently of your chosen mail user agent (MUA) by interacting with
440 the mail transport agent (MTA).
441
442 </list>
443
444 <p>Key servers allow you to download published public keys so that you
445 may verify signatures. One such key server is <url
446 id="http://wwwkeys.pgp.net">. <package>gnupg</package> can
447 automatically fetch public keys that are not already in your public
448 keyring. For example, to configure <prgn>gnupg</prgn> to use the above
449 key server, edit the file <file>~/.gnupg/options</file> and add the
450 following line:
451
452 <footnote>
453 For more examples of how to configure <prgn>gnupg</prgn> check
454 <file>/usr/share/doc/mutt/examples/gpg.rc</file>.
455 </footnote>
456 <example>
457 keyserver wwwkeys.pgp.net
458 </example>
459
460 <p>Most key servers are linked, so that when your public key is added
461 to one server, the addition is propagated to all the other public key
462 servers. There is also a Debian GNU/Linux package
463 <package>debian-keyring</package>, that provides all the public keys
464 of the Debian developers. The <prgn>gnupg</prgn> keyrings are
465 installed in <file>/usr/share/keyrings/</file>.
466
467 <p>For more information:
468
469 <list>
470
471 <item><url ID="http://www.gnupg.org/faq.html" name="GnuPG FAQ">.
472
473 <item><url ID="http://www.gnupg.org/gph/en/manual.html" name="GnuPG
474 Handbook">.
475
476 <item><url
477 ID="http://www.dewinter.com/gnupg_howto/english/GPGMiniHowto.html"
478 name="GnuPG Mini Howto (English)">.
479
480 <item><url ID="http://www.uk.pgp.net/pgpnet/pgp-faq/"
481 name="comp.security.pgp FAQ">.
482
483 <item><url ID="http://www.cryptnet.net/fdp/crypto/gpg-party.html"
484 name="Keysigning Party HOWTO">.
485
486 </list>

  ViewVC Help
Powered by ViewVC 1.1.5