This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Note the snippet is the second part of the script which | |
## demonstrates extracting information from DISA NIST XML files | |
## Download and unzip the latest control list | |
## from: http://iase.disa.mil/stigs/cci/Pages/index.aspx | |
$CCIControlFile = '~\Documents\U_CCI_List.xml' | |
## This is the NIST Revision we are wanting to reference: | |
$CCIFilter = 'NIST SP 800-53 Revision 4' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## set the path to the xml xccdf file. | |
$BenchMarkFilePath = '~\Documents\U_Windows_2012_and_2012_R2_MS_STIG_V2R6_Manual-xccdf.xml' | |
## load the content as XML | |
[xml]$Stigx = Get-Content -Path $BenchMarkFilePath -EA Stop | |
# start by parsing the xccdf security benchmark | |
if($Stigx){ | |
$StigCollection = @() | |
# loop through the xccdf benchmark collecting data into an object collection | |
foreach ($rule in $StigX.Benchmark.Group.Rule){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Location and file name of the download | |
$DownloadFilePath = '~\Documents\u_cci_list.zip' | |
# URL to download the file from | |
$DownloadURL = 'http://iasecontent.disa.mil/stigs/zip/u_cci_list.zip' | |
# download the zip file | |
invoke-webrequest -Uri $DownloadURL -OutFile $DownloadFilePath |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## location and file name of the download | |
$DownloadFilePath = '~\Documents\U_Windows_2012_and_2012_R2_MS_V2R6_STIG.zip' | |
## URL to download the file from | |
$DownloadURL = 'http://iasecontent.disa.mil/stigs/zip/Oct2016/U_Windows_2012_and_2012_R2_MS_V2R6_STIG.zip' | |
## download the zip file | |
invoke-webrequest -Uri $DownloadURL -OutFile $DownloadFilePath |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download and unzip your benchmark from DIA NISTA | |
# from: http://iase.disa.mil/stigs/compilations/Pages/index.aspx | |
$BenchMarkFilePath = '~\Documents\U_Windows_2012_and_2012_R2_MS_STIG_V2R6_Manual-xccdf.xml' | |
# Download and unzip the latest control list | |
# from: http://iase.disa.mil/stigs/cci/Pages/index.aspx | |
$CCIControlFile = '~\Documents\U_CCI_List.xml' | |
# This is the NIST Revision we are wanting to reference: | |
$CCIFilter = 'NIST SP 800-53 Revision 4' |