mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
Translated ['src/todo/hardware-hacking/side_channel_analysis.md', 'src/w
This commit is contained in:
parent
11ad86f5a2
commit
20770dddf0
119
.github/workflows/translate_af.yml
vendored
119
.github/workflows/translate_af.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to AF (Afrikaans)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: af
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Afrikaans
|
||||
BRANCH: af
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_de.yml
vendored
119
.github/workflows/translate_de.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to DE (German)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: de
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: German
|
||||
BRANCH: de
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_el.yml
vendored
119
.github/workflows/translate_el.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to EL (Greek)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: el
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Greek
|
||||
BRANCH: el
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_es.yml
vendored
119
.github/workflows/translate_es.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to ES (Spanish)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: es
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Spanish
|
||||
BRANCH: es
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_fr.yml
vendored
119
.github/workflows/translate_fr.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to FR (French)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: fr
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: French
|
||||
BRANCH: fr
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_it.yml
vendored
119
.github/workflows/translate_it.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to IT (Italian)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: it
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Italian
|
||||
BRANCH: it
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_ja.yml
vendored
119
.github/workflows/translate_ja.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to JA (Japanese)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: ja
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Japanese
|
||||
BRANCH: ja
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_ko.yml
vendored
119
.github/workflows/translate_ko.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to KO (Korean)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: ko
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Korean
|
||||
BRANCH: ko
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_pl.yml
vendored
119
.github/workflows/translate_pl.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to PL (Polish)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: pl
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Polish
|
||||
BRANCH: pl
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_pt.yml
vendored
119
.github/workflows/translate_pt.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to PT (Portuguese)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: pt
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Portuguese
|
||||
BRANCH: pt
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_sr.yml
vendored
119
.github/workflows/translate_sr.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to SR (Serbian)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: sr
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Serbian
|
||||
BRANCH: sr
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_sw.yml
vendored
119
.github/workflows/translate_sw.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to SW (Swahili)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: sw
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Swahili
|
||||
BRANCH: sw
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_tr.yml
vendored
119
.github/workflows/translate_tr.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to TR (Turkish)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: tr
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Turkish
|
||||
BRANCH: tr
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_uk.yml
vendored
119
.github/workflows/translate_uk.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to UK (Ukranian)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: uk
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Ukranian
|
||||
BRANCH: uk
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
119
.github/workflows/translate_zh.yml
vendored
119
.github/workflows/translate_zh.yml
vendored
@ -1,119 +0,0 @@
|
||||
name: Translator to ZH (Chinese)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'scripts/**'
|
||||
- '.gitignore'
|
||||
- '.github/**'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: zh
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-translation:
|
||||
runs-on: ubuntu-latest
|
||||
environment: prod
|
||||
env:
|
||||
LANGUAGE: Chinese
|
||||
BRANCH: zh
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 #Needed to download everything to be able to access the master & language branches
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip3 install openai tqdm tiktoken
|
||||
|
||||
# Install Rust and Cargo
|
||||
- name: Install Rust and Cargo
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
# Install mdBook and Plugins
|
||||
- name: Install mdBook and Plugins
|
||||
run: |
|
||||
cargo install mdbook
|
||||
cargo install mdbook-alerts
|
||||
cargo install mdbook-reading-time
|
||||
cargo install mdbook-pagetoc
|
||||
cargo install mdbook-tabs
|
||||
cargo install mdbook-codename
|
||||
|
||||
|
||||
- name: Update & install wget & translator.py
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install wget -y
|
||||
mkdir scripts
|
||||
cd scripts
|
||||
wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py
|
||||
cd ..
|
||||
|
||||
- name: Download language branch #Make sure we have last version
|
||||
run: |
|
||||
git config --global user.name 'Translator'
|
||||
git config --global user.email 'github-actions@github.com'
|
||||
git checkout "$BRANCH"
|
||||
git pull
|
||||
git checkout master
|
||||
|
||||
- name: Run translation script on changed files
|
||||
run: |
|
||||
echo "Starting translations"
|
||||
echo "Commit: $GITHUB_SHA"
|
||||
|
||||
# Export the OpenAI API key as an environment variable
|
||||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
# Run the translation script on each changed file
|
||||
git diff --name-only HEAD~1 | grep -v "SUMMARY.md" | while read -r file; do
|
||||
if echo "$file" | grep -qE '\.md$'; then
|
||||
echo -n "$file , " >> /tmp/file_paths.txt
|
||||
else
|
||||
echo "Skipping $file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Translating $(cat /tmp/file_paths.txt)"
|
||||
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
|
||||
|
||||
# Push changes to the repository
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git checkout "$BRANCH"
|
||||
git add -A
|
||||
git commit -m "Translated $BRANCH files" || true
|
||||
git push --set-upstream origin "$BRANCH"
|
||||
|
||||
# Build the mdBook
|
||||
- name: Build mdBook
|
||||
run: mdbook build
|
||||
|
||||
# Login in AWs
|
||||
- name: Configure AWS credentials using OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v3
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-east-1
|
||||
|
||||
# Sync the build to S3
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete
|
@ -35,7 +35,7 @@ trace = cw.capture.capture_trace()
|
||||
print(trace.wave) # numpy array of power samples
|
||||
```
|
||||
### Análise de Potência Diferencial/Corracional (DPA/CPA)
|
||||
Adquira *N > 1 000* traços, hipotetize o byte da chave `k`, calcule o modelo HW/HD e correlacione com o leak.
|
||||
Adquira *N > 1 000* traços, hipotetize o byte da chave `k`, compute o modelo HW/HD e correlacione com o leak.
|
||||
```python
|
||||
import numpy as np
|
||||
corr = np.corrcoef(leakage_model(k), traces[:,sample])
|
||||
@ -49,16 +49,12 @@ Sondas EM de campo próximo (500 MHz–3 GHz) vazam informações idênticas à
|
||||
|
||||
---
|
||||
|
||||
## Ataques de Tempo & Microarquitetura
|
||||
## Ataques de Tempo & Micro-arquiteturais
|
||||
CPUs modernas vazam segredos através de recursos compartilhados:
|
||||
* **Hertzbleed (2022)** – escalonamento de frequência DVFS correlaciona com peso de Hamming, permitindo extração *remota* de chaves EdDSA.
|
||||
* **Downfall / Gather Data Sampling (Intel, 2023)** – execução transitória para ler dados AVX-gather através de threads SMT.
|
||||
* **Zenbleed (AMD, 2023) & Inception (AMD, 2023)** – predição de vetor especulativa vaza registradores entre domínios.
|
||||
|
||||
Para um tratamento amplo de questões da classe Spectre, veja {{#ref}}
|
||||
../../cpu-microarchitecture/microarchitectural-attacks.md
|
||||
{{#endref}}
|
||||
|
||||
---
|
||||
|
||||
## Ataques Acústicos & Ópticos
|
||||
@ -68,7 +64,7 @@ Para um tratamento amplo de questões da classe Spectre, veja {{#ref}}
|
||||
---
|
||||
|
||||
## Injeção de Falhas & Análise de Falhas Diferenciais (DFA)
|
||||
Combinar falhas com vazamento de canal lateral encurta a busca de chaves (por exemplo, DFA AES de 1 traço). Ferramentas recentes com preços acessíveis para entusiastas:
|
||||
Combinar falhas com vazamento de canal lateral encurta a busca de chaves (por exemplo, DFA AES de 1 traço). Ferramentas recentes com preços de hobbyistas:
|
||||
* **ChipSHOUTER & PicoEMP** – glitching de pulso eletromagnético sub-1 ns.
|
||||
* **GlitchKit-R5 (2025)** – plataforma de glitch de clock/tensão de código aberto suportando SoCs RISC-V.
|
||||
|
||||
@ -87,7 +83,7 @@ Combinar falhas com vazamento de canal lateral encurta a busca de chaves (por ex
|
||||
## Defesas & Fortalecimento
|
||||
* Implementações **em tempo constante** e algoritmos resistentes à memória.
|
||||
* **Mascaramento/shuffling** – dividir segredos em partes aleatórias; resistência de primeira ordem certificada por TVLA.
|
||||
* **Ocultação** – reguladores de tensão on-chip, clock randomizado, lógica de dupla via, escudos EM.
|
||||
* **Ocultação** – reguladores de tensão on-chip, clock randomizado, lógica de dupla trilha, escudos EM.
|
||||
* **Detecção de falhas** – computação redundante, assinaturas de limiar.
|
||||
* **Operacional** – desabilitar DVFS/turbo em núcleos criptográficos, isolar SMT, proibir co-localização em nuvens multi-inquilino.
|
||||
|
||||
|
@ -16,7 +16,7 @@ Requisitos/pré-requisitos:
|
||||
- Administrador Local no alvo (SeCreateServicePrivilege) ou direitos explícitos de criação de serviço no alvo.
|
||||
- SMB (445) acessível e compartilhamento ADMIN$ disponível; Gerenciamento de Serviço Remoto permitido através do firewall do host.
|
||||
- Restrições Remotas do UAC: com contas locais, a filtragem de token pode bloquear o admin pela rede, a menos que use o Administrador embutido ou LocalAccountTokenFilterPolicy=1.
|
||||
- Kerberos vs NTLM: usar um nome de host/FQDN habilita Kerberos; conectar por IP muitas vezes recai no NTLM (e pode ser bloqueado em ambientes endurecidos).
|
||||
- Kerberos vs NTLM: usar um nome de host/FQDN habilita Kerberos; conectar por IP frequentemente recai no NTLM (e pode ser bloqueado em ambientes endurecidos).
|
||||
|
||||
### ScExec/WinExec Manual via sc.exe
|
||||
|
||||
@ -43,7 +43,7 @@ Encontre passos mais detalhados em: https://blog.ropnop.com/using-credentials-to
|
||||
|
||||
### Sysinternals PsExec.exe
|
||||
|
||||
- Ferramenta clássica de administração que usa SMB para soltar PSEXESVC.exe em ADMIN$, instala um serviço temporário (nome padrão PSEXESVC) e faz proxy de I/O através de pipes nomeados.
|
||||
- Ferramenta clássica de administração que usa SMB para colocar PSEXESVC.exe em ADMIN$, instala um serviço temporário (nome padrão PSEXESVC) e faz proxy de I/O através de pipes nomeados.
|
||||
- Exemplos de uso:
|
||||
```cmd
|
||||
:: Interactive SYSTEM shell on remote host
|
||||
@ -64,7 +64,7 @@ OPSEC
|
||||
|
||||
### Impacket psexec.py (semelhante ao PsExec)
|
||||
|
||||
- Usa um serviço embutido semelhante ao RemCom. Lança um binário de serviço transitório (nome comumente aleatório) via ADMIN$, cria um serviço (o padrão é frequentemente RemComSvc) e proxy I/O através de um pipe nomeado.
|
||||
- Usa um serviço embutido semelhante ao RemCom. Lança um binário de serviço transitório (nome comumente aleatório) via ADMIN$, cria um serviço (o padrão é frequentemente RemComSvc) e faz proxy de I/O através de um pipe nomeado.
|
||||
```bash
|
||||
# Password auth
|
||||
psexec.py DOMAIN/user:Password@HOST cmd.exe
|
||||
@ -108,35 +108,37 @@ cme smb HOST -u USER -H NTHASH -x "ipconfig /all" --exec-method smbexec
|
||||
|
||||
Artefatos típicos de host/rede ao usar técnicas semelhantes ao PsExec:
|
||||
- Segurança 4624 (Tipo de Logon 3) e 4672 (Privilégios Especiais) no alvo para a conta de administrador utilizada.
|
||||
- Segurança 5140/5145 Eventos de Compartilhamento de Arquivos e Detalhes de Compartilhamento de Arquivos mostrando acesso ADMIN$ e criação/escrita de binários de serviço (por exemplo, PSEXESVC.exe ou .exe aleatório de 8 caracteres).
|
||||
- Segurança 7045 Instalação de Serviço no alvo: nomes de serviços como PSEXESVC, RemComSvc, ou personalizados (-r / -service-name).
|
||||
- Segurança 5140/5145 Eventos de Compartilhamento de Arquivos e Compartilhamento de Arquivos Detalhados mostrando acesso ADMIN$ e criação/escrita de binários de serviço (por exemplo, PSEXESVC.exe ou .exe aleatório de 8 caracteres).
|
||||
- Segurança 7045 Instalação de Serviço no alvo: nomes de serviços como PSEXESVC, RemComSvc ou personalizados (-r / -service-name).
|
||||
- Sysmon 1 (Criação de Processo) para services.exe ou a imagem do serviço, 3 (Conexão de Rede), 11 (Criação de Arquivo) em C:\Windows\, 17/18 (Pipe Criado/Conectado) para pipes como \\.\pipe\psexesvc, \\.\pipe\remcom_*, ou equivalentes aleatórios.
|
||||
- Artefato de Registro para EULA do Sysinternals: HKCU\Software\Sysinternals\PsExec\EulaAccepted=0x1 no host do operador (se não suprimido).
|
||||
|
||||
Ideias de caça
|
||||
- Alerta em instalações de serviços onde o ImagePath inclui cmd.exe /c, powershell.exe, ou locais TEMP.
|
||||
- Procure por criações de processos onde ParentImage é C:\Windows\PSEXESVC.exe ou filhos de services.exe executando como SYSTEM LOCAL executando shells.
|
||||
- Alerta em instalações de serviços onde o ImagePath inclui cmd.exe /c, powershell.exe ou locais TEMP.
|
||||
- Procure por criações de processos onde ParentImage é C:\Windows\PSEXESVC.exe ou filhos de services.exe executando como LOCAL SYSTEM executando shells.
|
||||
- Marque pipes nomeados terminando com -stdin/-stdout/-stderr ou nomes de pipes de clone do PsExec bem conhecidos.
|
||||
|
||||
## Solucionando falhas comuns
|
||||
- Acesso negado (5) ao criar serviços: não é realmente administrador local, restrições de UAC para contas locais, ou proteção contra manipulação de EDR no caminho do binário do serviço.
|
||||
- O caminho da rede não foi encontrado (53) ou não foi possível conectar ao ADMIN$: firewall bloqueando SMB/RPC ou compartilhamentos de administrador desativados.
|
||||
- O caminho da rede não foi encontrado (53) ou não foi possível conectar ao ADMIN$: firewall bloqueando SMB/RPC ou compartilhamentos administrativos desativados.
|
||||
- Kerberos falha, mas NTLM está bloqueado: conecte usando hostname/FQDN (não IP), assegure SPNs adequados, ou forneça -k/-no-pass com tickets ao usar Impacket.
|
||||
- O tempo de início do serviço expira, mas o payload foi executado: esperado se não for um binário de serviço real; capture a saída em um arquivo ou use smbexec para I/O ao vivo.
|
||||
|
||||
## Notas de endurecimento (mudanças modernas)
|
||||
- Windows 11 24H2 e Windows Server 2025 exigem assinatura SMB por padrão para conexões de saída (e Windows 11 de entrada). Isso não quebra o uso legítimo do PsExec com credenciais válidas, mas previne abusos de relay SMB não assinado e pode impactar dispositivos que não suportam assinatura.
|
||||
## Notas de endurecimento
|
||||
- Windows 11 24H2 e Windows Server 2025 requerem assinatura SMB por padrão para conexões de saída (e Windows 11 de entrada). Isso não quebra o uso legítimo do PsExec com credenciais válidas, mas previne abusos de relay SMB não assinado e pode impactar dispositivos que não suportam assinatura.
|
||||
- O novo bloqueio NTLM do cliente SMB (Windows 11 24H2/Server 2025) pode impedir o fallback NTLM ao conectar por IP ou a servidores não-Kerberos. Em ambientes endurecidos, isso quebrará PsExec/SMBExec baseado em NTLM; use Kerberos (hostname/FQDN) ou configure exceções se necessário legitimamente.
|
||||
- Princípio do menor privilégio: minimize a associação de administrador local, prefira Just-in-Time/Just-Enough Admin, aplique LAPS e monitore/alarme sobre instalações de serviços 7045.
|
||||
|
||||
## Veja também
|
||||
|
||||
- Execução remota baseada em WMI (geralmente mais sem arquivos):
|
||||
|
||||
{{#ref}}
|
||||
./wmiexec.md
|
||||
{{#endref}}
|
||||
|
||||
- Execução remota baseada em WinRM:
|
||||
|
||||
{{#ref}}
|
||||
./winrm.md
|
||||
{{#endref}}
|
||||
@ -147,4 +149,5 @@ Ideias de caça
|
||||
|
||||
- PsExec - Sysinternals | Microsoft Learn: https://learn.microsoft.com/sysinternals/downloads/psexec
|
||||
- Endurecimento de segurança SMB no Windows Server 2025 & Windows 11 (assinatura por padrão, bloqueio NTLM): https://techcommunity.microsoft.com/blog/filecab/smb-security-hardening-in-windows-server-2025--windows-11/4226591
|
||||
|
||||
{{#include ../../banners/hacktricks-training.md}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user