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

It seems like if the --scps CLI flag does not have any affect (always set to true) #93

Closed
sethsec-bf opened this issue Aug 19, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@sethsec-bf
Copy link

Describe the bug
If pmapper loads the org data, and the org includes SCPs, I get the same output with the query preset privesc * regardless of whether I use the --scps flag or not.

To Reproduce

  1. There is 1 SCP, in playground account, attached to dev account. Let's say for example the SCP deny's iam:passrole.
  2. Using playground creds, run pmapper orgs create
  3. Using dev creds, run pmapper graph create --include-region us-east-1
  4. Using dev creds, run pmapper orgs update --org ID
  5. Using dev creds, run pmapper query --scps 'preset privesc *'
  6. All looks good
  7. Using dev creds, run pmapper query 'preset privesc *'
  8. Same exact output as step 5, which was unexpected.

Expected behavior
I would expect step 7 to ignore the SCPs applied to the dev account. Not that I can think of a reason I would ever need that output, but based on the existence of the --scps flag, that's would I would expect.

@sethsec-bf sethsec-bf added the bug Something isn't working label Aug 19, 2021
@ncc-erik-steringer
Copy link
Collaborator

The --scps flag has no effect on this preset query. Instead of authorization checks, it's doing breadth-first searches of the Graph starting at each Node. However, that is a good reminder that another preset query called endgame should allow users to include SCPs and I'll need to fix that.

I think #94 is the root cause of the unexpected behavior here. The edges and admins are defined when the Graph is created, so any mistakes there will be reflected in the privesc query, which is why you're getting the unexpected output.

@ncc-erik-steringer
Copy link
Collaborator

v1.1.4 is out, closing.

wdahlenburg pushed a commit to wdahlenburg/PMapper that referenced this issue Sep 5, 2022
…r_data_secrets

Added note to the user data intro page about not storing credentials …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants