Skip to content

Commit 494bfed

Browse files
authored
Merge pull request #124 from sunnamed434/dev
Bump new version 0.15.0-alpha.27
2 parents 2a6b925 + ece9fae commit 494bfed

87 files changed

Lines changed: 725 additions & 452 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BitMono.sln.DotSettings

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2-
<s:Boolean x:Key="/Default/CodeEditing/SuppressUninitializedWarningFix/Enabled/@EntryValue">False</s:Boolean></wpf:ResourceDictionary>
2+
<s:Boolean x:Key="/Default/CodeEditing/SuppressUninitializedWarningFix/Enabled/@EntryValue">False</s:Boolean>
3+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CLI/@EntryIndexedValue">CLI</s:String>
4+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JS/@EntryIndexedValue">JS</s:String>
5+
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=NET/@EntryIndexedValue">NET</s:String>
6+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ldasm/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

CHANGELOG.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
| Versions: |
22
|---------------------------------|
3+
| [v0.15.0-alpha](#v0150-alpha27) |
34
| [v0.14.0-alpha](#v0140-alpha26) |
45
| [v0.13.1-alpha](#v0131-alpha25) |
56
| [v0.13.0-alpha](#v0130-alpha24) |
@@ -28,6 +29,19 @@
2829
| [v0.1.0](#v010) |
2930

3031
---
32+
### v0.15.0-alpha.27:
33+
2023-04-27
34+
#### Added:
35+
* UnmanagedString Protection.
36+
* More docs.
37+
38+
#### Fixed:
39+
* DotNetHook Protection.
40+
41+
#### Changed:
42+
* Major improvements and changes in Engine APIs.
43+
* Removed PreserveAll flag, now obfuscation should be more stable.
44+
3145
### v0.14.0-alpha.26:
3246
2023-04-24
3347
#### Added:
@@ -81,7 +95,7 @@
8195
2023-02-016
8296
#### Added:
8397
* BitMono ASCII Art in CLI.
84-
* Hiding of the pathes (file path, directory path, etc).
98+
* Hiding of the path (file path, directory path, etc).
8599
* Documentation.
86100

87101
#### Fixed:
@@ -162,7 +176,7 @@
162176

163177
### v0.5.0-alpha.14:
164178
#### Added:
165-
* Before obfuscation optmizes all method bodies (macros)
179+
* Before obfuscation optimizes all method bodies (macros)
166180

167181
#### Fixed:
168182
* BitMethodDotnet Protection

README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,32 @@ BitMono is a free open-source C# obfuscator that in most cases works **only** wi
1616

1717
<p align="center">
1818
<img src="https://raw.githubusercontent.com/sunnamed434/BitMono/main/resources/images/preview/before-after.png"
19-
alt="Before and after obfuscation preview by BitMono"
19+
alt="Before and after obfuscation preview by BitMono">
2020
</p>
2121

2222
<p align="center">
2323
<img src="https://raw.githubusercontent.com/sunnamed434/BitMono/main/resources/images/preview/before-after-2.png"
24-
alt="Before and after obfuscation preview by BitMono 2"
24+
alt="Before and after obfuscation preview by BitMono 2">
2525
</p>
2626

2727
<p align="center">
2828
<img src="https://raw.githubusercontent.com/sunnamed434/BitMono/main/resources/images/preview/GUI.png"
29-
alt="GUI"
29+
alt="GUI">
3030
</p>
3131

3232
<p align="center">
3333
<img src="https://raw.githubusercontent.com/sunnamed434/BitMono/main/resources/images/preview/CLI.png"
34-
alt="CLI"
34+
alt="CLI">
3535
</p>
3636

3737
<p align="center">
3838
<img src="https://raw.githubusercontent.com/sunnamed434/BitMono/main/resources/images/preview/configuration.png"
39-
alt="Configuration"
39+
alt="Configuration">
4040
</p>
4141

4242
## Usability
4343
BitMono breaks the most popular tools using just one packer, such as:
44-
- dnspy;
44+
- dnSpy;
4545
- dnlib;
4646
- AsmResolver;
4747
- MonoCecil;
@@ -65,8 +65,9 @@ Read the **[docs][bitmono_docs]** to read protection, functionality, and more.
6565
* Invisible types
6666
* No code
6767

68-
## Obfuscation Features
68+
## Features
6969
* StringsEncryption
70+
* **[UnmanagedString][unmanagedstring_source]** (based on existing protection)
7071
* **[BitDotNet][bitdotnet_source]** (based and improved on existing protection)
7172
* **[BitMethodDotnet][bitmethoddotnet_source]** (based and improved on existing protection)
7273
* **[DotNetHook][dotnethook_source]** (based on existing protection)
@@ -134,10 +135,10 @@ $ BitMono.CLI -f C:\specially_created_folder_for_obfuscation/your_app.exe -l C:\
134135
Want more? Simply read the **[docs][bitmono_docs]**.
135136

136137
### Detailed build status
137-
Branch | AppVeyor
138-
------------- | -------------
139-
main | [![Build status][image_appveyor_main]][appveyor_main_build]
140-
dev | [![Build status][image_appveyor_dev]][appveyor_dev_build]
138+
| Branch | AppVeyor |
139+
|--------|-------------------------------------------------------------|
140+
| main | [![Build status][image_appveyor_main]][appveyor_main_build] |
141+
| dev | [![Build status][image_appveyor_dev]][appveyor_dev_build] |
141142

142143
Credits
143144
-------
@@ -149,6 +150,8 @@ Credits
149150

150151
**[Weka][author_naweka]** for his advices, help and motivation.
151152

153+
**[MrakDev][author_mrakdev]** for the acquaintance in **[UnmanagedString][unmanagedstring_source]**.
154+
152155
**[ConfuserEx and their Forks][confuserex_source]** for most things that I watched for the architecture of BitMono and the obfuscator engine as an application and solving plenty of User solutions which I would be knew in the very long future after much fail usage of BitMono and reports by other Users. Day-by-day I'm looking for something interesting there to improve myself in knowledge and BitMono also.
153156

154157
**[OpenMod][openmod_source]** Definitely, openmod inspired this project a lot with services and clean code, extensive similar things to openmod.
@@ -173,10 +176,12 @@ Credits
173176
[openmod_source]: https://github.com/openmod/openmod
174177
[confuserex_source]: https://github.com/yck1509/ConfuserEx
175178
[simple_costura_decompressor_source]: https://github.com/dr4k0nia/Simple-Costura-Decompressor
179+
[unmanagedstring_source]: https://github.com/MrakDev/UnmanagedString
176180
[author_0x59r11]: https://github.com/0x59R11
177181
[author_gazzi]: https://github.com/GazziFX
178182
[author_ellisaur]: https://github.com/Elliesaur
179183
[author_naweka]: https://github.com/naweka
184+
[author_mrakdev]: https://github.com/MrakDev
180185
[author_kao_blog]: https://lifeinhex.com/
181186
[author_drakonia]: https://github.com/dr4k0nia
182187
[author_sunnamed434]: https://github.com/sunnamed434

docs/developers/do-not-resolve-members.rst

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Do Not Resolve Members
22
======================
33

4+
5+
.. warning::
6+
7+
Be careful, because ``Context.Module`` (ModuleDefinition) doesn't affected by ``DoNotResolveAttribute``.
8+
9+
410
For comfort BitMono provides an API which able to do not pass specfic members inside of the protection for easier understanding and abstraction let's call ``members`` as - types/methods/fields/properties, etc.
511

612

@@ -32,18 +38,14 @@ Add attribute ``[DoNotResolve(MemberInclusionFlags.Reflection)]`` with ``MemberI
3238
3339
3440
35-
You can specify multiple inclusion flags:
36-
37-
38-
.. code-block:: csharp
39-
[UsedImplicitly]
40-
[DoNotResolve(MemberInclusionFlags.SpecialRuntime | MemberInclusionFlags.Reflection)]
41-
public class MagicProtection : Protection
41+
You can specify multiple inclusion flags.
4242
4343
44-
.. warning::
44+
.. code-block:: csharp
4545
46-
Be careful, because ``Module`` doesn't affected by ``DoNotResolveAttribute``.
46+
[UsedImplicitly]
47+
[DoNotResolve(MemberInclusionFlags.SpecialRuntime | MemberInclusionFlags.Reflection)]
48+
public class MagicProtection : Protection
4749
4850
4951
THIS IS TOTALLY BAD AND WRONG! Sorting doesn't affects to the actual Module.
@@ -61,7 +63,7 @@ THIS IS TOTALLY BAD AND WRONG! Sorting doesn't affects to the actual Module.
6163
6264
6365
64-
Instead highly recommend to use this:
66+
Instead highly recommend to use this.
6567

6668

6769
.. code-block:: csharp
@@ -75,8 +77,10 @@ Instead highly recommend to use this:
7577
}
7678
7779
78-
This is also was wrong because if you will try to get access to the ``type.Methods``, etc, methods are not sorted, use specificly what you need, for example:
79-
- Need access to the types and methods? Then do this:
80+
This is also was wrong because if you will try to get access to the ``type.Methods``, etc, methods are not sorted, use specificly what you need, for example.
81+
82+
83+
Need access to the types and methods? Then do this.
8084

8185

8286
.. code-block:: csharp
@@ -94,7 +98,7 @@ This is also was wrong because if you will try to get access to the ``type.Metho
9498
}
9599
96100
97-
Need access to the methods? Then just iterrate through the methods:
101+
Need access to the methods? Then just iterrate through the methods.
98102

99103

100104
.. code-block:: csharp

docs/developers/obfuscation-execution-order.rst

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ Obfuscation Engine Execution Order
33

44
BitMono uses its own obfuscation execution order which is good to be known, and it reminds ConfuserEx a lot, if you're familiar with it you can be easier with it.
55

6-
1. Basic output information about Protections
7-
2. Elapsed time counter
8-
3. Output Information of Running Framework
9-
4. Resolve References
10-
5. Expand Macros
11-
6. Run Protection, PipelineProtection and child pipeline protections
6+
1. Output Loaded Module Info
7+
2. Sort Protections
8+
3. Basic output information about Protections
9+
4. Elapsed time counter
10+
5. Output Information of Running Framework
11+
6. Resolve References
12+
7. Expand Macros
13+
8. Run Protection, PipelineProtection and child pipeline protections
1214

1315

1416
.. code-block:: csharp
@@ -18,17 +20,17 @@ BitMono uses its own obfuscation execution order which is good to be known, and
1820
public class Pipeline : PipelineProtection
1921
2022
21-
5. Optimize Macros
22-
6. [ObfuscationAttribute] cleanup
23-
7. Create PE Image
24-
8. Output PE Image Build Errors
25-
9. Write Module
26-
10. Run Packers
23+
9. Optimize Macros
24+
10. [ObfuscationAttribute] cleanup
25+
11. Create PE Image
26+
12. Output PE Image Build Errors
27+
13. Write Module
28+
14. Run Packers
2729
2830
2931
.. code-block:: csharp
3032
3133
public class Packer : PackerProtection
3234
3335
34-
11. Output Elapsed Time since obfuscation
36+
15. Output Elapsed Time since obfuscation

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Table of Contents:
2626
protections/fullrenamer
2727
protections/objectreturntype
2828
protections/stringsencryption
29+
protections/unmanagedstring
2930
protections/nonamespaces
3031

3132

docs/protections/stringsencryption.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ StringsEncryption
33

44
How it works?
55
-------------
6-
Protection encrypts strings using basic AES encryption, but not everyone like it because it makes the worse performance of application.
6+
Protection encrypts strings using basic AES encryption, but not everyone like it because it makes the worse performance of application, but can be used with AntiDecompiler to crash dnSpy while analyzing the used class, also makes the RVA of the byte[] 0
77

8-
Had big thoughts about `Unmanaged String <https://github.com/MrakDev/UnmanagedString>`_, but, as I tested in Mono it causes problems.
8+
9+
.. warning::
10+
11+
This protection slows down the application a lot.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
UnmanagedString
2+
===============
3+
4+
How it works?
5+
-------------
6+
Protection creates native method with assembly code and protects strings only that can be encoded with `Windows-1252` encoding.
7+
8+
9+
.. warning::
10+
11+
This protection is only compatible with .NET Framework and .NET Core, and doens't work with Mono.

props/SharedProjectProps.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<PackageLicenseExpression>MIT</PackageLicenseExpression>
77
<PackageProjectUrl>https://github.com/sunnamed434/BitMono</PackageProjectUrl>
88
<PackageOwners>sunnamed434</PackageOwners>
9-
<PackageVersion>0.14.0-alpha.26</PackageVersion>
9+
<PackageVersion>0.15.0-alpha.27</PackageVersion>
1010
<RepositoryUrl>https://github.com/sunnamed434/BitMono</RepositoryUrl>
1111
<RepositoryType>git</RepositoryType>
1212
<Authors>sunnamed434</Authors>
13-
<Version>0.14.0-alpha.26</Version>
14-
<InformationalVersion>0.14.0-alpha.26</InformationalVersion>
13+
<Version>0.15.0-alpha.27</Version>
14+
<InformationalVersion>0.15.0-alpha.27</InformationalVersion>
1515
<Company>BitMono</Company>
1616
<Copyright>sunnamed434</Copyright>
1717
<LangVersion>10</LangVersion>

src/BitMono.API/Contexts/ProtectionParameters.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace BitMono.API.Contexts;
22

3+
[SuppressMessage("ReSharper", "UnusedType.Global")]
34
public class ProtectionParameters
45
{
56
public ProtectionParameters(List<IMetadataMember> members)

0 commit comments

Comments
 (0)