Skip to content

ALMASONYH/MasonProtector-v6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MasonProtector

MasonProtector

A .NET assembly protector and obfuscator. It rebuilds your compiled program into a hardened version that is hard to read, decompile, or crack — while it runs exactly like the original.

English  ·  العربية  ·  Full technical manual (PDF)


English

Overview

MasonProtector takes a compiled .NET file (.exe or .dll) and rebuilds it into a protected version: names are scrambled, strings and numbers are encrypted, method bodies are turned into virtual‑machine bytecode, and a runtime layer watches for debuggers, virtual machines, and memory dumpers. The protected program behaves exactly like the original.

Protection layers

  • Renaming — every class, method, and field name becomes a meaningless symbol.
  • Encryption — strings, numbers, fields, arrays, and whole method bodies are encrypted and rebuilt only at runtime.
  • Obfuscation — control‑flow flattening, a custom virtual machine, method scattering, opaque predicates.
  • Anti‑analysis — detects debuggers, virtual machines, dumpers, and API hooks by their behaviour, so renaming a tool does not bypass it.
  • Stealth — hides the assembly's shape from decompilers and metadata readers.
  • Licensing — a built‑in key system that ties each licence key to the customer's machine.
  • Extras — merge dependencies into one file, export the logic to a side DLL, compress resources.

Before and after

Measured on a small sample program at the Max preset:

Original Protected
Types 8 715
Methods 23 4,601
Readable strings 54 0 (all encrypted)
Names LicenseChecker, Validate random symbols
Behaviour runs runs identically
// Before — your original code, fully readable in any decompiler
class LicenseChecker {
    const string Key = "PREMIUM-2024";
    public bool IsValid(string input) => input == Key;
}

// After — decompiled from the protected build
class q8XzP {
    //  "PREMIUM-2024"  ->  encrypted, rebuilt only at runtime
    //  method body     ->  virtual-machine bytecode / flattened control flow
    //  unreadable, practically un-decompilable
}

Usage

Interface — open MasonProtector.exe, pick your file, choose a preset (or tick the options you want), and press Protect.

Command line:

MasonProtector.exe --protect MyApp.exe MyApp_protected.exe --preset max

Presets: none, default, hide, max, all.

Note

For protecting your own software. You are responsible for how you use it and for following the laws that apply to you.


العربية

نظرة عامة

يأخذ MasonProtector ملف .NET الجاهز (.exe أو .dll) ويعيد بناءه نسخة محمية: الأسماء تتبعثر، النصوص والأرقام تتشفّر، أجسام الدوال تتحوّل إلى كود آلة افتراضية، وفيه طبقة وقت تشغيل تراقب المصحّحات والأجهزة الافتراضية وأدوات تفريغ الذاكرة. والبرنامج المحمي يشتغل تماماً مثل الأصلي.

طبقات الحماية

  • إعادة التسمية — كل اسم نوع ودالة وحقل يصير رمزاً بلا معنى.
  • التشفير — النصوص والأرقام والحقول والمصفوفات وأجسام الدوال كاملةً تتشفّر وتُبنى وقت التشغيل فقط.
  • التعتيم — تسطيح تدفّق التحكّم، آلة افتراضية مخصّصة، تبعثر الدوال، براهين خادعة.
  • مضاد التحليل — يكشف المصحّحات والأجهزة الافتراضية وأدوات التفريغ والـhooks بسلوكها، فإعادة تسمية الأداة ما تتخطّاه.
  • التخفّي — يخفي بنية البرنامج عن أدوات فكّ التعويم وقراءة المعدنية.
  • الترخيص — نظام مفاتيح مدمج يربط كل مفتاح بجهاز العميل.
  • إضافات — دمج المكتبات في ملف واحد، تصدير المنطق إلى DLL جانبي، ضغط الموارد.

قبل وبعد

قياس على برنامج عيّنة صغير بإعداد Max:

الأصلي المحمي
الأنواع 8 715
الدوال 23 4,601
نصوص مقروءة 54 0 (كلها مشفّرة)
الأسماء LicenseChecker رموز عشوائية
السلوك يعمل يعمل بشكل مطابق

الاستخدام

الواجهة — افتح MasonProtector.exe، اختر ملفك، اختر إعداداً جاهزاً (أو فعّل الخيارات التي تريد)، واضغط Protect.

سطر الأوامر:

MasonProtector.exe --protect MyApp.exe MyApp_protected.exe --preset max

الإعدادات الجاهزة: none و default و hide و max و all.

تنويه

لحماية برامجك أنت. أنت مسؤول عن طريقة استخدامك وعن الالتزام بالقوانين المعمول بها عندك.


Full technical manual: docs/MasonBook.pdf

MasonGroup · 2026 · MIT License