Giter Club home page Giter Club logo

fbprogmbh / mbam-test-automation Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 1.0 236 KB

The MBAM Test Automation Package gives you the ability to get an overview about the availability and the security status of your Microsoft Bitlocker Administration and Monitoring (MBAM) system. You can easily create HTML-reports, even on a regulary basis. Or test specific components and security issues of your system.

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

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

PowerShell 100.00%
powershell-script powershell-module documentation monitoring-scripts integrity-monitoring bitlocker mdop mbam

mbam-test-automation's Introduction

MBAM Test Automation Package Version 2

Overview

The MBAM Test Automation Package gives you the ability to get an overview about the availability and the security status of your Microsoft Bitlocker Administration and Monitoring (MBAM) system. You can easily create HTML-reports, even on a regulary basis. Or test specific components and security issues of your system.

For more information about the many functions inside the package go to the documentation folder inside the package.

Revised version 2 comes with some improvements in usability and speed as well as new features like event logging.

Getting started

Requirements

  • MBAM TAP version 2 uses PowerShell classes. For the best MBAM TAP experience you should use at least the Windows Management Framework 5.0 (WMF 5.0) which includes PowerShell Version 5. If you are running an older version of PowerShell you can download the WMF package for your operating system at https://www.microsoft.com/en-us/download/details.aspx?id=54616 We recommend to use WMF 5.1.

  • Download or clone the package

  • Adjust your execution policy to at least remoteSigned (the scripts are not digitally signed yet)

Set-ExecutionPolicy RemoteSigned -scope CurrentUser
  • Copy/put the following folders in a PowerShell default load path to get the modules and classes automatically loaded.

    • MBAMExtensionModule
    • ADExtensionModule
    • PkiExtensionModule
    • WinSrvExtensionModule
    • LogFileModule
    • Classes

A default load path could be e.g. the path in your user profile under "userprofile"\Documents\WindowsPowerShell\Modules (if it does not exists, you have to create it) or the new location under C:\Program Files\WindowsPowerShell\Modules. For a easy start you can use the Install-MbamExtensionModule.ps1 script to add the current of your cloned/unzipped package location into the PowerShell module path environment variable.

  • For the server side report run the PowerShell scripts New-GroupMembersFiles.ps1 and New-LocalAdminsFile.ps1 inside the folder MbamExtensionModule once to create files which contain the users of the MBAM security groups as well as a file with all local admins.
  • To use the new feature of event logging, a new application log must be registered as well as some event sources. For this execute the script New-FBProEventLogs.ps1 inside the scripts folder, it will do the work.

Settings

Inside the new Settings folder you find the file Settings.psd1. This file contains some settings for the creation of the report as well as some set points like the MBAM server version. See explanations below:

  • MBAM Server version
