8000 Improve Trusted Microsoft Services Enabled rule (fixes #763) by ramimac · Pull Request #785 · nccgroup/ScoutSuite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improve Trusted Microsoft Services Enabled rule (fixes #763) #785

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

Merged
merged 2 commits into from
Jun 15, 2020

Conversation

ramimac
Copy link
Contributor
@ramimac ramimac commented Jun 10, 2020

Description

Quick and easy improvement to the Trusted Microsoft Services Enabled rule. See https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.management.storage.fluent.models.networkruleset.bypass?view=azure-dotnet.

NetworkRuleSet.Bypass can be any combination of Logging|Metrics|AzureServices.
Logging/Monitoring have no effect on the rule, so all I did was change the check the be "AzureServices" in instead of ==.

I'm not setup to test this, but it should be trivial (famous last words).

Mind giving it a go @Dziubey ?

Fixes #763

Type of change

Select the relevant option(s):

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (optional)
  • New and existing unit tests pass locally with my changes

@x4v13r64 x4v13r64 added this to the 5.10 milestone Jun 11, 2020
@Dziubey
Copy link
Dziubey commented Jun 12, 2020

Hello @ramimac

I am sorry for missing this. Will test today and provide feedback.

Thanks

Copy link
@Dziubey Dziubey left a comment

Choose a reason for hiding this comment

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

Hi @ramimac,

I have tested the updated code, and it seems like everything works as expected now. I had two storage accounts in the same subscription, one with Microsoft Trusted Services enabled and another one with the exception disabled. Only the one with the exception disabled has been flagged.

Adding some screenshots for reference:

  1. Exception enabled
    MTS enabled
  2. Exception disabled
    MTS disabled
  3. ScoutSuite report
    report

Thanks for the fix and all the great work on this tool so far!

@x4v13r64
Copy link
Collaborator

Thanks @Dziubey.

@ramimac there's a change-freeze for features until we release 5.9, but since this is a bugfix I'll merge it in.

@codecov-commenter
Copy link
codecov-commenter commented Jun 15, 2020

Codecov Report

Merging #785 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #785   +/-   ##
========================================
  Coverage    66.25%   66.25%           
========================================
  Files           22       22           
  Lines         1547     1547           
========================================
  Hits          1025     1025           
  Misses         522      522           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb10f70...3048b25. Read the comment docs.

@x4v13r64 x4v13r64 self-requested a review June 15, 2020 08:39
@x4v13r64 x4v13r64 merged commit 807d2bf into develop Jun 15, 2020
@x4v13r64 x4v13r64 deleted the bugfix/trustedservices branch June 15, 2020 08:40
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
0