Translated ['src/README.md', 'src/banners/hacktricks-training.md', 'src/

This commit is contained in:
Translator
2024-12-31 20:18:58 +00:00
parent 820dd99aed
commit 931ae54e5f
245 changed files with 9984 additions and 12710 deletions

View File

@@ -2,10 +2,10 @@
{{#include ../../banners/hacktricks-training.md}}
## Install PowerShell in Linux
## Installare PowerShell in Linux
> [!TIP]
> In linux you will need to install PowerShell Core:
> In linux è necessario installare PowerShell Core:
>
> ```bash
> sudo apt-get update
@@ -14,11 +14,11 @@
> # Ubuntu 20.04
> wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
>
> # Update repos
> # Aggiorna i repository
> sudo apt-get update
> sudo add-apt-repository universe
>
> # Install & start powershell
> # Installa e avvia powershell
> sudo apt-get install -y powershell
> pwsh
>
@@ -26,58 +26,47 @@
> curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
> ```
## Install PowerShell in MacOS
## Installare PowerShell in MacOS
Instructions from the [**documentation**](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-macos?view=powershell-7.4):
1. Install `brew` if not installed yet:
Istruzioni dalla [**documentazione**](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-macos?view=powershell-7.4):
1. Installa `brew` se non è già installato:
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
2. Install the latest stable release of PowerShell:
2. Installa l'ultima versione stabile di PowerShell:
```sh
brew install powershell/tap/powershell
```
3. Run PowerShell:
3. Esegui PowerShell:
```sh
pwsh
```
4. Update:
4. Aggiornamento:
```sh
brew update
brew upgrade powershell
```
## Main Enumeration Tools
## Strumenti Principali di Enumerazione
### az cli
[**Azure Command-Line Interface (CLI)**](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) is a cross-platform tool written in Python for managing and administering (most) Azure and Entra ID resources. It connects to Azure and executes administrative commands via the command line or scripts.
[**Interfaccia della riga di comando di Azure (CLI)**](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) è uno strumento multipiattaforma scritto in Python per gestire e amministrare (la maggior parte) delle risorse di Azure e Entra ID. Si connette ad Azure ed esegue comandi amministrativi tramite la riga di comando o script.
Follow this link for the [**installation instructions¡**](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli#install).
Segui questo link per le [**istruzioni di installazione¡**](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli#install).
Commands in Azure CLI are structured using a pattern of: `az <service> <action> <parameters>`
I comandi nella Azure CLI sono strutturati utilizzando un modello di: `az <servizio> <azione> <parametri>`
#### Debug | MitM az cli
Using the parameter **`--debug`** it's possible to see all the requests the tool **`az`** is sending:
Utilizzando il parametro **`--debug`** è possibile vedere tutte le richieste che lo strumento **`az`** sta inviando:
```bash
az account management-group list --output table --debug
```
In order to do a **MitM** to the tool and **check all the requests** it's sending manually you can do:
Per eseguire un **MitM** sullo strumento e **controllare tutte le richieste** che sta inviando manualmente, puoi fare:
{{#tabs }}
{{#tab name="Bash" }}
```bash
export ADAL_PYTHON_SSL_NO_VERIFY=1
export AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1
@@ -90,42 +79,37 @@ export HTTP_PROXY="http://127.0.0.1:8080"
openssl x509 -in ~/Downloads/cacert.der -inform DER -out ~/Downloads/cacert.pem -outform PEM
export REQUESTS_CA_BUNDLE=/Users/user/Downloads/cacert.pem
```
{{#endtab }}
{{#tab name="PS" }}
```bash
$env:ADAL_PYTHON_SSL_NO_VERIFY=1
$env:AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1
$env:HTTPS_PROXY="http://127.0.0.1:8080"
$env:HTTP_PROXY="http://127.0.0.1:8080"
```
{{#endtab }}
{{#endtabs }}
### Az PowerShell
Azure PowerShell is a module with cmdlets for managing Azure resources directly from the PowerShell command line.
Azure PowerShell è un modulo con cmdlet per gestire le risorse Azure direttamente dalla riga di comando di PowerShell.
Follow this link for the [**installation instructions**](https://learn.microsoft.com/en-us/powershell/azure/install-azure-powershell).
Segui questo link per le [**istruzioni di installazione**](https://learn.microsoft.com/en-us/powershell/azure/install-azure-powershell).
Commands in Azure PowerShell AZ Module are structured like: `<Action>-Az<Service> <parameters>`
I comandi nel modulo Azure PowerShell AZ sono strutturati come: `<Action>-Az<Service> <parameters>`
#### Debug | MitM Az PowerShell
Using the parameter **`-Debug`** it's possible to see all the requests the tool is sending:
Utilizzando il parametro **`-Debug`** è possibile vedere tutte le richieste che lo strumento sta inviando:
```bash
Get-AzResourceGroup -Debug
```
In order to do a **MitM** to the tool and **check all the requests** it's sending manually you can set the env variables `HTTPS_PROXY` and `HTTP_PROXY` according to the [**docs**](https://learn.microsoft.com/en-us/powershell/azure/az-powershell-proxy).
### Microsoft Graph PowerShell
Microsoft Graph PowerShell is a cross-platform SDK that enables access to all Microsoft Graph APIs, including services like SharePoint, Exchange, and Outlook, using a single endpoint. It supports PowerShell 7+, modern authentication via MSAL, external identities, and advanced queries. With a focus on least privilege access, it ensures secure operations and receives regular updates to align with the latest Microsoft Graph API features.
Microsoft Graph PowerShell è un SDK multipiattaforma che consente l'accesso a tutte le API di Microsoft Graph, inclusi servizi come SharePoint, Exchange e Outlook, utilizzando un'unica endpoint. Supporta PowerShell 7+, autenticazione moderna tramite MSAL, identità esterne e query avanzate. Con un focus sull'accesso con il minor privilegio possibile, garantisce operazioni sicure e riceve aggiornamenti regolari per allinearsi con le ultime funzionalità delle API di Microsoft Graph.
Follow this link for the [**installation instructions**](https://learn.microsoft.com/en-us/powershell/microsoftgraph/installation).
@@ -134,20 +118,14 @@ Commands in Microsoft Graph PowerShell are structured like: `<Action>-Mg<Service
#### Debug Microsoft Graph PowerShell
Using the parameter **`-Debug`** it's possible to see all the requests the tool is sending:
```bash
Get-MgUser -Debug
```
### ~~**AzureAD Powershell**~~
The Azure Active Directory (AD) module, now **deprecated**, is part of Azure PowerShell for managing Azure AD resources. It provides cmdlets for tasks like managing users, groups, and application registrations in Entra ID.
Il modulo Azure Active Directory (AD), ora **deprecato**, fa parte di Azure PowerShell per gestire le risorse di Azure AD. Fornisce cmdlet per attività come la gestione di utenti, gruppi e registrazioni di applicazioni in Entra ID.
> [!TIP]
> This is replaced by Microsoft Graph PowerShell
Follow this link for the [**installation instructions**](https://www.powershellgallery.com/packages/AzureAD).
> Questo è sostituito da Microsoft Graph PowerShell
Segui questo link per le [**istruzioni di installazione**](https://www.powershellgallery.com/packages/AzureAD).