Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CoerceAndRelayNTLMtoADCS Post Processing #1058

Merged
merged 32 commits into from
Jan 30, 2025
Merged

CoerceAndRelayNTLMtoADCS Post Processing #1058

merged 32 commits into from
Jan 30, 2025

Conversation

rvazarkar
Copy link
Contributor

@rvazarkar rvazarkar commented Jan 8, 2025

Description

Describe your changes in detail

Motivation and Context

This PR addresses: https://specterops.atlassian.net/browse/BED-5029

How Has This Been Tested?

Integration tests created to test specific harnesses

Screenshots (optional):

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

mvlipka and others added 19 commits December 13, 2024 09:31
…esting of end nodes in NTLM integration test
…ED-5029

# Conflicts:
#	packages/cue/bh/ad/ad.cue
#	packages/go/analysis/ad/adcs.go
#	packages/go/analysis/ad/ntlm.go
#	packages/go/graphschema/ad/ad.go
#	packages/javascript/bh-shared-ui/src/graphSchema.ts
# Conflicts:
#	packages/cue/bh/ad/ad.cue
#	packages/go/analysis/ad/ntlm.go
#	packages/go/graphschema/ad/ad.go
#	packages/javascript/bh-shared-ui/src/graphSchema.ts
@juggernot325 juggernot325 marked this pull request as draft January 23, 2025 18:27
# Conflicts:
#	packages/go/analysis/ad/adcscache.go
#	packages/go/graphschema/ad/ad.go
#	packages/javascript/bh-shared-ui/src/graphSchema.ts
@rvazarkar rvazarkar marked this pull request as ready for review January 30, 2025 15:15
@rvazarkar rvazarkar changed the title WIP: RelayNTLMtoADCS Post Processing CoerceAndRelayNTLMtoADCS Post Processing Jan 30, 2025
Comment on lines +74 to +79
if enterpriseCertAuthorities, err := FetchNodesByKind(ctx, db, ad.EnterpriseCA); err != nil {
return fmt.Errorf("failed fetching enterpriseCA nodes: %w", err)
} else if certTemplates, err := FetchNodesByKind(ctx, db, ad.CertTemplate); err != nil {
return fmt.Errorf("failed fetching certTemplate nodes: %w", err)
} else if domains, err := FetchNodesByKind(ctx, db, ad.Domain); err != nil {
return fmt.Errorf("failed fetching domain nodes: %w", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure which is faster, 3 separate fetch nodes by kind or 1 fetch with these 3 kinds and then loop the results and have a switch case based on the node kind and the 3 separate actions as either smaller functions or just toss each of the below blocks into the case. Might be 6 one way, half a dozen the other but thought I'd toss the idea out

packages/go/analysis/ad/ntlm.go Outdated Show resolved Hide resolved
packages/go/analysis/ad/ntlm.go Show resolved Hide resolved
packages/go/analysis/ad/adcs.go Show resolved Hide resolved
@rvazarkar rvazarkar added the enhancement New feature or request label Jan 30, 2025
@rvazarkar rvazarkar self-assigned this Jan 30, 2025
Copy link
Contributor

@mistahj67 mistahj67 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@rvazarkar rvazarkar merged commit 78bd0da into main Jan 30, 2025
8 checks passed
@rvazarkar rvazarkar deleted the BED-5029 branch January 30, 2025 18:08
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants