Giter Site home page Giter Site logo

Suggestion: Add an XML output about privesccheck HOT 4 CLOSED

itm4n avatar itm4n commented on August 24, 2024 1
Suggestion: Add an XML output

from privesccheck.

Comments (4)

itm4n avatar itm4n commented on August 24, 2024 2

Here you go, reports can now be exported as XML files.

Invoke-PrivescCheck -Report MyReport -Format XML

This will produce the file MyReport.xml.

Here is an example with the check Invoke-BitlockerCheck. The standard output would be something like this:

+------+------------------------------------------------+------+
| TEST | HARDENING > BitLocker                          | INFO |
+------+------------------------------------------------+------+
| DESC | Check whether BitLocker is configured and enabled on  |
|      | the system drive. Note that this check will yield a   |
|      | false positive if another encryption software is in   |
|      | use.                                                  |
+------+-------------------------------------------------------+
[*] Found 1 result(s).


Name        : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BitLockerStatus
BootStatus  : 0
Description : BitLocker isn't enabled.

The same output in XML would be something like this:

<?xml version="1.0"?>
<Objects>
  </Object>
  <Object Type="System.Management.Automation.PSCustomObject">
    <Property Name="Id" Type="System.String">HARDEN_BITLOCKER</Property>
    <Property Name="Category" Type="System.String">Hardening</Property>
    <Property Name="DisplayName" Type="System.String">BitLocker</Property>
    <Property Name="Description" Type="System.String">Check whether BitLocker is configured and enabled on the system drive. Note that this check will yield a false positive if another encryption software is in use.</Property>
    <Property Name="Type" Type="System.String">Info</Property>
    <Property Name="Compliance" Type="System.String">N/A</Property>
    <Property Name="Severity" Type="System.String">Info</Property>
    <Property Name="ResultRawString" Type="System.String">

Name        : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BitLockerStatus
BootStatus  : 0
Description : BitLocker isn't enabled.

</Property>
</Objects>

This should be pretty easy to parse. The output XML document contains 1 or more Object elements, which all have the same attributes: an ID, a category (e.g.: Services), a name, a description, a type (Info or Vuln), a compliance result (OK, KO or N/A), a severity (Low, Medium, High) and finally the raw result of the check.

from privesccheck.

itm4n avatar itm4n commented on August 24, 2024

I cannot agree more, I'll see what I can do... 😉

from privesccheck.

itm4n avatar itm4n commented on August 24, 2024

Can you confirm that's ok for you so I can close this issue?

from privesccheck.

n0skill avatar n0skill commented on August 24, 2024

Perfect :) Thanks !

from privesccheck.

Related Issues (20)

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.