Skip to content

Instantly share code, notes, and snippets.

@maboloshi
Last active November 24, 2024 18:56
Show Gist options
  • Save maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47 to your computer and use it in GitHub Desktop.
Save maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47 to your computer and use it in GitHub Desktop.
Crack Sublime Text and Sublime Merge

Note

  1. If you can, please purchase the genuine license through the official channel and support the software developer.
  2. All crack methods here are implemented by @leogx9r.
  3. All data is not guaranteed to be authoritative or correct, nor has it been tested across the platform, nor is it responsible for any errors, lost data, etc. in practice! Please assess yourself!!!
  4. I am only within the ability to update the information based on the existing crack methods until the existing rules fail.

Sublime Patcher Script for personal use

The code implementation is very poor.
https://gist.github.com/maboloshi/5baecbddacf43855f13240b63be5673d

ToC

Sublime Text Sublime Merge
Stable channel win / linux / mac / mac-arm64 win / linux / mac / mac-arm64
Dev channel win / linux / mac / mac-arm64 win / linux / mac / mac-arm64

How to Crack Sublime Text, Stable Channel, Build 4152

Thanks to @leogx9r for providing cracking methods.

https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762200#gistcomment-3762200 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3802197#gistcomment-3802197 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3803204#gistcomment-3803204

Win64

Desciption Offset Original Patched
Initial License Check 0x000A8D78 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x000071D0 E8 17 FE 20 00 90 90 90 90 90
Persistent License Check 2 0x000071E9 E8 FE FD 20 00 90 90 90 90 90
Disable Server Validation Thread 0x000AAB3E 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x000A8945 55 C3
Disable Crash Reporter 0x00000400 41 C3

for 4117, 4118: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3927712#gistcomment-3927712

Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "15BB398D5663B89A44372EF15F70A46F" || exit
echo 000A8D78: 48 31 C0 C3          | xxd -r - sublime_text.exe
echo 000071D0: 90 90 90 90 90       | xxd -r - sublime_text.exe
echo 000071E9: 90 90 90 90 90       | xxd -r - sublime_text.exe
echo 000AAB3E: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe
echo 000A8945: C3                   | xxd -r - sublime_text.exe
echo 00000400: C3                   | xxd -r - sublime_text.exe

PS:xxd.exe extracted from git for windows

The license can be any string.

Blocked by Microsoft Defender SmartScreen -> More Info -> Run Anyway

Screenshot
![Screenshot](https://i.imgur.com/t4QlRZ6.png)

![Screenshot](https://i.imgur.com/18372Rh.png)

Linux

Desciption Offset Original Patched
Initial License Check 0x00415013 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x00409037 E8 C0 CC 12 00 90 90 90 90 90
Persistent License Check 2 0x0040904F E8 A8 CC 12 00 90 90 90 90 90
Disable Server Validation Thread 0x00416CA4 55 41 56 53 41 89 F6 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00414C82 41 C3
Disable Crash Reporter 0x003FA310 55 C3
Bash Script
# for Linux
cd /opt/sublime_text || exit
md5sum -c <<<"7038C3B1CC79504602DA70599D4CCCE9  sublime_text" || exit
echo 00415013: 48 31 C0 C3          | xxd -r - sublime_text
echo 00409037: 90 90 90 90 90       | xxd -r - sublime_text
echo 0040904F: 90 90 90 90 90       | xxd -r - sublime_text
echo 00416CA4: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 00414C82: C3                   | xxd -r - sublime_text
echo 003FA310: C3                   | xxd -r - sublime_text

macOS

Desciption Offset Original Patched
Initial License Check 0x0009F313 55 48 89 E5 48 31 C0 C3
Persistent License Check 1 0x00009CEF E8 3C 2D 13 00 90 90 90 90 90
Persistent License Check 2 0x00009D07 E8 24 2D 13 00 90 90 90 90 90
Disable Server Validation Thread 0x000A085D 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0009EF0E 55 C3
Disable Crash Reporter 0x00002A87 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "B07FDB3A228A46DF1CC178FE60B64D3B" || exit
echo 0009F313: 48 31 C0 C3          | xxd -r - sublime_text
echo 00009CEF: 90 90 90 90 90       | xxd -r - sublime_text
echo 00009D07: 90 90 90 90 90       | xxd -r - sublime_text
echo 000A085D: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 0009EF0E: C3                   | xxd -r - sublime_text
echo 00002A87: C3                   | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed

macOS (ARM64)

Based on: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3929427#gistcomment-3929427

Desciption Offset Original Patched
Initial License Check 0x01060C90 FC 6F BA A9 E6 03 1E AA E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x00FEAD18 40 BB 03 94 1F 20 03 D5
Persistent License Check 2 0x00FEAD2C 3B BB 03 94 1F 20 03 D5
Disable Server Validation Thread 0x01061F28 F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x01060908 FC 6F BD A9 C0 03 5F D6
Disable Crash Reporter 0x00FE5780 FC 6F BC A9 C0 03 5F D6
Bash Script
# for macOS (ARM64)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "B07FDB3A228A46DF1CC178FE60B64D3B" || exit
echo 01060C90: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_text
echo 00FEAD18: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FEAD2C: 1F 20 03 D5             | xxd -r - sublime_text
echo 01061F28: C0 03 5F D6             | xxd -r - sublime_text
echo 01060908: C0 03 5F D6             | xxd -r - sublime_text
echo 00FE5780: C0 03 5F D6             | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed


How to Crack Sublime Text, Dev Channel, Build 4154

Thanks to @leogx9r for providing cracking methods.

https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762200#gistcomment-3762200 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3802197#gistcomment-3802197 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3803204#gistcomment-3803204

Win64

Desciption Offset Original Patched
Initial License Check 0x0009E47C 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x0000647C E8 23 7C 20 00 90 90 90 90 90
Persistent License Check 2 0x00006495 E8 0A 7C 20 00 90 90 90 90 90
Disable Server Validation Thread 0x000A0222 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0009E043 55 C3

for 4117, 4118: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3927712#gistcomment-3927712

Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "ADF277D39672D83637AB708FC45413C8" || exit
echo 0009E47C: 48 31 C0 C3          | xxd -r - sublime_text.exe
echo 0000647C: 90 90 90 90 90       | xxd -r - sublime_text.exe
echo 00006495: 90 90 90 90 90       | xxd -r - sublime_text.exe
echo 000A0222: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text.exe
echo 0009E043: C3                   | xxd -r - sublime_text.exe

PS:xxd.exe extracted from git for windows

The license can be any string.

Blocked by Microsoft Defender SmartScreen -> More Info -> Run Anyway

Screenshot
![Screenshot](https://i.imgur.com/t4QlRZ6.png)

![Screenshot](https://i.imgur.com/18372Rh.png)

Linux

Desciption Offset Original Patched
Initial License Check 0x00443F94 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x0042B210 E8 37 44 14 00 90 90 90 90 90
Persistent License Check 2 0x0042B228 E8 1F 44 14 00 90 90 90 90 90
Disable Server Validation Thread 0x00445EB6 55 41 56 53 41 89 F6 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00443BF8 41 C3
Bash Script
# for Linux
cd /opt/sublime_text || exit
md5sum -c <<<"8836FE092DBB7BC8D3D2375D34510CA9  sublime_text" || exit
echo 00443F94: 48 31 C0 C3          | xxd -r - sublime_text
echo 0042B210: 90 90 90 90 90       | xxd -r - sublime_text
echo 0042B228: 90 90 90 90 90       | xxd -r - sublime_text
echo 00445EB6: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 00443BF8: C3                   | xxd -r - sublime_text

macOS

Desciption Offset Original Patched
Initial License Check 0x0009D527 55 48 89 E5 48 31 C0 C3
Persistent License Check 1 0x000097F5 E8 AE 12 13 00 90 90 90 90 90
Persistent License Check 2 0x0000980D E8 96 12 13 00 90 90 90 90 90
Disable Server Validation Thread 0x0009EA9D 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0009D122 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "E1A3347BECDA7CC1EF583ECACECACBDC" || exit
echo 0009D527: 48 31 C0 C3          | xxd -r - sublime_text
echo 000097F5: 90 90 90 90 90       | xxd -r - sublime_text
echo 0000980D: 90 90 90 90 90       | xxd -r - sublime_text
echo 0009EA9D: 48 31 C0 48 FF C0 C3 | xxd -r - sublime_text
echo 0009D122: C3                   | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed

macOS (ARM64)

Based on: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3929427#gistcomment-3929427

Desciption Offset Original Patched
Initial License Check 0x010758B8 FC 6F BA A9 E6 03 1E AA E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x01000360 33 A4 03 94 1F 20 03 D5
Persistent License Check 2 0x01000374 2E A4 03 94 1F 20 03 D5
Disable Server Validation Thread 0x01076B54 F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x01075534 FC 6F BD A9 C0 03 5F D6
Bash Script
# for macOS (ARM64)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "E1A3347BECDA7CC1EF583ECACECACBDC" || exit
echo 010758B8: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_text
echo 01000360: 1F 20 03 D5             | xxd -r - sublime_text
echo 01000374: 1F 20 03 D5             | xxd -r - sublime_text
echo 01076B54: C0 03 5F D6             | xxd -r - sublime_text
echo 01075534: C0 03 5F D6             | xxd -r - sublime_text
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed


How to Crack Sublime Merge, Stable Channel, Build 2083

Thanks to @leogx9r for providing cracking methods.

https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3823090#gistcomment-3823090 https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762883#gistcomment-3762883 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3802197#gistcomment-3802197

Win64

Desciption Offset Original Patched
Initial License Check 0x000251A8 55 41 57 41 56 41 55 41 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x000286A3 E8 70 AA 26 00 90 90 90 90 90
Persistent License Check 2 0x000286BC E8 57 AA 26 00 90 90 90 90 90
Disable Server Validation Thread 0x000269B8 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00024DCD 55 C3
Disable Crash Reporter 0x00023F18 41 C3
Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "E33B76ADA6E7E7577CD4E81A7A4580C7" || exit
echo 000251A8: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 000286A3: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 000286BC: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 000269B8: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge.exe
echo 00024DCD: C3                      | xxd -r - sublime_merge.exe
echo 00023F18: C3                      | xxd -r - sublime_merge.exe

PS:xxd.exe extracted from git for windows

Linux

thinks @urxi here

Bash Script
# for Linux
cd /opt/sublime_merge || exit
md5sum -c <<<"86F61A82E7EE8DD9BDC4CF16A7C8E825  sublime_merge" || exit
echo 0045A360: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0045D21D: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0045D23A: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0045B990: C3                      | xxd -r - sublime_merge
echo 0045A05A: C3                      | xxd -r - sublime_merge
echo 00459ABA: C3                      | xxd -r - sublime_merge

macOS

Desciption Offset Original Patched
Initial License Check 0x0002C2DF 55 48 89 E5 41 57 41 56 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x0002E96C E8 1F B9 18 00 90 90 90 90 90
Persistent License Check 2 0x0002E98B E8 00 B9 18 00 90 90 90 90 90
Disable Server Validation Thread 0x0002D295 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0002BF6A 55 C3
Disable Crash Reporter 0x0002B7AB 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "B1AADED4F196EEEEBF8D5A6F98B11288" || exit
echo 0002C2DF: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002E96C: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002E98B: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002D295: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge
echo 0002BF6A: C3                      | xxd -r - sublime_merge
echo 0002B7AB: C3                      | xxd -r - sublime_merge
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed

macOS (ARM64)

!!!! May have expired !!!!

Based on:

Desciption Offset Original Patched
Initial License Check 0x014D9060 FC 6F BA A9 E6 03 1E AA E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x014DAF68 AB B6 04 94 1F 20 03 D5
Persistent License Check 2 0x014DAF7C A6 B6 04 94 1F 20 03 D5
Disable Server Validation Thread 0x014D9DBC F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x014D8D9C FC 6F BD A9 C0 03 5F D6
Disable Crash Reporter 0x014D86E4 FC 6F BC A9 C0 03 5F D6
Bash Script
# for macOS (ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "B1AADED4F196EEEEBF8D5A6F98B11288" || exit
echo 014D9060: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 014DAF68: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014DAF7C: 1F 20 03 D5             | xxd -r - sublime_merge
echo 014D9DBC: C0 03 5F D6             | xxd -r - sublime_merge
echo 014D8D9C: C0 03 5F D6             | xxd -r - sublime_merge
echo 014D86E4: C0 03 5F D6             | xxd -r - sublime_merge
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed


How to Crack Sublime Merge, Dev Channel, Build 2085

Thanks to @leogx9r for providing cracking methods.

https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3823090#gistcomment-3823090 https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762883#gistcomment-3762883 https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47?permalink_comment_id=3802197#gistcomment-3802197

Win64

Desciption Offset Original Patched
Initial License Check 0x00025300 55 41 57 41 56 41 55 41 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x00028813 E8 B8 7F 27 00 90 90 90 90 90
Persistent License Check 2 0x0002882C E8 9F 7F 27 00 90 90 90 90 90
Disable Server Validation Thread 0x00026B20 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00024F25 55 C3
Disable Crash Reporter 0x00024070 41 C3
Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "8B6590708E6AAE98AC3AE29135DB084F" || exit
echo 00025300: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 00028813: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0002882C: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 00026B20: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge.exe
echo 00024F25: C3                      | xxd -r - sublime_merge.exe
echo 00024070: C3                      | xxd -r - sublime_merge.exe

PS:xxd.exe extracted from git for windows

Linux

thinks @urxi here

Bash Script
# for Linux
cd /opt/sublime_merge || exit
md5sum -c <<<"958DA6B7EC687B25F55A16FF6A3D9BD0  sublime_merge" || exit
echo 0045F22C: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 004620F9: 90 90 90 90 90          | xxd -r - sublime_merge
echo 00462116: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0046086C: C3                      | xxd -r - sublime_merge
echo 0045EF26: C3                      | xxd -r - sublime_merge
echo 0045E986: C3                      | xxd -r - sublime_merge

macOS

Desciption Offset Original Patched
Initial License Check 0x0002C4CB 55 48 89 E5 41 57 41 56 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x0002EB48 E8 15 23 19 00 90 90 90 90 90
Persistent License Check 2 0x0002EB67 E8 F6 22 19 00 90 90 90 90 90
Disable Server Validation Thread 0x0002D471 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0002C156 55 C3
Disable Crash Reporter 0x0002B997 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "D67510219FB14938A47BE39260C87215" || exit
echo 0002C4CB: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002EB48: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002EB67: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002D471: 48 31 C0 48 FF C0 C3    | xxd -r - sublime_merge
echo 0002C156: C3                      | xxd -r - sublime_merge
echo 0002B997: C3                      | xxd -r - sublime_merge
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed

macOS (ARM64)

!!!! May have expired !!!!

Based on:

Desciption Offset Original Patched
Initial License Check 0x015027EC FC 6F BA A9 E6 03 1E AA E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x015046D4 78 C9 04 94 1F 20 03 D5
Persistent License Check 2 0x015046E8 73 C9 04 94 1F 20 03 D5
Disable Server Validation Thread 0x0150352C F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x01502528 FC 6F BD A9 C0 03 5F D6
Disable Crash Reporter 0x01501E70 FC 6F BC A9 C0 03 5F D6
Bash Script
# for macOS (ARM64)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "D67510219FB14938A47BE39260C87215" || exit
echo 015027EC: E0 03 1F AA C0 03 5F D6 | xxd -r - sublime_merge
echo 015046D4: 1F 20 03 D5             | xxd -r - sublime_merge
echo 015046E8: 1F 20 03 D5             | xxd -r - sublime_merge
echo 0150352C: C0 03 5F D6             | xxd -r - sublime_merge
echo 01502528: C0 03 5F D6             | xxd -r - sublime_merge
echo 01501E70: C0 03 5F D6             | xxd -r - sublime_merge
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed

ST's new version of hexadecimal editing method

From: https://gist.github.com/opastorello/4d494d627ec9012367028c89cb7a1945

Search : 80 78 05 00 0f 94 c1 first result , replace: c6 40 05 01 48 85 c9

This patch is applicable to all x86-64 CPU platforms of ST.

ST's old version hexadecimal editing method

From: https://gist.github.com/opastorello/4d494d627ec9012367028c89cb7a1945?permalink_comment_id=4495369#gistcomment-4495369

97 94 0D --> 00 00 00

License Key:

----- BEGIN LICENSE -----
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
D5D52613 C3D12E98 BC49967F 7652EED2
9D2D2E61 67610860 6D338B72 5CF95C69
E36B85CC 84991F19 7575D828 470A92AB
------ END LICENSE ------
Copy link

ghost commented Aug 29, 2021

@leogx9r Thanks for the tip!

@bms8197
Copy link

bms8197 commented Aug 30, 2021

@leogx9r any clue on how to patch SublimeText build 4113 for MacOS BigSur ARM cpu?

@leogx9r
Copy link

leogx9r commented Aug 30, 2021

@bms8197 The same functions will exist, the patching method (well the replacement bytes) will be different since it's a different instruction set. If you're familiar with assembly (you'll need ARM64 assembly knowledge, obviously), open up the executable in a decompiler like IDA/Ghidra, select the ARM64 segment and try to locate the functions I've patched on x64 (all those listed in the main post of this thread). From there you'll just need to get those functions to either return 0/1 or rewrite them with non-functional opcodes (essentially nop).

While I could try doing it, I don't have any ARM64 based processors to test with, I've never done ARM64/THUMB assembly programming before and honestly, I'm lazy 😄

Setting up a VM just to virtualize ARM64 processors simply isn't worth the effort for me as I don't use them. Best of luck though.

@bms8197
Copy link

bms8197 commented Aug 30, 2021

@leogx9r I see. Unfortunatelly I do not have assembly knowledge. I could send you the sublime_text binary from my computer if that helps. If I had the knowledge I would have done it myself but it beats me totally this assembly stuff :(

@bms8197
Copy link

bms8197 commented Aug 30, 2021

@leogx9r I tried using Ghidra and try to dissassemble that sublime_text binary but I have no ideea how to figure out the functions that you patched on x64. If I try to search for 0x00090E5D it returns nothing so I'm totally lost here... Any clue on how to find what's needed?

@basitcodeenv
Copy link

Sir, I am beginner on Linux. Sir, I am using Ubuntu 20.04.
Sir, I install Sublime Text 4 from Snap Store.

Sir, Please Explain in Detail. How can I crack Sublime Text 4 ?

Sir, Please Help me.

@leogx9r
Copy link

leogx9r commented Sep 1, 2021

@bms8197 Honestly teaching you about disassemblers or reverse engineering will probably be more painful than just doing it myself (which I really don't want to do atm). I'll still give you some tips though:

  • Offsets for Windows/Linux/MacOS versions will not work on the ARM64 version, they're completely different.
  • The functions you're looking for would need to be found by digging around in the assembly, for example the license validity check calls several functions that display text like "License invalid" or whatever, you can search for those strings in the ARM64 version, cross-reference the function calls and try to locate those functions. You can use the offsets for the MacOS x64 version to dig around to see roughly what you're looking for.
  • If you've never done reverse-engineering before you're going to have a very steep learning curve. There are various resources out there showing how to use IDA/Ghidra and how assembly works.

Your best bet would be to find some other way (eg. someone else who worked on the ARM64 crack) or learn how to reverse-engineer x64/ARM64 because there's a lot you'd need to know to port that work, all of which is outside the scope of help I can provide (like I said, it'd be harder to teach you how to do it than make a VM, do it myself and test).

Good luck.


@abranasays Install the app via APT, not Snap and then run the patching program maboloshi made in the main post.

@bms8197
Copy link

bms8197 commented Sep 1, 2021

@leogx9r Allright! Thank you for all this information. I'll play around to see if I'm getting anywhere... As it appears, it's way more complicated than I thought...

Copy link

ghost commented Sep 4, 2021

@rainbowpigeon it would be really nice if you could update it for MacOS BigSur (ARM version), SublimeText build 4113. If you need the SublimeText binary as it is found on MacOS BigSur ARM, I can provide the original one resulted from the .zip file downloaded from Sublime's official website

@bms8197 No worries, I can download the binary myself and test it out. Apologies for the delayed reply, I was working on updating the x64 Windows patcher to work with Dev builds as well (which means v4114 works now for anyone who is interested!).

@vbovone
Copy link

vbovone commented Sep 4, 2021

@rainbowpigeon it would be really nice if you could update it for MacOS BigSur (ARM version), SublimeText build 4113. If you need the SublimeText binary as it is found on MacOS BigSur ARM, I can provide the original one resulted from the .zip file downloaded from Sublime's official website

@bms8197 No worries, I can download the binary myself and test it out. Apologies for the delayed reply, I was working on updating the x64 Windows patcher to work with Dev builds as well (which means v4114 works now for anyone who is interested!).

I tried your patcher and it works like a charm! congrats :)
It would be nice to use it as well in my MacBook M1

@leogx9r
Copy link

leogx9r commented Sep 5, 2021

Alright so I have absolutely no idea if this will work but I've (experimentally) patched the MacOS binary (v4114) for both x86_64 (x64) and ARM64 (Not ARM32, just like I've not done x86). Give it a shot here. Replace the original with that and try starting the app, if it doesn't work, well I tried. Virus scan here. If you don't trust it, you can do a simple byte diff on the original to see what I've changed, fire up your disassembler and look at the actual instructions. Too lazy to do a graph with bytes changed.

What's patched:

  • License check (enter anything just like normal and it should be valid)
  • Invalidation/validation functions disabled
  • Server license validation thread neutered
  • Disabled phoning home on new license being entered
  • Disabled crash reporter for sending dumps on a crash

Basically, I've replaced the ret with ret x30 and xor rax, rax with mov x0, xzr, which is basically the only difference in assembly from x86_64. x30 register contains the return address, x0 contains the return value. Instructions are always 32-bits long on ARM arch.

No, I'll probably not bother doing this for future executables, it should be enough for you all to build patterns off of though (assuming you know how to) and ofc, assuming it works.

Tagging @vbovone and @bms8197 as you guys would probably be interested.

If it works, great, if it doesn't well, I doubt i'll be trying again 👍

@vbovone
Copy link

vbovone commented Sep 5, 2021

Alright so I have absolutely no idea if this will work but I've (experimentally) patched the MacOS binary (v4114) for both x86_64 (x64) and ARM64 (Not ARM32, just like I've not done x86). Give it a shot here. Replace the original with that and try starting the app, if it doesn't work, well I tried. Virus scan here. If you don't trust it, you can do a simple byte diff on the original to see what I've changed, fire up your disassembler and look at the actual instructions. Too lazy to do a graph with bytes changed.

What's patched:

  • License check (enter anything just like normal and it should be valid)
  • Invalidation/validation functions disabled
  • Server license validation thread neutered
  • Disabled phoning home on new license being entered
  • Disabled crash reporter for sending dumps on a crash

Basically, I've replaced the ret with ret x30 and xor rax, rax with mov x0, xzr, which is basically the only difference in assembly from x86_64. x30 register contains the return address, x0 contains the return value. Instructions are always 32-bits long on ARM arch.

No, I'll probably not bother doing this for future executables, it should be enough for you all to build patterns off of though (assuming you know how to) and ofc, assuming it works.

Tagging @vbovone and @bms8197 as you guys would probably be interested.

If it works, great, if it doesn't well, I doubt i'll be trying again 👍

Hi leogx9r,

First of all thanks for your time! I tried to launch the application from my Macbook M1, I've noticed that the file needs to be renamed with .app extension
From a quick launch it cannot be executed even if I changed Mac permissions to run third party applications
image

I don't want to bother you again with the Mac ARM version but it's just to giving you a feedback.

Regards,

@bms8197
Copy link

bms8197 commented Sep 6, 2021

@leogx9r It's not working in my case, on Apple M1 cpu. I'm getting same error as @vbovone. I do appreciate your time and effort for this...

@basitcodeenv
Copy link

# for Linux
cd /opt/sublime_merge || exit
md5sum -c <<<"43E900A19926409EDF6BD8BA8709C633  sublime_merge" > /dev/null 2>&1 || exit
printf '\x48\xC7\xC0\x19\x01\x00\x00\xC3' | dd of=sublime_merge bs=1 seek=$((0x003A5400)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_merge bs=1 seek=$((0x003A7EC9)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_merge bs=1 seek=$((0x003A7EE4)) conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | dd of=sublime_merge bs=1 seek=$((0x003A67FE)) conv=notrunc
printf '\xC3'                             | dd of=sublime_merge bs=1 seek=$((0x003A514E)) conv=notrunc
printf '\xC3'                             | dd of=sublime_merge bs=1 seek=$((0x003A40D2)) conv=notrunc

Sir, I Installed sublime text via apt. I run below command:
md5sum -c <<<"43E900A19926409EDF6BD8BA8709C633 sublime_merge" > /dev/null 2>&1 || exit
Sir, My Terminal close.
Sir, Please Help me.

@maboloshi
Copy link
Author

@abranasays You should use the script corresponding to sublime text instead of sublime_merge,

Copy link

ghost commented Sep 13, 2021

Alright so I have absolutely no idea if this will work but I've (experimentally) patched the MacOS binary (v4114) for both x86_64 (x64) and ARM64 (Not ARM32, just like I've not done x86). Give it a shot here. Replace the original with that and try starting the app, if it doesn't work, well I tried. Virus scan here. If you don't trust it, you can do a simple byte diff on the original to see what I've changed, fire up your disassembler and look at the actual instructions. Too lazy to do a graph with bytes changed.
What's patched:

  • License check (enter anything just like normal and it should be valid)
  • Invalidation/validation functions disabled
  • Server license validation thread neutered
  • Disabled phoning home on new license being entered
  • Disabled crash reporter for sending dumps on a crash

Basically, I've replaced the ret with ret x30 and xor rax, rax with mov x0, xzr, which is basically the only difference in assembly from x86_64. x30 register contains the return address, x0 contains the return value. Instructions are always 32-bits long on ARM arch.
No, I'll probably not bother doing this for future executables, it should be enough for you all to build patterns off of though (assuming you know how to) and ofc, assuming it works.
Tagging @vbovone and @bms8197 as you guys would probably be interested.
If it works, great, if it doesn't well, I doubt i'll be trying again 👍

Hi leogx9r,

First of all thanks for your time! I tried to launch the application from my Macbook M1, I've noticed that the file needs to be renamed with .app extension
From a quick launch it cannot be executed even if I changed Mac permissions to run third party applications
image

I don't want to bother you again with the Mac ARM version but it's just to giving you a feedback.

Regards,

You aren't getting a message saying the file is damaged, so use the following command to re-sign the app yourself and it should run.
codesign --force --deep --sign - /Applications/Sublime\ Text.app

If you get an error about xcrun missing, just run the command xcode-select --install to install the missing files first, then re-run the command.

@bms8197
Copy link

bms8197 commented Sep 13, 2021

@1-Dev1l you're the man! Thanks for the tip. I have now, SublimeText, build 4114 fully registered on MacOS BigSur ARM (M1).
@leogx9r You're a genius! Thank you so much!

image

@vbovone
Copy link

vbovone commented Sep 13, 2021

@1-Dev1l you're the man! Thanks for the tip. I have now, SublimeText, build 4114 fully registered on MacOS BigSur ARM (M1).
@leogx9r You're a genius! Thank you so much!

Hi bms8197,

What did you do to successfully install the app?

I runt this :
image

But I'm still getting the same error

Copy link

ghost commented Sep 13, 2021

@1-Dev1l you're the man! Thanks for the tip. I have now, SublimeText, build 4114 fully registered on MacOS BigSur ARM (M1).
@leogx9r You're a genius! Thank you so much!

Hi bms8197,

What did you do to successfully install the app?

I runt this :
image

But I'm still getting the same error

Ensure 'App Store and identified developers' is selected under 'Allow apps downloaded from' in System Preferences > Security & Privacy > General

@bms8197
Copy link

bms8197 commented Sep 13, 2021

I had SublimeText build 4113 installed. I've downloaded the latest dev build 4114 from their website. Then took the Sublime Text.App and put in Applications folder using replace (since the app was already there). I've opened the app just to check that I have build 4114. Close SublimeText App, Download the sublime_text binary provided by @legox9r. Copy sublime_text binary over the original binary then ran that codesign command. I've got the same message as you but the app works.

Oh I do have these entries in /etc/hosts:

# sublimetext
0.0.0.0 sublimetext.com
0.0.0.0 license.sublimehq.com
0.0.0.0 45.55.255.55 #sublimetext
0.0.0.0 45.55.41.223 #sublimetext

As a side note, I had SublimeText v4113 registered with a license that required upgrade (not sure if matters or not):

—– BEGIN LICENSE —–
Die Socialisten GmbH
10 User License
EA7E-800613
51311422 E45F49ED 3F0ADE0C E5B8A508
2F4D9B65 64E1E244 EDA11F0E F9D06110
B7B2E826 E6FDAA72 2C653693 5D80582F
09DCFFB5 113A940C 5045C0CD 5F8332F8
34356CC6 D96F6FDB 4DEC20EA 0A24D83A
2C82C329 E3290B29 A16109A7 EC198EB9
F28EBB17 9C07403F D44BA75A C23C6874
EBF11238 5546C3DD 737DC616 445C2941
—— END LICENSE ——

Go to Settings -> Security & Privacy -> General; check if you have SublimeText there and allow it to run

Copy link

ghost commented Sep 13, 2021

You could also try opening Applications folder in finder, control-click the application and choose Open if you aren't getting the 'Open Anyway' message for the app.

Also, I have nothing in hosts and nothing in licence and it works well for me.
Screenshot 2021-09-13 at 15 59 03

@vbovone
Copy link

vbovone commented Sep 13, 2021

So the binary needs to be placed here right ? From Security & Privacy tab I've got Anywhere so it should be ok

image

@bms8197
Copy link

bms8197 commented Sep 13, 2021

I would do this:

  • close SublimeText
  • download SublimeText v4114 from their site;
  • copy SublimeText.app resulted from the previous download to Applications folder (using Finder) and chose Replace
  • then execute the following commands via Terminal:
cd /Applications/Sublime\ Text.app/Contents/MacOS/
cp ~/Downloads/sublime_text .
codesign --force --deep --sign - /Applications/Sublime\ Text.app

Then try to open SublimeText. You will get a notification message, click OK, then Go to Settings -> Security & Privacy -> General and see if you need to allow anything there.

After that it should work. At least it worked in my case. I'm running MacOS BigSur 11.5.2 (M1 cpu) on a 2021 iMac 24"

@vbovone
Copy link

vbovone commented Sep 13, 2021

I would do this:

  • close SublimeText
  • download SublimeText v4114 from their site;
  • copy SublimeText.app resulted from the previous download to Applications folder (using Finder) and chose Replace
  • then execute the following commands via Terminal:
cd /Applications/Sublime\ Text.app/Contents/MacOS/
cp ~/Downloads/sublime_text .
codesign --force --deep --sign - /Applications/Sublime\ Text.app

Then try to open SublimeText. You will get a notification message, click OK, then Go to Settings -> Security & Privacy -> General and see if you need to allow anything there.

After that it should work. At least it worked in my case. I'm running MacOS BigSur 11.5.2 (M1 cpu) on a 2021 iMac 24"

Thanks you guys! It works 👯

Just remember this to anyone having my same issue. When copying the Application with Finder it's very important to NOT OPEN the app until the end of the entire process.

@maboloshi
Copy link
Author

maboloshi commented Sep 14, 2021

I tried to organize the patched shulime text 4114 binary file provided by @leogx9r into rules, but, there are still two rules that are not organized and I don't know if the rest are valid.

Sublime Text Build 4114 macOS(arm64) ↓

Desciption Offset Original Patched
Disable Crash Reporter 0x00F615F4 FC 6F BC A9 C0 03 5F D6
  Pattern:  FC 6F BC A9 F6 57 01 A9 F4 4F 02 A9 FD 7B 03 A9 FD C3 00 91 FF 03 0F D1

May be:
4112-DEV:0x00F2A078
4113-STA:0x00F2A25C
4114-DEV:0x00F615F4

Desciption Offset Original Patched
Persistent License Check 1 0x00F65F80 AF 94 03 94 1F 20 03 D5
  Pattern:  ? ? ? 94 61 46 41 F9 ? ? 00 10 1F 20 03 D5 02 53 87 52

May be:
4112-DEV:0x00F2E9BB
4113-STA:0x00F2EBA3
4114-DEV:0x00F65F83

Desciption Offset Original Patched
Persistent License Check 2 0x00F65F94 AA 94 03 94 1F 20 03 D5
  Pattern:  ? ? ? 94 ? 2F 00 ? F7 ? ? 91 E0 42 ? 91 E0 6F 00 F9

May be:
4112-DEV:0x00F2E9CF
4113-STA:0x00F2EBB7
4114-DEV:0x00F65F97

Desciption Offset Original Patched
Disable License Notify Thread 0x00FD3EE8 FC 6F BD A9 C0 03 5F D6
  Patterne:  FC 6F BD A9 F4 4F 01 A9 FD 7B 02 A9 FD 83 00 91 FF 43 0C D1 F3 03 00 AA

May be:
4112-DEV:0x00F9AC94
4113-STA:0x00F9AD48
4114-DEV:0x00FD3EE8

Desciption Offset Original Patched
Initial License Check 0x00FD4258 E6 03 1E AA ED 65 0E 94 E0 03 1F AA C0 03 5F D6
  Pattern:  None
Desciption Offset Original Patched
Disable Server Validation Thread 0x00FD52F0 F6 57 BD A9 C0 03 5F D6
  Pattern:  F6 57 BD A9 F4 4F 01 A9 FD 7B 02 A9 FD 83 00 91 ? ? ? 94 ? ? ? 94 F3 03 00 AA ? ? ? 94 74 1A 00 B9

May be:
4112-DEV:0x00F9C078
4113-STA:0x00F9C114
4114-DEV:0x00FD52F0

4112, 4113 and 4114 have very different offset, Pattern validity is in doubt

@leogx9r
Copy link

leogx9r commented Sep 14, 2021

Well I'll be, I didn't expect that to work, lol. @1-Dev1l thanks for that.

@maboloshi Thanks, unfortunately I don't remember exactly what I change (didn't document it since I didn't expect it to work) and my patching method was slightly different from the x64 versions (patched wrapper functions iirc). Didn't make the time to do it "properly" but I'll maybe try to work on it when I get some time and see if I can put it together a bit more coherently.

For patterns, my signature maker plugin doesn't work on ARM and would basically require heavy modifications so that's a task for another day.

Glad it all worked out. 😄

@Destitute-Streetdwelling-Guttersnipe

@maboloshi You use "C3" (ret) to patch "Disable License Notify Thread". But I saw @leogx9r wrote that "Simply return 0 here to disable." in comment https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#gistcomment-3802197.
Is this a mistake? Why don't you use ret 0?

@Destitute-Streetdwelling-Guttersnipe

@leogx9r thanks for your great contribution. I'm curious about the Server Validation Thread. In your analysis, you suggest to use ret 1 to disable it.
However, I saw someone named rufoa posted patches for it using ret for many versions of SM (from 2027 to 2059).
I tried ret on SM 2059 and it seems ok.
Do you think patching with ret has the same effect?

@leogx9r
Copy link

leogx9r commented Sep 15, 2021

@Destitute-Streetdwelling-Guttersnipe It does have the same effect. The function returns the value of pthread_join() or something similar. I didn't see Sublime Text/Merge use the return value but decided to have it return the proper value anyways for consistency (which upon research seems it required zero so I guess I documented that wrong).

The only function you really need to have a return value is for the license checking function, which requires zero always. The rest are basically optional. The return value isn't actually used (based on my reverse engineering) on the other functions.

Edit: On Windows it returns the value of CreateThread() which requires a non-zero value to indicate success. I originally patched this on Windows so I used the same method for Linux/MacOS -- they instead use pthread which requires a zero value to indicate success, so I guess that's where I got mixed up. So you should ideally return 1 on Windows (or any non-zero value) and 0 on Linux but it doesn't matter really since the value is never used.

@Destitute-Streetdwelling-Guttersnipe

@leogx9r thanks for the explanation. I think this also answer my question to @maboloshi about "License Notify Thread". We can return anything since the return value is ignored.

I created a patcher in my github which uses the patterns you posted. I upgraded them to use reghex (which is regex with hex bytes), so that I can combine more actions into 1 pattern.
For example: reghex="(?<= 41 B8 . . . . ) E8 . . . . (48|49) . .", fix=nop5 can be used to patch the invalidate1 call for both dev and stable versions of ST (48 for dev, 49 for stable), the offset to E8 is described by the lookahead (?<= 41 B8 . . . . ).
Another example: reghex="(?<= E8 ) . . . .", patch=ret0, is_ref=True can be used to patch the license_check call without the need to analyze the instruction length of Call (E8).
I hope to make it less dependent on x64 and easier to add support for arm64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment