2005-08-07 15:17:31 +04:00
|
|
|
.\" $NetBSD: veriexecctl.8,v 1.17 2005/08/07 11:17:31 wiz Exp $
|
2002-11-23 13:52:49 +03:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1999
|
|
|
|
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
|
|
|
|
.\"
|
|
|
|
.\" This code is donated to The NetBSD Foundation by the author.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. The name of the Author may not be used to endorse or promote
|
|
|
|
.\" products derived from this software without specific prior written
|
|
|
|
.\" permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
2005-08-07 15:17:31 +04:00
|
|
|
.\" $Id: veriexecctl.8,v 1.17 2005/08/07 11:17:31 wiz Exp $
|
2002-11-23 13:52:49 +03:00
|
|
|
.\"
|
2005-08-07 15:17:31 +04:00
|
|
|
.Dd August 6, 2005
|
2002-11-23 13:52:49 +03:00
|
|
|
.Dt VERIEXECCTL 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm veriexecctl
|
2005-08-02 22:06:14 +04:00
|
|
|
.Nd load or report veriexec fingerprints
|
2002-11-23 13:52:49 +03:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2005-08-02 22:06:14 +04:00
|
|
|
.Cm load Ar signatures
|
2002-11-23 13:52:49 +03:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
2005-08-02 22:06:14 +04:00
|
|
|
command is used to manipulate the Veriexec feature.
|
|
|
|
Veriexec must have been configured into the booted kernel for this
|
2005-04-20 17:44:45 +04:00
|
|
|
commaned to work.
|
|
|
|
.Sh COMMANDS
|
2005-04-22 18:35:13 +04:00
|
|
|
.Bl -tag -width 25n
|
2005-08-02 22:06:14 +04:00
|
|
|
.It Cm load Ar signatures
|
2005-04-22 18:35:13 +04:00
|
|
|
Load the fingerprint entries contained in
|
2005-08-02 22:06:14 +04:00
|
|
|
.Ar signatures
|
2005-04-22 18:35:13 +04:00
|
|
|
into the in kernel tables.
|
2005-08-02 22:06:14 +04:00
|
|
|
This operation is only available if kern.veriexec.strict is zero.
|
2005-04-22 18:35:13 +04:00
|
|
|
Once loaded the kernel can then validate executed programs
|
|
|
|
or files against the loaded fingerprints and report when fingerprints
|
|
|
|
do not match.
|
|
|
|
.El
|
2005-08-02 22:06:14 +04:00
|
|
|
.Sh SIGNATURES
|
2002-11-23 13:52:49 +03:00
|
|
|
The
|
2005-08-02 22:06:14 +04:00
|
|
|
.Pa signatures
|
2002-11-23 13:52:49 +03:00
|
|
|
file contains lines of fields (separated by one or more whitespace
|
|
|
|
characters) of the form:
|
2004-03-06 15:03:48 +03:00
|
|
|
.Pp
|
|
|
|
.Dl path type fingerprint options
|
|
|
|
.Pp
|
|
|
|
Where
|
|
|
|
.Em path
|
|
|
|
is the full path to the file and
|
|
|
|
.Em type
|
2005-04-20 17:44:45 +04:00
|
|
|
is the type of fingerprint used, see above for the default list.
|
2005-06-13 17:05:29 +04:00
|
|
|
Other fingerprints may be available depending on kernel configuration.
|
2004-03-06 15:03:48 +03:00
|
|
|
The
|
|
|
|
.Em fingerprint
|
|
|
|
field is a hexadecimal representation of the fingerprint for
|
|
|
|
the file.
|
|
|
|
The field
|
|
|
|
.Em options
|
|
|
|
contains the associated options for the file.
|
2005-08-06 13:00:20 +04:00
|
|
|
Currently there are seven valid options:
|
2004-03-06 15:03:48 +03:00
|
|
|
.Pp
|
2005-08-06 13:00:20 +04:00
|
|
|
.Bl -tag -width INTERPRETER -compact
|
2005-08-02 22:06:14 +04:00
|
|
|
.It Dv DIRECT
|
|
|
|
Allow direct execution only.
|
2005-04-22 18:35:13 +04:00
|
|
|
.It Dv INDIRECT
|
2002-11-23 13:52:49 +03:00
|
|
|
If this option is set then the executable cannot be invoked directly, it
|
|
|
|
can only be used as an interpreter in shell scripts.
|
2005-04-22 18:35:13 +04:00
|
|
|
.It Dv FILE
|
2002-11-23 13:52:49 +03:00
|
|
|
Indicates that the fingerprint is associated with a file, not an
|
|
|
|
executable.
|
|
|
|
Files have their fingerprints verified during
|
|
|
|
.Xr open 2
|
|
|
|
and are automatically made read only.
|
2004-03-06 15:03:48 +03:00
|
|
|
This option may be used to verify shared libraries have not been
|
|
|
|
tampered with.
|
2005-08-06 13:00:20 +04:00
|
|
|
.It Dv PROGRAM
|
2005-08-07 15:17:31 +04:00
|
|
|
An alias for
|
|
|
|
.Dv DIRECT ,
|
|
|
|
allow direct execution only.
|
2005-08-06 13:00:20 +04:00
|
|
|
.It Dv INTERPRETER
|
2005-08-07 15:17:31 +04:00
|
|
|
An alias for
|
|
|
|
.Dv INDIRECT ,
|
|
|
|
the executable may only be used as an interpreter
|
2005-08-06 13:00:20 +04:00
|
|
|
for shell scripts.
|
|
|
|
.It Dv SCRIPT
|
|
|
|
The file is a shell script.
|
2005-08-07 15:17:31 +04:00
|
|
|
For correct operation of veriexec, a script must have both
|
|
|
|
.Dv FILE
|
|
|
|
and
|
|
|
|
.Dv DIRECT
|
|
|
|
attributes set.
|
2005-08-06 13:00:20 +04:00
|
|
|
This option is a shorthand way of setting the options for correct
|
|
|
|
operation of shell scripts.
|
|
|
|
.It Dv LIBRARY
|
2005-08-07 15:17:31 +04:00
|
|
|
The file is a library, this option is an alias of the
|
|
|
|
.Dv FILE
|
|
|
|
option.
|
2002-11-23 13:52:49 +03:00
|
|
|
.El
|
2004-03-06 15:03:48 +03:00
|
|
|
.Pp
|
2002-11-23 13:52:49 +03:00
|
|
|
There must be only one executable/fingerprint pair per line.
|
|
|
|
Comments are indicated by the first character of a line being a
|
|
|
|
.Sq \&#
|
|
|
|
character.
|
2005-08-02 22:06:14 +04:00
|
|
|
Multiple options can be combined using a
|
|
|
|
.Sq \&,
|
|
|
|
character.
|
|
|
|
If no options are specified, both direct and indirect execution
|
|
|
|
are implied.
|
2002-11-23 13:52:49 +03:00
|
|
|
.Sh FILES
|
2005-08-02 22:06:14 +04:00
|
|
|
.Bl -tag -width /etc/signatures -compact
|
2002-12-22 02:41:44 +03:00
|
|
|
.It Pa /dev/veriexec
|
2005-08-02 22:06:14 +04:00
|
|
|
veriexec device node
|
|
|
|
.It Pa /etc/signatures
|
|
|
|
default signatures file
|
2002-11-23 13:52:49 +03:00
|
|
|
.El
|
2005-01-06 03:33:54 +03:00
|
|
|
.Sh SEE ALSO
|
2005-04-22 18:37:10 +04:00
|
|
|
.Xr veriexec 4 ,
|
2005-01-06 03:33:54 +03:00
|
|
|
.Pa /usr/share/examples/veriexecctl/gen_md5 ,
|
2005-04-22 18:35:13 +04:00
|
|
|
.Pa /usr/share/examples/veriexecctl/gen_rmd160 ,
|
2005-01-06 18:28:13 +03:00
|
|
|
.Pa /usr/share/examples/veriexecctl/gen_sha1
|
2002-11-23 13:52:49 +03:00
|
|
|
.Sh HISTORY
|
|
|
|
.Nm
|
|
|
|
first appeared in
|
2003-01-20 00:25:36 +03:00
|
|
|
.Nx 2.0 .
|
2002-11-23 13:52:49 +03:00
|
|
|
.Sh NOTES
|
|
|
|
.Nm
|
|
|
|
requires the kernel to have been configured with the
|
|
|
|
.Dv VERIFIED_EXEC
|
2005-08-02 22:06:14 +04:00
|
|
|
option and the veriexec pseudo-device.
|
2005-04-24 17:23:55 +04:00
|
|
|
.Sh BUGS
|
|
|
|
There must be no whitespace in the path field of a fingerprint entry.
|