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