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

3165 credentials generator #3366

Merged
merged 1 commit into from
May 23, 2023
Merged

3165 credentials generator #3366

merged 1 commit into from
May 23, 2023

Conversation

mssalvatore
Copy link
Collaborator

What does this PR do?

Issue #3165

Adds a credentials generator for powershell plugin

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the CHANGELOG.md updated to reflect the changes?
  • Was the documentation framework updated to reflect the changes?
  • Have you checked that you haven't introduced any duplicate code?

Testing Checklist

  • Added relevant unit tests?
  • Do all unit tests pass?
  • Do all end-to-end tests pass?
  • Any other testing performed?

    Tested by {Running the Monkey locally with relevant config/running Island/...}

  • If applicable, add screenshots or log transcripts of the feature working

@mssalvatore mssalvatore changed the base branch from develop to 3165-powershell-skeleton May 22, 2023 19:05
@mssalvatore mssalvatore marked this pull request as draft May 22, 2023 19:23
Base automatically changed from 3165-powershell-skeleton to develop May 22, 2023 19:35
@mssalvatore mssalvatore marked this pull request as ready for review May 22, 2023 19:36
mssalvatore added a commit that referenced this pull request May 22, 2023
Copy link
Contributor

@cakekoa cakekoa left a comment

Choose a reason for hiding this comment

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

Looks pretty good -- I had a few questions/comments


powershell_credentials: List[Credentials] = []

# Note that if no secrets are provided, generate_brute_force_credentials() will generate return
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Note that if no secrets are provided, generate_brute_force_credentials() will generate return
# Note that if no secrets are provided, generate_brute_force_credentials() will return

input_credentials = [Credentials(identity=i, secret=None) for i in INPUT_IDENTITIES]
generated_credentials = generate_powershell_credentials(input_credentials, False)

assert len(generated_credentials) == 4
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be cool to be able to assert that, say, the cached credentials are not part of the generated credentials

from common.credentials import Credentials, LMHash, NTHash, Password, Secret, Username

TEST_DOMAIN = "TEST-DOMAIN"
LOCAL_USER = "localuser"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have a test for if the local username is already in the propagation credentials? With/without the domain?

shreyamalviya pushed a commit that referenced this pull request May 23, 2023
shreyamalviya pushed a commit that referenced this pull request May 23, 2023
@shreyamalviya shreyamalviya mentioned this pull request May 23, 2023
10 tasks
@mssalvatore mssalvatore merged commit 88f3d52 into develop May 23, 2023
@mssalvatore mssalvatore deleted the 3165-credentials-generator branch May 23, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants