ScoutSuite icon indicating copy to clipboard operation
ScoutSuite copied to clipboard

AWS SNS finding "Receive Authorized for All Principals"

Open rdegraaf opened this issue 3 years ago • 0 comments

ScoutSuite 5.11.0 contains a six of checks for SNS Topics that have resources policies permitting access to all AWS principals. Five of the checks correspond to SNS API actions that apply to individual topics and can be called cross-account: AddPermission, DeleteTopic, Publish, RemovePermission, and SetTopicAttributes. However, the sixth, "Receive Authorized to All Principals", makes no sense: there is no "Receive" API action for SNS.

I created an SNS Topic with a resources policy that permitted all principals ("Principal": {"AWS":""}) to call all SNS API actions ("Action":"sns:") and while the first five rules failed (as expected), the "Receive" rule did not.

In addition to the five listed above, SNS allows access to three read operations to be controlled by resource policies: GetTopicAttributes, ListSubscriptionsByTopic, and Subscribe. I suggest that the "Receive Authorized for All Principals" finding be replaced with three new findings for GetTopicAttributes, ListSubscriptionsByTopic, and Subscribe.

rdegraaf avatar May 03 '22 00:05 rdegraaf