...
 Mbam = @{
            Server = @{
    		Version = "2.5.1135.0"
...
  • To use the email reporting function first add your email settings
Email = @{
            SMTPServer = "smtp.example.com"
            SMTPPort = 25
            MailTo = "[email protected]"
            MailFrom = "MBAM Error Reporting"
            Encoding = "UTF8"
            User = "[email protected]"
            PasswordFile = ""
        }
  • For testing the certificate which is used by MBAM add your certificate thumbprint
Settings = @{
        Mbam = @{
            Server = @{
                # Mbam certificate thumbprint   
                CertificateThumbprint = "fb2493b5bedc426ebd7d76c939a6170d7adbebbf"
		...
  • Set the MBAM service account name as well as the used MBAM security groups
...
Mbam = @{
    Server = @{
	# Mbam Service Account (WebService Application Pool Account
	ServiceAccount = "MBAMSvcAcc"
	# MBAM Advanced Help Desk Security Group (without domain)
	AdvHelpDesk = "MBAMAdvHelpDesk"
	# MBAM Help Desk Security Group (without domain)
	HelpDesk = "MBAMHelpDesk"
	# MBAM Reports only Security Group (without domain)
	ReportGroup = "MBAMReport"
...
  • Its possibile to add a logo to your report. You can change the Base64 string for the variable logo or exchange it to an URI. We recommend to use a Base64 string.

Usage

HTML server reports

To create a server html report, run the script Get-CompleteServerStatus.ps1 within an elevated PowerShell console. Please remember to adjust your settings inside the settings.psd1 file as describe above first.

HTML client reports

Before running the client script Get-CompleteClientStatus.ps1 open the script and look at the section Configuration after the license block. In order to work properly you may have to adjust some variables like the MBAM version your client agent is running or the path where the reports will be created.

Build your own

If you have no use or just do not like the html report scripts, you can build and run your own script and export or save it to any format you like. To do so you find a bunch of Test- functions to use in your script and suit your need.

E.g.

PS C:\> Test-MbamServerVersion -version "2.5.1135.0"

ID       : FBP-MBAM-0038
moduleID : TC-MBAM-0032
Task     : The MBAM Server main version number is correct
Status   : Version correct, installed version is 2.5.1135.0
Passed   : Passed

mbam-test-automation's People

Contributors

devesly avatar flobroeder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

schmmax

mbam-test-automation's Issues

Fix problem with loading config file

Exchange Import-LocalizedData to Import-PowerShellDataFile to avoid recurring problems with loading the config file (there is no localized data at the moment, therefore a MUI folder structure like en-US, de-DE is a little bit overkill)

Get more information on TPM chip (version etc.)

PS C:\WINDOWS\system32> (Get-CimClass -Namespace ROOT/CIMV2/Security/MicrosoftTpm -ClassName Win32_Tpm).CimClassProperti
es | where name -match specversion

Name : SpecVersion
Value :
CimType : String
Flags : Property, NullValue
Qualifiers : {Description, Implemented}
ReferenceClassName :

PS C:\WINDOWS\system32> wmic /namespace:\root\CIMV2\Security\MicrosoftTpm path Win32_Tpm get /value

IsActivated_InitialValue=TRUE
IsEnabled_InitialValue=TRUE
IsOwned_InitialValue=TRUE
ManufacturerId=1229346816
ManufacturerIdTxt=IFX
ManufacturerVersion=5.62
ManufacturerVersionFull20=5.62.12.13826
ManufacturerVersionInfo=534c423936363500000000000000000000
PhysicalPresenceVersionInfo=1.3
SpecVersion=2.0, 0, 1.16

Test last status report of client

Function gets messed up with hibernation mode.
Seems status report frequency does not get triggered from last system startup. Recheck code.

Windows 10 OS-Versions not included.

Hi Team,

it looks like Windows 10 fall update 2018 and Windows 10 spring update 2019 are not included in the MBAM-TAP. I get the error: Operating system not in List.
MBAM-OS-Issue

Rework GPO testing

Do further testing -> also test settings labeled as disabled to prove they are really disabled

Quick server report

Bring back the quick server report, but instead of an own script add a parameter quick or short to skip some parts during report creation.

MBAM-TAP and MBAM in SCCM Technical preview 1909

Hi Team,

after MBAM-TAP is done, it looks like MBAM-TAP is searching for GPO, which are not set in MBAM included in SCCM. Instead the policies are sent to the SCCM-Agent installed on the Client. As this is one of the future ways to use MBAM, we should have a look on that
MBAM-GPO-Issue

No error with gpo_template file in configured environment

In the gpo_template file all policies are marked as disabled. This should raise some error messages in a configured environment where policies are enabled.
Problem:
If the write-logfile function throws an error it will be catch and obj.status and obj.passed will be set to an incorrect value regardless of the result of Get-MBAMGpoRuleState.

 if($policy.PolicyState -eq 'disabled')
            {
                try 
                {
                    Get-MBAMGpoRuleState -PolicyKey $policy.PolicyKey -PolicyValue $policy.PolicyValue -path $policy.PolicyPath -ErrorAction Stop | Out-Null
                    
                    $obj.Status = "Policy falsely enabled"
                    $obj.Passed = 2

                    # log error
                    $mes = "MBAM Policy $($policy.PolicyKey) falsely enabled, please check settings."+[System.Environment]::NewLine
                    $msg += $_.Exception.toString()+[System.Environment]::NewLine
                    $msg += "; " + $_.ScriptStackTrace.toString()
                    write-LogFile -Path $LogPath -name $LogName -message $msg -Level Error

                }
                catch
                {
                    $obj.Status = "Policy disabled as expected"
                    $obj.Passed = 1
                }            
            }

Include same Javascript to e.g. collapse report section

Add some javascript in the report to e.g. collapse sections of the report or search for a keyword.
Standard report must be created without javascript.

Javascript code must be implemented in a seperate file which will automatically be included.

Report creation with javascript will be triggered by a switch parameter.

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.