Git Product home page Git Product logo

fbprogmbh / audit-test-automation Goto Github PK

View Code? Open in Web Editor NEW
78.0 9.0 25.0 26.53 MB

The Audit Test Automation Package gives you the ability to get an overview about the compliance status of several systems. You can easily create HTML-reports and have a transparent overview over compliance and non-compliance of explicit setttings and configurations in comparison to industry standards and hardening guides.

Home Page: https://fb-pro.com/audit-test-automation-package-audit-tap/

License: BSD 3-Clause "New" or "Revised" License

PowerShell 98.53% CSS 0.10% Inno Setup 0.03% JavaScript 0.08% Shell 1.26%
audit compliance cis benchmark iis webserver webserver-benchmarking industry-standards hardening-guides

audit-test-automation's Introduction

Audit Test Automation Package

Powershell Gallery Direct download

ATAPHtmlReport:
ataphtmlreportshield

ATAPAuditor:
atapauditorshield

AuditTAP Release 5.9.0:
ATAP

Table of contents

Overview

Our Audit Test Automation Package enables you to get an overview about the compliance status of your systems against established hardening guidelines. Below you will find an overview of the integrated hardening standards and their respective authors (such as Microsoft, CIS, BSI, etc.). The resulting HTML-reports provide a transparent and comprehensible overview over the compliance-status for each of the different settings and configurations suggested inside the provided industry standards and hardening guides.

Modules

The package consists of the following PowerShell modules:

  • ATAPHtmlReport
  • ATAPAuditor

Reports

ATAPAuditor contains reports based on the following benchmarks including the version number. How to read the table below:

  • The entries in the DISA column specify the version of the DISA STIG that is used.
  • The entries in the CIS column specify the version of the CIS benchmark that is used.
  • The entries in the MS column specify the version of the Microsoft security baseline that is used.
  • The entries in the BSI column specify the version of the BSI benchmark that is used.
  • The entries in the ACSC column specify the version of the ACSC benchmark that is used.

We currently support the following reports, based on these topics:

Application

Report DISA CIS Microsoft BSI ACSC
Google Chrome V1R15 2.0.0 - - -
Mozilla Firefox V4R24 1.0.0 - - -
Microsoft Edge - 2.0.0 99 - -
Microsoft Internet Explorer 11 V1R16 1.0.0 2004 - -
Microsoft IIS10 - 1.1.1 - - -
Microsoft Office 2016 Excel V1R2 - - - -
Microsoft Office 2016 Outlook V1R2 - - - -
Microsoft Office 2016 PowerPoint V1R1 - - - -
Microsoft Office 2016 SkypeForBusiness V1R1 - - - -
Microsoft Office 2016 Word V1R1 - - - -
Microsoft Office 2016 V1R1, V1R2 1.1.0 - - -
Microsoft SQL Server 2016 - 1.3.0 - - -

The report Microsoft Office 2016 aggregates the results of all Microsoft Office 2016 <Product> reports.

Microsoft OS

Report DISA CIS Microsoft BSI ACSC
Microsoft Windows 7 - 3.1.0 - - -
Microsoft Windows 10 V1R23 2.0.0 21H1 SiSyPHuS 1.3 21H1
Microsoft Windows 10 GDPR - - 16082019 V1.1 -
Microsoft Windows 10 BSI - - - SiSyPHuS 1.3 -
Microsoft Windows 10 Stand-alone - Stand-alone 2.0.0 - SiSyPHuS 1.3 (Stand-alone) -
Microsoft Windows 11 Stand-alone - Stand-alone 2.0.0 - SiSyPHuS 1.3 (Stand-alone) -
Microsoft Windows 11 - 3.0.0 22H2 SiSyPHuS 1.3 -
Microsoft Windows Server 2012 2.19 2.6.0 - - -
Microsoft Windows Server 2016 1.12 2.0.0 FINAL - -
Microsoft Windows Server 2016 DC V1R6 2.0.0 FINAL - -
Microsoft Windows Server 2019 1.5 2.0.0 FINAL - -
Microsoft Windows Server 2019 DC V1R2 2.0.0 FINAL - -
Microsoft Windows Server 2022 V1R1 2.0.0 FINAL - -
Microsoft Windows Server 2022 DC - 2.0.0 FINAL - -

The report Microsoft Windows 10 BSI aggregates the results of all BSI recommendations for Microsoft Windows 10 reports.

Unix OS

