Nuitka Decryptor 标志

Nuitka Decryptor

社区
ptn1411
nuitka-decryptor

对使用 Nuitka 编译的 Python 应用进行逆向分析和解密。从 PE 二进制文件(.pyd)中提取加密密钥,分析二进制常量,并批量解密使用 XOR+Base64 加密的源文件。遇到包含 .encrypted 源文件或 Nuitka .pyd 模块的已编译 Python 应用,或需要对应用源代码进行逆向分析/解密时使用。

Add to TypingMind

概览

发布者ptn1411
代码仓库skill
技能名称nuitka-decryptor
星标数
275
复刻数
133
附带文件
8
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 8 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 ptn1411 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Nuitka Decryptor AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/ptn1411/skill/tree/main/nuitka-decryptor
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ptn1411/skill.git /tmp/skill
mkdir -p .claude/skills
cp -r /tmp/skill/nuitka-decryptor .claude/skills/nuitka-decryptor
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Nuitka Decryptor,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Nuitka Decryptor。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Nuitka Decryptor 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Nuitka Decryptor Skill

Reverse engineer Nuitka-compiled Python apps: extract keys from PE binaries, decrypt XOR+Base64 source files.

Language rule: All skill instructions use English. Final summary presented to the user must be in Vietnamese.


How Nuitka App Encryption Works

Nuitka compiles Python → C → .exe / .pyd (Windows DLL). Some apps add a custom encryption layer:

Source .py  →  encrypt(XOR + Base64, key)  →  .encrypted files
              key embedded in Nuitka constants (.rdata / .rsrc section of .pyd)

Standard pattern (confirmed on VideoAIStudio v2.1.5):

PropertyValue
AlgorithmXOR with repeating key
EncodingBase64 (standard)
Key locationNuitka marshalled constants in .rdata / .rsrc PE section
Key formatASCII string (e.g. BT_DEV_2025_SECURE)
Formulaplaintext = XOR(base64_decode(ciphertext), repeating_key)

Step 1 — Reconnaissance: Map the target

Before running any script, identify:

target_app/
├── app/
│   ├── encrypted_sources/
│   │   ├── MANIFEST.txt        ← list of all source files
│   │   └── *.encrypted         ← encrypted Python source
│   └── repo/updater/
│       ├── config_loader.pyd   ← KEY IS HERE (Nuitka constants)
│       └── update_agent.pyd    ← secondary binary
├── *.encrypted                 ← encrypted config files
└── decrypted_sources/          ← output directory

Trigger keywords that suggest this pattern:

  • .encrypted files alongside a .pyd or .exe
  • MANIFEST.txt listing Python module paths
  • base64 + XOR combo in network traffic or strings analysis
  • Nuitka strings (__compiled__, nuitka, cp312-win_amd64) in binary

Step 2 — Binary Analysis

Run scripts/analyze_binary.py to surface key candidates:

bash
python scripts/analyze_binary.py \
  --pyd path/to/config_loader.pyd \
  --out binary_analysis.txt

What it finds:

  • Printable strings containing key, secret, encrypt, decrypt, token, cipher
  • 16/32-byte high-entropy byte sequences (potential AES keys)
  • Base64-like strings (20–100 chars)
  • Nuitka function name patterns (load_encrypted, get_key, xor, b64decode)
  • Long ASCII strings > 32 chars (embedded key candidates)

Key discovery heuristic — if you see a string like:

BT_DEV_2025_SECURE    ← 18-char ASCII key
BT_Automation_Tiktok  ← variant

→ This is almost certainly the XOR key. Proceed to Step 3.


Step 3 — Key Extraction via PE Resource

Run scripts/extract_key.py to pull marshalled constants from the PE .rsrc / .rdata section:

bash
python scripts/extract_key.py \
  --pyd path/to/config_loader.pyd \
  --config path/to/update_config.json.encrypted \
  --out key_extraction.txt

Known-plaintext attack on config file:

