This file contains 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
# Copyright: (c) 2018, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
Add-Type -TypeDefinition @' | |
using Microsoft.Win32.SafeHandles; | |
using System; | |
using System.Collections.Generic; | |
using System.Runtime.ConstrainedExecution; | |
using System.Runtime.InteropServices; |
This file contains 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
# Copyright (c) 2024 Jordan Borean | |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
from __future__ import annotations | |
DOCUMENTATION = """ | |
name: kinit | |
type: aggregate | |
short_description: POC to run kinit on a playbook run. | |
description: |
This file contains 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
#!/usr/bin/env python | |
"""Test TLS Enabled Web Server | |
A script that can start a temporary TLS enabled web server. This server | |
supports a basic GET request and will return metadata on the request from the | |
client. By default it will create an ephemeral certificate when starting up but | |
a custom certificate can be provided. Also supports client authentication by | |
providing a CA bundle to use for verification or using --tls-client-auth to | |
generate a new set of keys. |
This file contains 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
# Copyright: (c) 2024, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
Function Get-ServiceDacl { | |
<# | |
.SYNOPSIS | |
Gets the service DACL entries. | |
.DESCRIPTION | |
Gets all the DACL entries for the service(s) specified. |
This file contains 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
# Copyright: (c) 2023, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
#Requires -Module Ctypes | |
Function New-S4UAccessToken { | |
<# | |
.SYNOPSIS | |
Generates an S4U access token. |
This file contains 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
# Copyright: (c) 2019, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
Function Get-ServiceCredential { | |
<# | |
.SYNOPSIS | |
Retrieve the username and plaintext password for all services installed on the local computer. | |
.DESCRIPTION | |
Will retrieve the username and plaintext password for the service(s) specified. This must be run as an |
This file contains 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
using System; | |
using System.Collections.Concurrent; | |
using System.Management.Automation; | |
using System.Threading; | |
using System.Threading.Tasks; | |
public abstract class AsyncPSCmdlet : PSCmdlet, IDisposable | |
{ | |
private enum PipelineType | |
{ |
This file contains 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
# Copyright: (c) 2024, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
Function Get-PowerShellAssemblyMetadata { | |
<# | |
.SYNOPSIS | |
Gets the cmdlets and aliases in a dotnet assembly. | |
.PARAMETER Path | |
The assembly to inspect. |
This file contains 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
. $PSScriptRoot\Start-ProcessEx.ps1 | |
Add-Type -Namespace Runas -Name NativeMethods -UsingNamespace @( | |
'Microsoft.Win32.SafeHandles', | |
'System.ComponentModel', | |
'System.Security.Principal' | |
) -MemberDefinition @' | |
[DllImport("Advapi32.dll", EntryPoint = "DuplicateTokenEx", SetLastError = true)] | |
private static extern bool NativeDuplicateTokenEx( | |
SafeHandle hExistingToken, |
This file contains 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
# Copyright: (c) 2022, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
Function Trace-TlsHandshake { | |
<# | |
.SYNOPSIS | |
TLS Handshake Diagnostics. | |
.DESCRIPTION | |
Performs a TLS handshake and returns diagnostic information about that |