Report DISA CIS Microsoft BSI ACSC FB Pro
Debian 10 - - - - - Base
Debian 11 - 1.0.0 - - - -
Fedora 35 - - - - - Base
Red Hat Enterprise Linux 8 - - - - - Base
SUSE Linux Enterprise 15 - 1.1.1 - - - -
Ubuntu 20.04 - 1.1.0 - - - -
Ubuntu 22.04 - 1.0.0 - - - -

Prerequisites

Before proceeding with the installation, please ensure the following prerequisites are met:

Windows

  • PowerShell version 5.1
  • Administrative permissions on the system to be audited

How to install

We offer several ways of how you can use our free of charge . Find several detailed explanations below and use them as follows:

  • Installation via PSGallery - just install our package directly from PowerShell Gallery.
  • Manual installation - use the manual way in case you do not have internet connectivity on the system you want to check. We are aware of these "non connected" scenarios for example in datacenter environments.
  • Use our installer to install or update

Installation from PS Gallery

Simple and straight-forward. Install with a single line of code.

Install-Module -Name ATAPAuditor

Video tutorial for manual installation

Following the well-known phrase "A picture is worth a thousand words" we visualized -installation in a roughly three minute video. The first half of the video guides through the process of manual installation, the second half shows installation via PowerShell Gallery.

See the Installing a PowerShell module guide for more specific instructions.

  1. Download the most recent release
  2. In case your systems security configuration prevents direct execution / access on internet based ("untrusted") files you may need to "unblock" the file first.
Unblock-File -Path .\Audit-Test-Automation-5.9.0.zip -Verbose

The following screenshot shows the output:

grafik

  1. Extract the archive, for example by using the following commands in PowerShell or by using your favourite unzipping toolset.
    When using PowerShell, please check correct version number with below code example.
Expand-Archive -Path ".\Audit-Test-Automation-5.9.0.zip" -DestinationPath "AuditTAP"
  1. Copy ATAPAuditor and ATAPHtmlReport modules to any of the paths of $env:PSModulePath.

Installer

Download the installer from the releases page. The wizard will guide you through the installation steps to install the necessary modules, along with a convenient Start-menu shortcut.

Linux

For usage on Linux systems a PowerShell installation is required. The necessary steps depend on the Linux distribution and is documented here. Once PowerShell is installed proceed with a manual installation or using PS Gallery.

Usage

Optionally, import ATAPAuditor module:

Import-Module -Name ATAPAuditor

By default the module creates a new report in Documents\ATAPReports folder. A list of all available reports can be found in above table. Just substitute the ReportName with the name of the benchmark. Append -Path to specify output folder.

❗ ATAP is only compatible with PowerShell 5.1. When run in a different PowerShell version, the user will be prompted to open a PowerShell 5 console or stop the script. ❗

Examples:

Save-ATAPHtmlReport -ReportName "Microsoft Windows 11 Stand-alone" -RiskScore -Path C:\Temp\report.html
Save-ATAPHtmlReport -ReportName "Microsoft Windows 10" -RiskScore -Path C:\Temp\report.html
Save-ATAPHtmlReport -ReportName "Microsoft Windows 11" -Path C:\Temp\report.html
Save-ATAPHtmlReport -ReportName "Microsoft Windows 10 BSI" -RiskScore -Path C:\Temp
Save-ATAPHtmlReport -ReportName "Microsoft Windows Server 2022" -Path C:\Temp
Save-ATAPHtmlReport -ReportName "Google Chrome"
Save-ATAPHtmlReport -ReportName "Ubuntu 20.04"

Pro-Tip: After typing Save-ATAPHtmlReport -ReportName, use the keyboard shortcut <ctrl> + <space> to display all available parameters and select the desired report using arrow-keys.

The ATAPAuditor module also provides a simple menu based runner for reports. It can be found in ATAPAuditor\Helpers\Menu.ps1. When using the Windows based installer, a shortcut can be found in the start menu.

How to Update

In order to update AuditTAP, you need to update both modules "ATAPAuditor" and "ATAPHtmlReport". To do that, just run the following line of code:

For updating ATAPAuditor:

Update-Module ATAPAuditor

For updating ATAPHtmlReport:

Update-Module ATAPHtmlReport

If you want to update via Installer, make sure to download the latest version of AuditTAP. Then just follow the installation steps.

Good to know

  • Make sure your execution policy is set to at least remoteSigned (the scripts are not digitally signed)
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
  • You can extend your AuditReports with a RiskScore by adding the RiskScore-Switch parameter (currently only available for Windows Reports):
