Show / Hide Table of Contents

Class CertificateCollector

Collects metadata from the local certificate stores.

Inheritance
System.Object
BaseCollector
CertificateCollector
Implements
IPlatformRunnable
Inherited Members
BaseCollector.Results
BaseCollector.TryExecute()
BaseCollector.RunStatus
BaseCollector.Start()
BaseCollector.Stop()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AttackSurfaceAnalyzer.Collectors
Assembly: AsaLib.dll
Syntax
public class CertificateCollector : BaseCollector, IPlatformRunnable

Constructors

| Improve this Doc View Source

CertificateCollector(CollectCommandOptions, Action<CollectObject>)

Declaration
public CertificateCollector(CollectCommandOptions opts = null, Action<CollectObject> changeHandler = null)
Parameters
Type Name Description
CollectCommandOptions opts
System.Action<CollectObject> changeHandler

Methods

| Improve this Doc View Source

CanRunOnPlatform()

Declaration
public override bool CanRunOnPlatform()
Returns
Type Description
System.Boolean
Overrides
BaseCollector.CanRunOnPlatform()
| Improve this Doc View Source

ExecuteInternal()

Execute the certificate collector.

Declaration
public override void ExecuteInternal()
Overrides
BaseCollector.ExecuteInternal()
| Improve this Doc View Source

ExecuteLinux()

On linux we check the central trusted root store (a folder), which has symlinks to actual cert locations scattered across the db We list all the certificates and then create a new X509Certificate2 object for each by filename.

Declaration
public void ExecuteLinux()
| Improve this Doc View Source

ExecuteMacOs()

On macos we use the keychain and export the certificates as .pem. However, on macos Certificate2 doesn't support loading from a pem. So first we need pkcs12s instead, we convert using openssl, which requires we set a password we import the pkcs12 with all our certs, delete the temp files and then iterate over it the certs

Declaration
public void ExecuteMacOs()
| Improve this Doc View Source

ExecuteWindows()

On Windows we can use the .NET API to iterate through all the stores.

Declaration
public void ExecuteWindows()

Implements

IPlatformRunnable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX