summaryrefslogtreecommitdiff
path: root/security/audit-packages/files/audit-packages.8
blob: 22ca42d35cbdbcdae1340f99eb8d3517ab50b4f8 (plain)
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
.\" $NetBSD: audit-packages.8,v 1.12 2005/06/09 08:14:08 wiz Exp $
.\"
.\" Copyright (c) 2003 Jeremy C. Reed.  All rights reserved.
.\"
.\" 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. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"      This product includes software developed by Jeremy C. Reed
.\"      for the NetBSD project.
.\" 4. 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.
.\"
.Dd May 27, 2005
.Os
.Dt AUDIT-PACKAGES 8
.Sh NAME
.Nm audit-packages ,
.Nm download-vulnerability-list
.Nd show vulnerabilities in installed packages
.Sh SYNOPSIS
.Nm
.Op Fl v
.Nm download-vulnerability-list
.Sh DESCRIPTION
The
.Nm
program compares the installed packages with the
.Pa pkg-vulnerabilities
file and reports any known security issues to standard output.
This output contains the name and version of the package, the
type of vulnerability, and an URL for further information for each
vulnerable package.
If the
.Fl v
option is specified,
.Nm
will warn when the vulnerabilities file is more than a week old.
.Pp
The
.Nm download-vulnerability-list
program downloads this file from
.Pa ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/pkg-vulnerabilities
using
.Xr @FETCH_CMD_SHORT@ 1 .
This vulnerabilities file documents all known security issues in
pkgsrc packages and is kept up-to-date by the
.Nx
packages team.
.Pp
Each line lists the package and vulnerable versions, the type of exploit,
and an Internet address for further information.
The type of exploit can be any text, although
some common types of exploits listed are:
.Bl -bullet -compact -offset indent
.It
cross-site-html
.It
cross-site-scripting
.It
denial-of-service
.It
file-permissions
.It
local-access
.It
local-code-execution
.It
local-file-read
.It
local-file-removal
.It
local-file-write
.It
local-root-file-view
.It
local-root-shell
.It
local-symlink-race
.It
local-user-file-view
.It
local-user-shell
.It
privacy-leak
.It
remote-code-execution
.It
remote-command-inject
.It
remote-file-creation
.It
remote-file-read
.It
remote-file-view
.It
remote-file-write
.It
remote-key-theft
.It
remote-root-access
.It
remote-root-shell
.It
remote-script-inject
.It
remote-server-admin
.It
remote-use-of-secret
.It
remote-user-access
.It
remote-user-file-view
.It
remote-user-shell
.It
unknown
.It
weak-authentication
.It
weak-encryption
.It
weak-ssl-authentication
.El
.Pp
By default, the vulnerabilities file is stored in the
@PKGVULNDIR@
directory.
This can be changed by defining the environment variable
.Ev PKGVULNDIR
to the directory containing the vulnerabilities file.
.Sh ENVIRONMENT
These variables can also be defined in the
@PKG_SYSCONFDIR@/audit-packages.conf
file.
.Pp
.Bl -tag -width PKGVULNDIR
.It Ev PKGVULNDIR
Specifies the directory containing the
.Pa pkg-vulnerabilities
file.
.It Ev FETCH_ARGS
Specifies optional arguments for the ftp client.
.El
.Sh FILES
.Pp
@PKGVULNDIR@/pkg-vulnerabilities
.Pp
@PKG_SYSCONFDIR@/audit-packages.conf
.Sh EXAMPLES
The
.Nm download-vulnerability-list
command can be run via
.Xr cron 8
to update the
.Pa pkg-vulnerabilities
file daily.
And
.Nm
can be run via
.Xr cron 8
(or with
.Nx Ap s
.Pa /etc/security.local
daily security script).
.Pp
The
.Nm download-vulnerability-list
command can be forced to use IPv4 with the following setting in
@PKG_SYSCONFDIR@/audit-packages.conf :
.Pp
export FETCH_ARGS="-4"
.Sh DIAGNOSTICS
The
.Nm
utility exits 0 on success, and \*[Gt]0 if an error occurs.
.Pp
The following errors can occur: 
.Bl -tag -width 10n
.It Checksum mismatch
The vulnerabilities file is corrupted.
Run
.Nm download-vulnerability-list .
.It Missing vulnerabilities file
The vulnerabilities file could not be found.
Run
.Nm download-vulnerability-list .
.It \&No checksum algorithm found
The vulnerabilities file is too old or incomplete.
Run
.Nm download-vulnerability-list .
.It \&No checksum found
The vulnerabilities file is too old or incomplete.
Run
.Nm download-vulnerability-list .
.It \&No file format version found
The vulnerabilities file is too old or incomplete.
Run
.Nm download-vulnerability-list .
.It Unsupported file format version
The vulnerabilities file is too old or too new.
If it's too old, run
.Nm download-vulnerability-list .
If it's too new, update the
.Nm audit-packages
package.
.El
.Sh SEE ALSO
.Xr pkg_info 1 ,
.Xr mk.conf 5 ,
.Xr packages 7 ,
@PKGSRCDIR@/mk/bsd.pkg.defaults.mk
and
.Rs
.%T "Documentation on the NetBSD Package System"
.Re
@PKGSRCDIR@/doc/pkgsrc.txt
.Sh HISTORY
The
.Nm
and
.Nm download-vulnerability-list
commands were originally implemented and added to
.Nx Ap s
pkgsrc by
.An Alistair Crooks
on September 19, 2000.
The original idea came from Roland Dowdeswell and Bill Sommerfeld.
.\" .Sh AUTHORS
.\" .Sh SECURITY CONSIDERATIONS