Save-ATAPHtmlReport -ReportName "Microsoft Windows 10" -Force -RiskScore
  • ATAPAuditor has a dependency on ATAPHtmlReport.
  • Some reports take more than a few seconds because hundreds of individual settings and controls are checked. Please be patient, the result will satisfy your needs 😉
  • If you used old versions of AuditTAP you may want to clean up your modules. Be sure you have not integrated AuditTAP functionality in reporting processes. In order to accomplish this task you can use the following script.
# Remove all old AuditTAP Reports if available
$collection = @("ATAPHtmlReport","Excel2016Audit","GoogleChromeAudit","IIS8Audit","IIS10Audit","MicrosoftIE11Audit","MozillaFirefoxAudit","Outlook2016Audit","Powerpoint2016Audit","Skype4Business2016Audit","SQL2016Benchmarks","Windows10Audit","Windows10GDPRAudit","WindowsServer2016Audit","Word2016Audit")
ForEach ($item in $collection)
{
  if (Get-Module -ListAvailable -Name $item)
  {
    # Module found, so remove it
    $installPath = Get-Module -ListAvailable $item | Select-Object -ExpandProperty Path | Split-Path -Parent
    Remove-Item -Path $installPath -Recurse -Force -Confirm:$false
  }
  else
  {
    # Module not installed, do nothing and take next item
  }
}

Sample reports

You can find several sample reports in the "Samples" folder.

Customization

You can change the default folder for Save-ATAPHtmlReport, which is Documents\ATAPReports, by creating and later editing the environment variable ATAPReportPath. Environment variables can be set for different scopes - please choose the one that fits your needs. The following samples will set the default path to 'C:\ATAPReports'.

Temporary scope: CurrentSession

$env:ATAPReportPath = 'C:\ATAPReports'

Permanent scope: CurrentUser

[System.Environment]::SetEnvironmentVariable('ATAPReportPath','C:\ATAPReports',[System.EnvironmentVariableTarget]::User)

Permanent scope: Machine

[System.Environment]::SetEnvironmentVariable('ATAPReportPath','C:\ATAPReports',[System.EnvironmentVariableTarget]::Machine)

Converting reports to xml instead of HTML

For this functionality, it is handy to know the Invoke-ATAPReport command can be used: Just use the following code snippet, and exchange the variables "Reportname" and "FilePath".

$Reportname = "Microsoft Windows 11"
$FilePath = "C://YourPath/YourFileName.xml"
ConvertTo-Xml -InputObject (Invoke-ATAPReport -ReportName $ReportName) -As "String" -Depth 10 | Out-File -FilePath $FilePath

Related links

AuditTAP information

Hardening recommendations in general

Questions, issues or project support

Please check the FAQ-section first before opening an issue or contacting us.

  • For questions or issues regarding AuditTAP please use GitHub issue tracker.
  • For questions regarding project support please write a short mail to [email protected]

audit-test-automation's People

Contributors

beneboe avatar davni-fbp avatar devesly avatar flobroeder avatar greghicks01 avatar henrik1002 avatar lea-dunkel avatar mischw avatar nickibroichhausen avatar pathelb avatar peteruixiv avatar pfeilimkopf avatar phfriedrich avatar qngngyn avatar schmmax avatar steffenwinternheimer avatar svenschrader avatar swalbart avatar tuemmlerkelch avatar xarristo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

audit-test-automation's Issues

Test-SV-88475r1_rule: wrong porperty

