Weekly Stealth Build #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Weekly Stealth Build | |
| on: | |
| schedule: | |
| # Every Sunday at 03:00 UTC | |
| - cron: '0 3 * * 0' | |
| workflow_dispatch: | |
| inputs: | |
| frida_version: | |
| description: 'Frida version (empty = latest)' | |
| required: false | |
| default: '' | |
| arch: | |
| description: 'Target architecture(s)' | |
| required: true | |
| default: 'android-arm64' | |
| type: choice | |
| options: | |
| - android-arm64 | |
| - android-arm | |
| - android-arm64,android-arm | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 120 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Detect latest Frida version | |
| id: version | |
| run: | | |
| if [ -n "${{ inputs.frida_version }}" ]; then | |
| VERSION="${{ inputs.frida_version }}" | |
| else | |
| VERSION=$(curl -s https://api.github.com/repos/frida/frida/releases/latest | python3 -c "import sys,json; print(json.load(sys.stdin)['tag_name'])") | |
| fi | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Frida version: $VERSION" | |
| - name: Generate random name and port | |
| id: random | |
| run: | | |
| NAME=$(python3 namegen.py --weekly --quiet) | |
| PORT=$(python3 namegen.py --weekly --port-only --quiet) | |
| echo "name=$NAME" >> $GITHUB_OUTPUT | |
| echo "port=$PORT" >> $GITHUB_OUTPUT | |
| echo "Build name: $NAME, port: $PORT" | |
| - name: System info | |
| run: | | |
| echo "CPUs: $(nproc)" | |
| echo "RAM: $(free -h | grep Mem | awk '{print $2}')" | |
| echo "Disk: $(df -h / | tail -1 | awk '{print $4}') free" | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential curl git python3 unzip | |
| - name: Cache NDK | |
| uses: actions/cache@v4 | |
| id: ndk-cache | |
| with: | |
| path: build/android-ndk-r29 | |
| key: ndk-r29-linux | |
| - name: Download NDK | |
| if: steps.ndk-cache.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p build | |
| curl -L -o build/android-ndk-r29-linux.zip \ | |
| https://dl.google.com/android/repository/android-ndk-r29-linux.zip | |
| cd build && unzip -q android-ndk-r29-linux.zip && rm android-ndk-r29-linux.zip | |
| - name: Cache Frida source | |
| uses: actions/cache@v4 | |
| id: frida-cache | |
| with: | |
| path: build/frida | |
| key: frida-${{ steps.version.outputs.version }}-source | |
| - name: Clone Frida | |
| if: steps.frida-cache.outputs.cache-hit != 'true' | |
| run: | | |
| git clone --recurse-submodules --branch ${{ steps.version.outputs.version }} --depth 1 \ | |
| https://github.com/frida/frida.git build/frida | |
| - name: Prepare fresh source from cache | |
| if: steps.frida-cache.outputs.cache-hit == 'true' | |
| run: | | |
| cd build/frida | |
| git checkout -- . | |
| git submodule foreach --recursive 'git checkout -- . || true' | |
| git clean -fdx || true | |
| rm -rf build/ | |
| - name: Build | |
| run: | | |
| python3 build.py \ | |
| --version ${{ steps.version.outputs.version }} \ | |
| --name ${{ steps.random.outputs.name }} \ | |
| --arch ${{ inputs.arch || 'android-arm64' }} \ | |
| --port ${{ steps.random.outputs.port }} \ | |
| --extended \ | |
| --skip-clone \ | |
| --ndk-path build/android-ndk-r29 \ | |
| --verify | |
| - name: Generate build info | |
| run: | | |
| cat > output/build-info.json <<EOF | |
| { | |
| "name": "${{ steps.random.outputs.name }}", | |
| "port": ${{ steps.random.outputs.port }}, | |
| "version": "${{ steps.version.outputs.version }}", | |
| "arch": "${{ inputs.arch || 'android-arm64' }}", | |
| "date": "$(date -u +%Y-%m-%d)" | |
| } | |
| EOF | |
| - name: List artifacts | |
| run: | | |
| echo "=== Build: ${{ steps.random.outputs.name }} (port ${{ steps.random.outputs.port }}) ===" | |
| ls -lh output/ | |
| echo "" | |
| echo "=== Binary verification ===" | |
| for f in output/*; do | |
| if [[ ! "$f" == *.gz ]]; then | |
| count=$(strings "$f" | grep -c "frida" || true) | |
| echo "$f: $count residual 'frida' strings" | |
| fi | |
| done | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: stealth-${{ steps.random.outputs.name }}-${{ steps.version.outputs.version }} | |
| path: | | |
| output/*.gz | |
| output/build-info.json | |
| retention-days: 30 | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| TAG="v${{ steps.version.outputs.version }}-$(date +%Y%m%d)" | |
| TITLE="Stealth Build — ${{ steps.random.outputs.name }} (Frida ${{ steps.version.outputs.version }})" | |
| cat > /tmp/release.md <<RELEASE_EOF | |
| ## Stealth Frida Server | |
| | Parameter | Value | | |
| |-----------|-------| | |
| | Frida version | ${{ steps.version.outputs.version }} | | |
| | Custom name | \`${{ steps.random.outputs.name }}\` | | |
| | Custom port | \`${{ steps.random.outputs.port }}\` | | |
| | Architecture | \`${{ inputs.arch || 'android-arm64' }}\` | | |
| | Extended patches | Yes (all 16 detection vectors) | | |
| ### Deploy | |
| \`\`\`bash | |
| # Extract | |
| gunzip ${{ steps.random.outputs.name }}-server-*-android-arm64.gz | |
| # Push to device | |
| adb push ${{ steps.random.outputs.name }}-server-*-android-arm64 /data/local/tmp/${{ steps.random.outputs.name }}-server | |
| adb shell chmod 755 /data/local/tmp/${{ steps.random.outputs.name }}-server | |
| # Start | |
| adb shell /data/local/tmp/${{ steps.random.outputs.name }}-server -D & | |
| frida -H 127.0.0.1:${{ steps.random.outputs.port }} -f com.example.app | |
| \`\`\` | |
| ### Connect | |
| Standard \`frida-tools\` (\`pip install frida-tools\`) connects normally — use \`-H 127.0.0.1:${{ steps.random.outputs.port }}\` instead of \`-U\`. | |
| RELEASE_EOF | |
| gh release create "$TAG" output/*.gz output/build-info.json \ | |
| --title "$TITLE" \ | |
| --notes-file /tmp/release.md \ | |
| --latest | |
| - name: Build summary | |
| run: | | |
| echo "## Weekly Stealth Build" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| Parameter | Value |" >> $GITHUB_STEP_SUMMARY | |
| echo "|-----------|-------|" >> $GITHUB_STEP_SUMMARY | |
| echo "| Frida version | ${{ steps.version.outputs.version }} |" >> $GITHUB_STEP_SUMMARY | |
| echo "| Custom name | ${{ steps.random.outputs.name }} |" >> $GITHUB_STEP_SUMMARY | |
| echo "| Custom port | ${{ steps.random.outputs.port }} |" >> $GITHUB_STEP_SUMMARY | |
| echo "| Architecture | ${{ inputs.arch || 'android-arm64' }} |" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Deploy:" >> $GITHUB_STEP_SUMMARY | |
| echo '```bash' >> $GITHUB_STEP_SUMMARY | |
| echo "adb push ${{ steps.random.outputs.name }}-server /data/local/tmp/${{ steps.random.outputs.name }}-server" >> $GITHUB_STEP_SUMMARY | |
| echo "adb shell chmod 755 /data/local/tmp/${{ steps.random.outputs.name }}-server" >> $GITHUB_STEP_SUMMARY | |
| echo "adb shell /data/local/tmp/${{ steps.random.outputs.name }}-server &" >> $GITHUB_STEP_SUMMARY | |
| echo "frida -H 127.0.0.1:${{ steps.random.outputs.port }} -f com.example.app" >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY |