1secstate(1)                      USER COMMANDS                     secstate(1)
2
3
4
5secstate - security auditing and remediation.
6

SYNOPSIS

8       secstate <command> [options]
9

DESCRIPTION

11       Secstate is a tool that streamlines security lockdown and monitoring on
12       Linux systems. It  provides  auditing  of  a  system  against  security
13       requirements  and,  optionally,  remediating  a  system  to  meet those
14       requirements. Secstate uses  the  SCAP  language  (a  NIST  standard  -
15       http://scap.nist.gov)   and   Puppet   internally   (http://www.puppet
16       labs.com).
17
18       Using secstate involves importing  security  auditing  and  remediation
19       information  (referred to generically as content in this documentation)
20       into a stored content directory, customizing that content, and using it
21       to audit and remediate the state of the system.
22
23       The  results  of  system audits are available as in SCAP XML formats or
24       HTML.
25

COMMANDS

27       import [options] <ContentFile>
28
29              Validate and import an XCCDF benchmark and referenced  OVAL  and
30              Puppet files or a stand-alone OVAL file into the secstate stored
31              content directory. Content can be stored as an XCCDF file,  OVAL
32              file, ZIP file, tarball (.tar.gz).
33
34              If  an  XCCDF  file is provided that XCCDF benchmark is imported
35              and all dependent OVAL and Puppet files are  imported  from  the
36              directory  containing  the XCCDF file. Archives (ZIP or .tar.gz)
37              are assumed to contain an XCCDF file and one or  more  dependent
38              OVAL  and  Puppet  files and are imported as a group. Finally, a
39              single (stand-alone) OVAL or Puppet file can be imported.
40
41              An OVAL file which is imported on its own is treated as  a  top-
42              level  item and it is audited separately from any XCCDF content.
43              All Puppet files which are imported are stored in a common loca‐
44              tion and are available to all imported XCCDF content for remedi‐
45              ation.
46
47              After import, the content can be viewed using  list  or  search,
48              customized  using select / deselect, and used to audit and reme‐
49              diate. By default, top-level content is selected after import.
50
51              Example of importing an XCCDF file:
52              # ls content/
53              2-19PasswordComlexity_Lowercase.xml  2-22PasswordComplexityy_Special.xml
54              PasswordComplexity.xccdf.xml         2-23PasswordComplexity_Upercase.xml
55              # secstate import content/PasswordComplexity.xccdf.xml
56
57              Example of importing a tarball containing XCCDF and OVAL:
58              # secstate import PasswordComplexity.tar.gz
59
60              Options:
61
62              -h
63              Show the help message for import
64
65              --profile=PROFILE
66              Set the active profile during import.  The profile must exist in the
67              XCCDF benchmark.
68
69       remove [options] <ContentID>
70
71              Remove previously imported content. Like import, remove will remove
72              associated OVAL content if an XCCDF benchmark is specified. The content
73              ID can be found using the list command for both XCCDF and stand-alone
74              OVAL.
75
76              Example of removing a benchmark:
77              # secstate list
78              Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: None
79              # secstate remove PassComp
80
81       export [options] <ContentID> <OutputFile>
82
83              The export command exports an XCCDF benchmark or stand-alone OVAL file
84              from the secstate stored content directory. The content ID can be obtained with
85              secstate list. By default, the exported version includes any profiles and
86              customizations. Use -o to export the originally imported file.
87
88              # secstate list
89              Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: None
90              # secstate export PassComp PassComp.xccdf.xml
91              # ls PassComp.xccdf.xml
92              PassComp.xccdf.xml
93
94              Options:
95
96              -h
97              show the help message for import
98
99              -o, --original
100              exports the original imported content without customizations or profiles.
101
102       select [options] <ContentID> [GroupID|RuleID|ProfileID]
103
104              The select command sets an XCCDF benchmark, group, rule, profile, or a
105              stand-alone OVAL file as active. Only selected items will be used for
106              auditing and remediation.  When selecting an XCCDF group, rule, or profile
107              the XCCDF benchmark ID must be also be provided.  This eliminates the
108              possibility of inadvertently selecting the wrong item when multiple
109              benchmarks contain the same ID for a group, rule, or profile.
110
111              Profile selection:
112
113              Selecting a profile changes the active profile for an XCCDF benchmark.  Profiles
114              can contain modifications to the default state of a benchmark including but
115              not limited to rule/group selection status.
116
117              Group/Rule selection:
118
119              A rule and every one of its ancestor groups and its XCCDF benchmark must be selected
120              in order for the rule to be active during auditing and remediation.  Selecting
121              a rule or group will cause every one of its ancestors to also be selected.
122
123              When a selection is made on an XCCDF rule or group, the change is stored in a
124              profile.  If the active profile at the time of the selection was a profile
125              native to the rule or group's parent benchmark, then a new profile named 'Custom' is
126              added which extends the original profile.  If the active profile was one added by using
127              the select or deselect commands, then the active profile is modified.
128
129              Benchmark/OVAL selection:
130
131              Selecting an XCCDF benchmark or stand-alone OVAL file marks the content as
132              active when auditing or remediating imported content.
133
134              Examples of select:
135              # secstate list -a -r
136              [ ]Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: 'Custom'
137                      [ ]Group - ID: PassComp-G-2-2, Title: 'Password'
138                              [ ]Group - ID: PassComp-G-2-3, Title: 'Password Complexity'
139                                      [ ]Rule - ID: PassComp-R-2-1, Title: 'Lowercase'
140                                      [ ]Rule - ID: PassComp-R-2-2, Title: 'Min. Length'
141                                      [ ]Rule - ID: PassComp-R-2-3, Title: 'Numeric'
142                                      [ ]Rule - ID: PassComp-R-2-4, Title: 'Special'
143                                      [ ]Rule - ID: PassComp-R-2-5, Title: 'Uppercase'
144              [ ]OVAL File - ID: homedirs.oval
145
146              # secstate select PassComp PassComp-R-2-2
147              # secstate list -a -r
148              [X]Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: 'Custom'
149                      [X]Group - ID: PassComp-G-2-2, Title: 'Password'
150                              [X]Group - ID: PassComp-G-2-3, Title: 'Password Complexity'
151                                      [ ]Rule - ID: PassComp-R-2-1, Title: 'Lowercase'
152                                      [X]Rule - ID: PassComp-R-2-2, Title: 'Min. Length'
153                                      [ ]Rule - ID: PassComp-R-2-3, Title: 'Numeric'
154                                      [ ]Rule - ID: PassComp-R-2-4, Title: 'Special'
155                                      [ ]Rule - ID: PassComp-R-2-5, Title: 'Uppercase'
156              [ ]OVAL File - ID: homedirs.oval
157
158              # secstate select -r PassComp
159              # secstate list -a -r
160              [X]Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: 'Custom'
161                      [X]Group - ID: PassComp-G-2-2, Title: 'Password'
162                              [X]Group - ID: PassComp-G-2-3, Title: 'Password Complexity'
163                                      [X]Rule - ID: PassComp-R-2-1, Title: 'Lowercase'
164                                      [X]Rule - ID: PassComp-R-2-2, Title: 'Min. Length'
165                                      [X]Rule - ID: PassComp-R-2-3, Title: 'Numeric'
166                                      [X]Rule - ID: PassComp-R-2-4, Title: 'Special'
167                                      [X]Rule - ID: PassComp-R-2-5, Title: 'Uppercase'
168              [ ]OVAL File - ID: homedirs.oval
169
170              # secstate select homedirs.oval
171              # secstate list -a -r
172              [X]Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: 'Custom'
173                      [X]Group - ID: PassComp-G-2-2, Title: 'Password'
174                              [X]Group - ID: PassComp-G-2-3, Title: 'Password Complexity'
175                                      [X]Rule - ID: PassComp-R-2-1, Title: 'Lowercase'
176                                      [X]Rule - ID: PassComp-R-2-2, Title: 'Min. Length'
177                                      [X]Rule - ID: PassComp-R-2-3, Title: 'Numeric'
178                                      [X]Rule - ID: PassComp-R-2-4, Title: 'Special'
179                                      [X]Rule - ID: PassComp-R-2-5, Title: 'Uppercase'
180              [X]OVAL File - ID: homedirs.oval
181
182              Options:
183
184              -h
185              show the help text.
186
187              -r, --recurse
188              Recursively select XCCDF groups and rules inside groups or benchmarks.
189
190       deselect [options] <ContentID> [GroupID|RuleID]
191
192              The deselect command sets an XCCDF benchmark, group, or rule, or a stand-alone
193              OVAL file as deselected. Deselected items will be omitted from
194              auditing and remediation.  When deselecting an XCCDF group, rule, or profile
195              the XCCDF benchmark ID must be also be provided.  This eliminates the
196              possibility of inadvertently deselecting the wrong item when multiple
197              benchmarks contain the same ID for a group, rule, or profile.
198
199              Group/Rule deselection:
200
201              An XCCDF rule and every one of its ancestor groups and its parent benchmark must
202              be selected in order for the rule to be active during auditing and remediation.
203              Deselecting a group will cause any child groups or rules to be omitted during
204              auditing and remediation regardless of their selection status.
205
206              When a deselection is made on an XCCDF rule or group, the change is stored in a
207              profile.  If the active profile at the time of the deselection was a profile
208              native to the rule or group's parent benchmark, then a new profile named 'Custom'
209              is addedwhich extends the original profile.  If the active profile was one added by
210              using the select or deselect commands, then the active profile is modified.
211
212              Benchmark/OVAL deselection:
213
214              Deselecting an XCCDF benchmark or a stand-alone OVAL file marks the content as
215              inactive when auditing or remediating imported content.
216
217              Examples of deselect:
218
219              # secstate list -a -r
220              [X]Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: 'Custom'
221                      [X]Group - ID: PassComp-G-2-2, Title: 'Password'
222                              [X]Group - ID: PassComp-G-2-3, Title: 'Password Complexity'
223                                      [X]Rule - ID: PassComp-R-2-1, Title: 'Lowercase'
224                                      [X]Rule - ID: PassComp-R-2-2, Title: 'Min. Length'
225                                      [X]Rule - ID: PassComp-R-2-3, Title: 'Numeric'
226                                      [X]Rule - ID: PassComp-R-2-4, Title: 'Special'
227                                      [X]Rule - ID: PassComp-R-2-5, Title: 'Uppercase'
228              [X]OVAL File - ID: homedirs.oval
229
230              # secstate deselect PassComp PassComp-R-2-3
231              # secstate list -a -r
232              [X]Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: 'Custom'
233                      [X]Group - ID: PassComp-G-2-2, Title: 'Password'
234                              [X]Group - ID: PassComp-G-2-3, Title: 'Password Complexity'
235                                      [X]Rule - ID: PassComp-R-2-1, Title: 'Lowercase'
236                                      [X]Rule - ID: PassComp-R-2-2, Title: 'Min. Length'
237                                      [ ]Rule - ID: PassComp-R-2-3, Title: 'Numeric'
238                                      [X]Rule - ID: PassComp-R-2-4, Title: 'Special'
239                                      [X]Rule - ID: PassComp-R-2-5, Title: 'Uppercase'
240              [X]OVAL File - ID: homedirs.oval
241
242              # secstate deselect -r PassComp
243              # secstate list -a -r
244              [ ]Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: 'Custom'
245                      [ ]Group - ID: PassComp-G-2-2, Title: 'Password'
246                              [ ]Group - ID: PassComp-G-2-3, Title: 'Password Complexity'
247                                      [ ]Rule - ID: PassComp-R-2-1, Title: 'Lowercase'
248                                      [ ]Rule - ID: PassComp-R-2-2, Title: 'Min. Length'
249                                      [ ]Rule - ID: PassComp-R-2-3, Title: 'Numeric'
250                                      [ ]Rule - ID: PassComp-R-2-4, Title: 'Special'
251                                      [ ]Rule - ID: PassComp-R-2-5, Title: 'Uppercase'
252              [X]OVAL File - ID: homedirs.oval
253
254              # secstate deselect homedirs.oval
255              # secstate list -a -r
256              [ ]Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: 'Custom'
257                      [ ]Group - ID: PassComp-G-2-2, Title: 'Password'
258                              [ ]Group - ID: PassComp-G-2-3, Title: 'Password Complexity'
259                                      [ ]Rule - ID: PassComp-R-2-1, Title: 'Lowercase'
260                                      [ ]Rule - ID: PassComp-R-2-2, Title: 'Min. Length'
261                                      [ ]Rule - ID: PassComp-R-2-3, Title: 'Numeric'
262                                      [ ]Rule - ID: PassComp-R-2-4, Title: 'Special'
263                                      [ ]Rule - ID: PassComp-R-2-5, Title: 'Uppercase'
264              [ ]OVAL File - ID: homedirs.oval
265
266              Options:
267
268              -h
269              show the help text.
270
271              -r, --recurse
272              Recursively deselect XCCDF groups and rules rules inside group or benchmark.
273
274       save <BenchmarkID> <ProfileName>
275
276              The save command saves the currently active profile to a profile of the
277              provided name.
278
279              Options:
280
281              -h
282              show the help text.
283
284       list [options] [ContentID]
285
286              The list command displays the available XCCDF benchmarks and/or
287              stand-alone OVAL. By default, list only shows the benchmarks and OVAL
288              that are currently selected. The -a and -r can show deselected items
289              and all of the groups and rules in an XCCDF benchmark respectively.
290
291              Examples of list:
292
293              # secstate list
294              Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: 'all_deselected'
295
296              # secstate list -r
297              Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: 'all_deselected'
298                      Group - ID: PassComp-G-2-2, Title: 'Password'
299
300              # secstate list -a -r
301              [X]Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: 'all_deselected'
302                      [X]Group - ID: PassComp-G-2-2, Title: 'Password'
303                              [ ]Group - ID: PassComp-G-2-3, Title: 'Password Complexity'
304                                      [X]Rule - ID: PassComp-R-2-1, Title: 'Lowercase'
305                                      [X]Rule - ID: PassComp-R-2-2, Title: 'Min. Length'
306                                      [X]Rule - ID: PassComp-R-2-3, Title: 'Numeric'
307                                      [X]Rule - ID: PassComp-R-2-4, Title: 'Special'
308                                      [X]Rule - ID: PassComp-R-2-5, Title: 'Uppercase'
309              [ ]OVAL File - ID: 2-20PasswordComplexity_MinLen
310
311              Options:
312
313              -h
314              show the help text.
315
316              -a, --all
317              Show all items regardless of selection status.
318
319              -r, --recurse
320              Recursively list XCCDF rules inside groups or benchmarks.
321
322       show [options] <ContentID>
323
324              Show information on an XCCDF benchmark, rule, or group.
325
326              Example of show on various types of items:
327
328              # secstate show PassComp
329              PassComp:
330                      Title:  'Password Complexity'
331                      Selected:  True
332                      Profiles:
333                              [ ]emptyProfile - 'An empty profile'
334                              [ ]None
335                              [X]all_deselected
336
337              # secstate show PassComp-G-2-3
338              PassComp-G-2-3:
339                      Title:  'Password Complexity'
340                      Description:  Group pertaining specifically to password complexity.
341                      Selected:  True
342
343              # secstate show PassComp-R-2-1
344              PassComp-R-2-1:
345                      Title:  'Lowercase'
346                      Description:  Password contains minimum number of lowercase letters.
347                      Selected:  True
348
349              # secstate show -v PassComp-R-2-1
350              PassComp-R-2-1:
351                      Title:  'Lowercase'
352                      Description:  Password contains minimum number of lowercase letters.
353                      Selected:  True
354                      Member of PassComp-G-2-3
355                      Referenced Definitions:
356                              oval:com.tresys.oval.rhel:def:1000
357
358              Options:
359
360              -h
361              show the help text.
362              -v, --verbose
363              Show additional information on the item.
364
365       search [options] <string>
366
367              The search command searches through titles and descriptions of all imported
368              content and returns all items which match the provided string.
369
370              Options:
371
372              -h
373              show the help text.
374
375              -r, --reverse
376              Search for XCCDF rules which match an OVAL definition id.
377
378              -v, --verbose
379              Show additional information on matching items.
380
381       remediate [options] [BenchmarkID|BenchmarkFile]
382
383              The remediate command brings the system into compliance with one or more
384              XCCDF benchmarks.  It uses information from the fix elements of selected rules
385              and passes that information on to Puppet which makes changes to the system.
386
387              Options:
388
389              -h
390              show the help text.
391
392              -l, --log-dest
393              Output logs to FILE instead of stdout.
394
395              -n, --noop
396              Run puppet in noop mode.  No changes will be made to the system.
397
398              -p, --profile
399              Specifies the profile to use when remediating the system.
400
401              -v, --verbose
402              Prints out extra information during the remediate process.
403
404              -x, --xccdf-results
405              XCCDF results file to provide for selective remediation.
406
407              -y, --yes
408              Respond 'yes' to all prompts.
409
410       audit [options] [ContentID|ContentFile]
411
412              The audit command evaluates whether the current state of the system
413              complies with the selected rules in the specified content.  If no content
414              is specified then all imported content that is selected is evaluated. After
415              scanning, a summary is printed and by default a report is generated in
416              SCAP XML and HTML and saved to a directory named based on the hostname,
417              date, and time.
418
419              Example showing the use of audit:
420
421              # secstate list
422              Benchmark - ID: PassComp, Title: 'Password Complexity', Profile: 'all_deselected'
423              OVAL File - ID: 2-20PasswordComplexity_MinLen
424              # secstate audit PassComp
425              --Results for 'PassComp' (Profile: 'all_deselected')--
426              Passed:         0
427              Failed:         5
428              Fixed:          0
429              Not Selected:   0
430              Not Checked:    0
431              Not Applicable: 0
432              Error:          0
433              Informational:  0
434              Unknown:        0
435              # ls audit-localhost.localdomain-Fri-August-27-22_30_12-2010/
436              2-19PasswordComplexity_Lowercase.results.xml  index.html
437              2-20PasswordComplexity_MinLen.results.xml     media
438              2-21PasswordComplexity_Numeric.results.xml    PassComp.results.html
439              2-22PasswordComplexity_Special.results.xml    PassComp.results.xml
440              2-23PasswordComplexity_Uppercase.results.xml
441              Options:
442
443              -h
444              show the help text.
445
446              -p <PROFILE>, --profile=<PROFILE>
447              Selects the profile to use during auditing.
448
449              -o <OUTPUT>, --output=<OUTPUT>
450              Set the name of the output directory for XML or HTML output.
451
452              --no-xml
453              Disable XML output.
454
455              --no-html
456              Disable HTML output.
457
458              -v, --verbose
459              Show additional information on the item.
460
461              -a, --all
462              Audit all rules and groups regardless of selection status.
463
464              -r <RULE>, --rule=<RULE>
465              Audit only the specified rule.
466

EXIT STATUS

468       secstate returns 0 for success and non-0 for error.
469

AUTHOR

471       Karl MacMillan <kmacmillan@tresys.com>
472

SEE ALSO

474       oscap(30) puppet(8)
475
476
477
478version 1.0                     August 27, 2010                    secstate(1)
Impressum