local guest account SID ends with 501
$account = Get-localUser | Where-Object -Property sid -like "S-1-5-*-501"

	if ( $account.Disabled ) {

Property Disabled does not exist, it should be tested for enabled -eq $false.

Add system information to report

Add system information like hostname, operation system, iis version, free disk space, disk space, total ram, ram usage. Branding

IIS Audit needs to check SCHANNEL registry values for alternate Enabled value of 0xffffffff

After using IIS Crypto: https://www.nartac.com/Products/IISCrypto/ I tried running IIS10Audit again and was still getting failures. After digging further I noticed they were changing the values to 0xffffffff as enabled instead of dword 1. So I emailed them and they confirmed that is intentional behavior:

Actually both are valid. Microsoft's own documentation also conflicts with itself:
https://support.microsoft.com/en-us/help/245030/how-to-restrict-the-use-of-certain-cryptographic-algorithms-and-protoc
IIS Crypto originally set them to 1 and then a bunch of people complained as it did break software (not audit tools) so we changed it to the proper 0xffffffff. IIS Crypto will read both 1 and 0xffffffff when run though.

So I would request that IISAudit check for both values as valid Enabled.

IIS10 Cannot read the configuration file

Please check: if an application is not available, because of not existing physical folder. Audit TAP should mark them, and should not try to read the web.config.

Error message:
Ausnahme beim Aufrufen von "GetSection" mit 1 Argument(en): "Dateiname: \?\C:\Program Files
(x86)\Plesk\admin\services\public\web.config
Fehler: Die Konfigurationsdatei kann nicht gelesen werden

Check report path right before testing

Check the passed path right before starting all test function otherwise tests are done unnecessarily because report cannot be written to desired destination.
As in a bigger environment the report cmdlet could take up to 45 minutes or more to finish, checking the path as a first step could be a huge time saver.

5.2 Ensure Advanced IIS logging is enabled

Advanced IIS logging is not used since IIS 8.5-
However CIS IIS shows with this point, that enhanced IIS logging is the tool now and that companies should be aware of this point.
Advanced Logging is not available for IIS 10. See enhanced logging instead. maybe this should be changed, showing where to find Information about Enhanced logging.

Show percentage of compliant/non-compliant tests

In the AUDIT-TAP report header, show the percentage of compliant/not-compliant tested rules.

For example:

Overall tested settings => 196
Failed (non-compliant) settings => 11

=> System is 94,38 % compliant to DISA/CIS/FB Pro security recommendations

Server 2016 audit shows "Found member(s)" for null

In a test environment the Windows Server 2016 audit tap shows "Found member(s)" if a User Rights Assignment setting is configured with no group or user.

For example:
The User Rights Assignment "The Lock pages in memory user right must not be assigned to any groups or accounts" is configured via GPO and no group or user are added which would be compliant with DISA. Nevertheless the audit report flags red for this section.

Further rules: SV_88455r1_rule, SV_88443r1_rule, SV_88415r1_rule

MS Office 2016 Excel Test 288: Status doesn't change if value changed

STIG File context is:
If the value DisableUnsafeLocationsInPV is REG_DWORD = 0, this is not a finding.
If the value does not exist, this is not a finding.
If the value is REG_DWORD = 1, then this is a finding.

After adding and changing the value, the status doesn't change.

Benchmark FTP not working properly (#6.0)

Checking on "Available" seems better be "Installed"
if ($ftpBindings.Count -gt 0 -or (Get-WindowsFeature Web-Ftp-Server).InstallState -eq [InstallState]::Available) { $message = "FTP is not disabled"

AUDIT Windows 10

Hello,

Error feedback within the audit TAP 4.5

None:
17.3.1 - Cannot get Subcategory ''
17.5.2 - Cannot get Subcategory ''
17.5.5 - Cannot get Subcategory 'Other Logon Logoff Events'
17.7.4 - Cannot get Subcategory 'Mpssvc Rule Level Policy Change'

False:
1.2.2 - 'LockoutBadCount' currently set to: 3. Expected: x <= 10 and x > 0
2.2.14 - The user right 'SeCreateSymbolicLinkPrivilege' contains following unexpected users: NT VIRTUAL MACHINE\Virtual Machines

Best
Andre

IIS10 Test 3.10 Future versions stopped supporting this feature

This only applies to .Net 2.0. Future versions have stopped supporting this feature.
Future versions may have stopped supporting this feature, however if this is hardened, then the application just stop working.
Maybe a warning would be enough for checking this point.

Clarify language settings in report of Audit TAP

Using some powershell or DISM commands extract base language and display it in "baseline information" on top of the report for example below "Hostname" or "build number".

This clarifies errors in case if system language is

  1. not English OR
  2. English was not used as installation language.

Rational
Audit TAP works best if

  • English is used language OR

  • Another language was installed as language pack on top of an english operating system installation.

Path-Validation fails with error when entering filename

When entering filename as Report-Filename, "Test-Path" fails.
Please correct usage guidelines to howto documentation as useage guideline states to use file name. Without any path creation of HTML report works.
Screenshot anbei...
scr_correct_command

Generate report using ATAPHtmlReport

In a case there is no option to install PS version 5/5.1, how can I still generate a report ?
Can you explain me on how to run all the task manually without report, using the functions (such as Full site report) ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.