If config.encrypted[0] XOR { = key[0]:

python
key[0] = config_enc[0] ^ ord('{')   # JSON always starts with {
key[1] = config_enc[1] ^ ord('\n')  # formatted JSON has newline
key[2] = config_enc[2] ^ ord(' ')   # indented with spaces
# Continue to recover full key byte-by-byte

PE resource parsing approach:

  1. Read PE header → find .rsrc section offset
  2. Attempt marshal.loads() on resource chunks
  3. Search .rdata for key-sized (16/32B) high-entropy sequences

Step 4 — Decrypt All Sources

Once key is confirmed, run scripts/decrypt_all.py:

bash
# Decrypt all files listed in MANIFEST.txt
python scripts/decrypt_all.py \
  --key "BT_DEV_2025_SECURE" \
  --encrypted-dir path/to/app/encrypted_sources \
  --output-dir path/to/decrypted_sources \
  --manifest path/to/app/encrypted_sources/MANIFEST.txt

# Decrypt a single .encrypted file
python scripts/decrypt_all.py \
  --key "BT_DEV_2025_SECURE" \
  --single path/to/file.encrypted \
  --output-dir ./out

# Decrypt a config file
python scripts/decrypt_all.py \
  --key "BT_DEV_2025_SECURE" \
  --single update_config.json.encrypted \
  --output-dir ./out

Decrypt formula (pure stdlib, no deps):

python
import base64
def xor_decrypt(payload_b64: str, key: bytes) -> str:
    decoded = base64.b64decode(payload_b64)
    kr = (key * (len(decoded) // len(key) + 1))[:len(decoded)]
    return bytes(a ^ b for a, b in zip(decoded, kr)).decode('utf-8')

Step 5 — Verify & Analyze

After decryption, verify output:

bash
# Check a sample file looks like valid Python
head -50 decrypted_sources/main.py
head -50 decrypted_sources/core/config.py

# Search for hardcoded secrets in decrypted source
grep -rn "api_key\|secret\|password\|token\|LICENSE" decrypted_sources/
grep -rn "http\|https" decrypted_sources/ | grep -v "\.pyc"

What to look for in decrypted source:

  • License validation logic (bypass candidates)

  • API keys / tokens embedded in code

  • Encryption keys for other data stores

  • Backend endpoints not visible from network traffic

  • Authentication bypass opportunities

  • Authentication bypass opportunities


Step 7 — Keygen Development Support

If asked to create a keygen or extract license validation logic, use scripts/extract_keygen_data.py:

bash
python scripts/extract_keygen_data.py \
  --pyd path/to/main_app.pyd \
  --out keygen_info.txt

Keygen targets:

  • HWID Retrieval: Identification of system-specific IDs (MachineGuid, MAC address, Disk Serial) used to bind licenses.
  • Hashing Constants: Detection of MD5/SHA256 initialization constants, which indicate the hashing algorithm used for license generation.
  • Secret Salts: High-entropy strings near license-related keywords often act as salts for hashing.
  • License Logic: Strings like trial, expired, activation_code help locate the validation routines.

Step 8 — Key Confirmation Test

Before bulk decryption, always verify the key on a known-structure file:

python
# Quick sanity check
result = xor_decrypt(open('update_config.json.encrypted').read().strip(), key)
assert result.strip().startswith('{'), f"Wrong key! Got: {result[:20]}"
import json; json.loads(result)  # must parse as valid JSON
print("Key confirmed:", key)

File Naming Convention

OutputFilename
Binary analysisbinary_analysis.txt
Key extraction logkey_extraction.txt
Confirmed keykey_final.txt
Decrypt testdecrypt_test.txt
Decrypted sourcesdecrypted_sources/<original_path>.py

Workflow

1. RECON    → Identify .pyd files, .encrypted files, MANIFEST.txt
2. ANALYZE  → Run analyze_binary.py → find key candidates
3. EXTRACT  → Run extract_key.py → confirm key via known-plaintext
4. DECRYPT  → Run decrypt_all.py → bulk decrypt all source files
5. KEYGEN   → Run extract_keygen_data.py → extract HWID/hash data for keygen
6. VERIFY   → Sample check + grep for secrets/hardcoded values
7. REPORT   → Present findings to user IN VIETNAMESE

Final Report to User (always in Vietnamese)

✅ Giải mã hoàn tất:

  🔑 Key tìm được  : <KEY_VALUE>
  📦 Thuật toán    : XOR + Base64
  📁 File giải mã  : N / TOTAL file thành công
  💾 Output        : decrypted_sources/

  🔍 Phát hiện đáng chú ý:
    - <danh sách secrets, endpoints, license logic>
    - <Thông tin Keygen: HWID pattern, hash constants, secret salts>

▶  Bước tiếp theo:
   grep -rn "api_key\|secret" decrypted_sources/

Anti-Patterns

❌ Don't✅ Do
Hardcode target paths in scriptsUse --pyd, --encrypted-dir args
Guess the key without verificationAlways confirm on known-structure file first
Skip binary analysisanalyze_binary.py often reveals key directly in strings
Decrypt without checking MANIFESTSome files may be absent — track success/fail counts
Use only one section (.rsrc)Check both .rsrc and .rdata for marshal blobs
Present findings in EnglishAlways deliver final summary in Vietnamese

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Nuitka Decryptor AI 技能有什么作用?

对使用 Nuitka 编译的 Python 应用进行逆向分析和解密。从 PE 二进制文件(.pyd)中提取加密密钥,分析二进制常量,并批量解密使用 XOR+Base64 加密的源文件。遇到包含 .encrypted 源文件或 Nuitka .pyd 模块的已编译 Python 应用,或需要对应用源代码进行逆向分析/解密时使用。

为什么在 TypingMind 中使用 Nuitka Decryptor?

因为您只需安装一次,就能搭配任何模型使用。Nuitka Decryptor 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Nuitka Decryptor?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/ptn1411/skill/tree/main/nuitka-decryptor。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Nuitka Decryptor?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Nuitka Decryptor 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Nuitka Decryptor 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Nuitka Decryptor AI 技能免费吗?

ptn1411 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