3 .\" Copyright (c) 2008 Elad Efrat <elad@NetBSD.org>
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. The name of the author may not be used to endorse or promote products
15 .\" derived from this software without specific prior written permission.
17 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 file integrity subsystem
37 is an in-kernel, real-time, file-system independent, file integrity
39 It can be used for a variety of purposes, including defense against trojaned
40 binaries, indirect attacks via third-party remote file-systems, and malicious
41 configuration file corruption.
43 .Ss Signatures Database
45 requires a signatures database -- a list of monitored files, along with their
46 digital fingerprint and (optionally) access modes.
47 The format of this file is described by
53 for generating the signatures database.
55 .Bd -literal -offset indent
59 Although it should be loaded on system boot (see
61 below), this list can be loaded manually using
63 .Bd -literal -offset indent
66 .Ss Kernel Configuration
68 requires a pseudo-device to run:
69 .Bd -literal -offset indent
70 pseudo-device veriexec 1
73 Additionally, one or more options for digital fingerprint algorithm support:
74 .Bd -literal -offset indent
75 options VERIFIED_EXEC_FP_SHA256
76 options VERIFIED_EXEC_FP_SHA512
79 Some kernels already enable
82 See your kernel's config file for more information.
86 also allows loading signatures and setting the strict level (see below) during
87 the boot process using the following variables set in
89 .Bd -literal -offset indent
91 veriexec_strict=1 # IDS mode
95 can operate in four modes, also referred to as strict levels:
97 .It Learning mode ( strict level 0 )
98 The only level at which the fingerprint tables can be modified, this level is
99 used to help fine-tune the signature database.
100 No enforcement is made, and verbose information is provided (fingerprint
101 matches and mismatches, file removals, incorrect access, etc.).
102 .It IDS mode ( strict level 1 )
103 IDS (intrusion detection system) mode provides an adequate level of integrity
104 for the files it monitors.
109 Monitored files cannot be removed
111 If raw disk access is granted to a disk with monitored files on it, all
112 monitored files' fingerprints will be invalidated
114 Access to files with mismatched fingerprints is denied
116 Write access to monitored files is allowed
118 Access type is not enforced
120 .It IPS mode ( strict level 2 )
121 IPS (intrusion prevention system) mode provides a high level of integrity
122 for the files it monitors.
127 All implications of IDS mode
129 Write access to monitored files is denied
131 Access type is enforced
133 Raw disk access to disk devices with monitored files on them is denied
135 Execution of non-monitored files is denied
137 Write access to kernel memory via
143 .It Lockdown mode ( strict level 3 )
144 Lockdown mode provides high assurance integrity for the entire system.
149 All implications of IPS mode
151 Access to non-monitored files is denied
153 Write access to files is allowed only if the file was opened before the
154 strict level was raised to this mode
156 Creation of new files is denied
158 Raw access to system disks is denied
161 .Sh RUNTIME INFORMATION
163 exports runtime information that may be useful for various purposes.
165 It reports the currently supported fingerprinting algorithms, for example:
166 .Bd -literal -offset indent
167 # /sbin/sysctl kern.veriexec.algorithms
168 kern.veriexec.algorithms = RMD160 SHA256 SHA384 SHA512 SHA1 MD5
171 It reports the current verbosity and strict levels, for example:
172 .Bd -literal -offset indent
173 # /sbin/sysctl kern.veriexec.{verbose,strict}
174 kern.veriexec.verbose = 0
175 kern.veriexec.strict = 1
178 It reports a summary of currently loaded files and the mount-points they're on,
180 .Bd -literal -offset indent
181 # /sbin/sysctl kern.veriexec.count
182 kern.veriexec.count.table0.mntpt = /
183 kern.veriexec.count.table0.fstype = ffs
184 kern.veriexec.count.table0.nentries = 33
187 Other information may be retrieved using
197 .An Elad Efrat Aq elad@NetBSD.org