Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
pyrite — Hardware-bound & Cloud-gated binary execution, cryptographic provenance, and anti-tamper envelope sealing for Crystal. | Kitploit
도구/GitLabGitLab/renich/pyrite
CryptographyCloud SecurityDevSecOpsHardware SecurityBinary AnalysisSupply Chain Security
GitLabrenich/pyrite

pyrite

Hardware-bound & Cloud-gated binary execution, cryptographic provenance, and anti-tamper envelope sealing for Crystal.

저장소 보기
26218일 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

pyrite.cr banner

Hardware-Bound & Cloud-Gated Binary Execution and Anti-Tamper Envelope Sealing for Crystal.

Version 0.2.0 Crystal >= 1.21.0 GitLab CI Passing Specs Passing Ameba Clean Flaw Clean

Sphinx Documentation Crystal API Documentation License: GPL-3.0-or-later Donate using Liberapay


What is Pyrite?

Pyrite ensures that your compiled Crystal binary only executes on your authorized infrastructure. If an adversary extracts, leaks, steals, or modifies the binary, execution halts immediately before any application logic or secrets are exposed.

Core Security Guarantees

  1. Hardware & Cloud Execution Binding: The binary is incomplete at rest. Core operational configuration and keys are sealed inside an envelope that can only be decrypted by the physical motherboard's TPM 2.0 chip (systemd-creds) or Google Cloud Run IAM / Cloud KMS.
  2. Real-Time Self-Integrity (Anti-Tamper): At boot, Pyrite calculates the SHA-256 digest of /proc/self/exe and compares it against the authorized hash decrypted from the envelope. Any 1-byte alteration halts the process instantly.
  3. Anti-Reverse Engineering: Stripped native LLVM machine code (strip -s) contains zero symbol tables, reflection metadata, or plaintext configuration. Decompilation yields only a dead decryption wrapper.
  4. Zero Runtime Overhead: The cryptographic gate runs once during startup (~15–25ms) and adds 0.00% overhead to ongoing request handling. Zero external shard dependencies.

Quickstart

1. Add to shard.yml

root@kitploit:~
dependencies:
  pyrite:
    github: renich/pyrite
    version: ~> 0.2.0

2. Bootstrap in Application Code

root@kitploit:~
require "pyrite"
require "kemal"

# Define strongly-typed application configuration
struct AppConfig
  include JSON::Serializable

  getter database_url : String
  getter session_secret : String
  getter api_token : String
end

# 1-line verification & bootstrap:
config = Pyrite.bootstrap!(AppConfig)

puts "Pyrite verified binary integrity. Starting application..."

get "/" do
  "Secure service running on authorized hardware."
end

Kemal.run

3. Zero-Trust Fail-Closed Architecture

Pyrite enforces an absolute zero-trust, fail-closed policy:

  • Binaries strictly require an authorized hardware TPM 2.0 or Cloud KMS anchor to unseal their configuration envelope.
  • If executed outside an authorized environment (e.g. on an attacker's workstation without the TPM or Cloud IAM role), Pyrite aborts immediately with Pyrite::HardwareAuthError and exits with code 1.
  • Secrets and business logic are never exposed to memory outside the designated hardware/cloud trust boundary.

Build & Sealing CLI (bin/pyrite)

When installed, Pyrite provides a compiled CLI tool to automate LLVM compilation, ELF symbol stripping, SHA-256 digest hashing, and envelope sealing.

root@kitploit:~
# Build & Seal for Google Cloud Run (KMS):
bin/pyrite build \
    --input=src/main.cr \
    --output=bin/app \
    --target=gcp \
    --kms-key="projects/my-p/locations/global/keyRings/my-r/cryptoKeys/app-key" \
    --config=config/production.json

# Build & Seal for Bare-Metal Fedora (TPM 2.0 / systemd-creds):
bin/pyrite build \
    --input=src/main.cr \
    --output=bin/app \
    --target=baremetal \
    --pcr=0,7 \
    --config=config/production.json

# Build & Seal for AWS (ECS / Lambda / KMS):
bin/pyrite build \
    --input=src/main.cr \
    --output=bin/app \
    --target=aws \
    --kms-key="arn:aws:kms:us-east-1:123456789012:key/..." \
    --config=config/production.json

Supported Trust Anchors


Documentation

Exhaustive technical documentation, specifications, and architecture decision records are maintained in reStructuredText under docs/:


Contributing & Code of Honor

All contributions must adhere to the Universal Code of Honor and Contributing Guidelines.


License

  • Software: GNU General Public License v3.0 or later (LICENSE).
  • Documentation: GNU Free Documentation License v1.3 or later (LICENSE-DOCS).

Copyleft © 2026 Rénich Bon Ćirić <[email protected]>.


Support & Donations

If you find Pyrite useful and wish to support its ongoing development, please consider donating:

Donate using Liberapay

도구 다운로드
EnvironmentProviderRoot of TrustProtection
Google Cloud RunPyrite::Providers::GCPKMSGoogle Cloud IAM + Cloud KMSBinAuthz + Instance Metadata OIDC
Fedora / Bare-MetalPyrite::Providers::SystemdCredsHost TPM 2.0 (PCR 0,7)systemd-creds + Linux Kernel IMA
Bare-Metal DirectPyrite::Providers::TPM2Direct/dev/tpmrm0 chipDirect TPM2 PCR unseal (tpm2-tools)
AWS (ECS / Lambda)Pyrite::Providers::AWSKMSIMDSv2 + AWS KMSAWS IAM Task Role Decrypt
GuideScope & HighlightsDirect Link
Business Context & StrategyProblem statement, threat landscape, stakeholder personas (Devon, Rénich, Sam), and quantifiable ROI goals.Business Specs • Personas • Problem Statement
Functional SpecificationsRequirements [FUNC-001]–[FUNC-005]: execution gating, real-time self-integrity, envelope sealing, developer experience, and CLI orchestration.Functional Specs • Execution Gating • Self-Integrity
Technical ArchitectureSpecifications [TECH-001]–[TECH-005]: core deserialization engine, streaming 16KB SHA-256 hasher, provider drivers, and formal STRIDE threat model.Technical Specs • Core Engine • Threat Model
Architecture Decision RecordsImmutable ADRs documenting envelope encryption versus client-side DRM, and zero-dependency standard library design.ADR Index • ADR 001 (Envelope Encryption) • ADR 002 (Stdlib Only)
Project Roadmap & TrackingSequenced 3-phase delivery tracking, verification criteria, and milestone deliverables across core engine, providers, and CLI.Roadmap • Phase 1 • Phase 2 • Phase 3
Crystal API ReferenceComplete interactive type hierarchy, method signatures, and compiler-generated reference.API Reference