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 17, 2021

all is ok,thanks

@iexpurgator
Copy link

when crack by the script,in terminal type subl,no sublime app launch,no error

I have same problem, how u fix it?

@fireghostwolf
Copy link

when crack by the script,in terminal type subl,no sublime app launch,no error

I have same problem, how u fix it?

You can try to use commands or scripts to patch in the terminal. my sublime version is 4113. I use the script to patch sublime_text, it work perfect , but it can’t be modified manually using hexed.it, and the app cannot be launched just like you.

@iexpurgator
Copy link

when crack by the script,in terminal type subl,no sublime app launch,no error

I have same problem, how u fix it?

You can try to use commands or scripts to patch in the terminal. my sublime version is 4113. I use the script to patch sublime_text, it work perfect , but it can’t be modified manually using hexed.it, and the app cannot be launched just like you.

Yeah I'm using bash-script but I can't launched (video try bash-script (sorry quality of video)). I installed x86_64 version 4113

@maboloshi
Copy link
Author

@iexpurgator
Please try:

  1. Verify that the original sublime_text MD5 checksum is FF083966171185D01CB5F7F3721F1B95
  2. Verify the executable permission of sublime_text after repair

@iexpurgator
Copy link

@iexpurgator
Please try:

  1. Verify that the original sublime_text MD5 checksum is FF083966171185D01CB5F7F3721F1B95
  2. Verify the executable permission of sublime_text after repair

Thanks @maboloshi. Executable permission applied but md5sum was changed, how to fix that?

@maboloshi
Copy link
Author

@iexpurgator Can you upload the original sublime_text?

@iexpurgator
Copy link

@iexpurgator Can you upload the original sublime_text?

md5sum changed is file patched (sorry not clearly). Download file here file .bak is original

@leogx9r
Copy link

leogx9r commented Aug 18, 2021

@iexpurgator You didn't patch the file correctly. I double checked the file offsets and you replaced the byte sequence with the actual ASCII characters, so where you'd expect to see 48 31 C0 C3 as the byte sequence, it was replaced with 5C 78 34 38 5C 78 33 31 5C 78 43 30 5C 78 43 33, translating to \x48\x31\xC0\xC3 instead of the ASCII interpretation H1... What shell are you using and are you sure you used printf ? I've tested the command printf with bash and zsh and it works as expected. If you're using another shell it may (but shouldn't) produce incorrect output.

Try running the following script in a .sh file and see if you get the "Successfully patched the application!" line. It's basically a rework of @maboloshi's script that gives more verbose output indicating what went wrong. Save it as a .sh file and chmod +x it.

#!/bin/bash

BASEDIR="/opt/sublime_text"
TARGET="sublime_text"

VER="4113"
MD5_ORIGINAL="FF083966171185D01CB5F7F3721F1B95"
MD5_PATCHED="80739de6c764edfd7eeb925004EB7ED5"

if [ -d "$BASEDIR" ]; then
    cd "$BASEDIR"

    RESULT=`md5sum -c <<< "$MD5_ORIGINAL  $TARGET"`
    if [ "$TARGET: OK" != "$RESULT" ]; then
        echo "Application checksum mismatch. Perhaps the file was already patched or you're not using $TARGET v$VER?"
        exit
    fi

    printf '\x48\x31\xC0\xC3'                 | sudo dd of="$TARGET" bs=1 seek=$((0x0036567C)) conv=notrunc > /dev/null 2>&1
    printf '\x90\x90\x90\x90\x90'             | sudo dd of="$TARGET" bs=1 seek=$((0x0035BCCB)) conv=notrunc > /dev/null 2>&1
    printf '\x90\x90\x90\x90\x90'             | sudo dd of="$TARGET" bs=1 seek=$((0x0035BCE6)) conv=notrunc > /dev/null 2>&1
    printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | sudo dd of="$TARGET" bs=1 seek=$((0x00367171)) conv=notrunc > /dev/null 2>&1
    printf '\xC3'                             | sudo dd of="$TARGET" bs=1 seek=$((0x003653CE)) conv=notrunc > /dev/null 2>&1
    printf '\xC3'                             | sudo dd of="$TARGET" bs=1 seek=$((0x0034F5F0)) conv=notrunc > /dev/null 2>&1

    RESULT=`md5sum -c <<< "$MD5_PATCHED  $TARGET"`
    if [ "$TARGET: OK" != "$RESULT" ]; then
        echo "Failed to patch the application. You may require a reinstall as it may no longer start."
        exit
    fi

    echo "Successfully patched the application!"
else
    echo "Sublime Text was not found in the expected directory: $BASEDIR"
    echo "Modify the script to point to the correct directory then re-run it."
fi

@iexpurgator
Copy link

@iexpurgator You didn't patch the file correctly. I double checked the file offsets and you replaced the byte sequence with the actual ASCII characters, so where you'd expect to see 48 31 C0 C3 as the byte sequence, it was replaced with 5C 78 34 38 5C 78 33 31 5C 78 43 30 5C 78 43 33, translating to \x48\x31\xC0\xC3 instead of the ASCII interpretation H1... What shell are you using and are you sure you used printf ? I've tested the command printf with bash and zsh and it works as expected. If you're using another shell it may (but shouldn't) produce incorrect output.

Try running the following script in a .sh file and see if you get the "Successfully patched the application!" line. It's basically a rework of @maboloshi's script that gives more verbose output indicating what went wrong. Save it as a .sh file and chmod +x it.

#!/bin/bash

BASEDIR="/opt/sublime_text"
TARGET="sublime_text"

VER="4113"
MD5_ORIGINAL="FF083966171185D01CB5F7F3721F1B95"
MD5_PATCHED="80739de6c764edfd7eeb925004EB7ED5"

if [ -d "$BASEDIR" ]; then
    cd "$BASEDIR"

    RESULT=`md5sum -c <<< "$MD5_ORIGINAL  $TARGET"`
    if [ "$TARGET: OK" != "$RESULT" ]; then
        echo "Application checksum mismatch. Perhaps the file was already patched or you're not using $TARGET v$VER?"
        exit
    fi

    printf '\x48\x31\xC0\xC3'                 | sudo dd of="$TARGET" bs=1 seek=$((0x0036567C)) conv=notrunc > /dev/null 2>&1
    printf '\x90\x90\x90\x90\x90'             | sudo dd of="$TARGET" bs=1 seek=$((0x0035BCCB)) conv=notrunc > /dev/null 2>&1
    printf '\x90\x90\x90\x90\x90'             | sudo dd of="$TARGET" bs=1 seek=$((0x0035BCE6)) conv=notrunc > /dev/null 2>&1
    printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | sudo dd of="$TARGET" bs=1 seek=$((0x00367171)) conv=notrunc > /dev/null 2>&1
    printf '\xC3'                             | sudo dd of="$TARGET" bs=1 seek=$((0x003653CE)) conv=notrunc > /dev/null 2>&1
    printf '\xC3'                             | sudo dd of="$TARGET" bs=1 seek=$((0x0034F5F0)) conv=notrunc > /dev/null 2>&1

    RESULT=`md5sum -c <<< "$MD5_PATCHED  $TARGET"`
    if [ "$TARGET: OK" != "$RESULT" ]; then
        echo "Failed to patch the application. You may require a reinstall as it may no longer start."
        exit
    fi

    echo "Successfully patched the application!"
else
    echo "Sublime Text was not found in the expected directory: $BASEDIR"
    echo "Modify the script to point to the correct directory then re-run it."
fi

Thanks @leogx9r, you showed me the mistake. I'm missing #!/bin/bash in first line and printf it not works as expected. I want to discuss with you @leogx9r. How can I contact you?

@skmalviya
Copy link

skmalviya commented Aug 23, 2021

I am getting this error: "Failed to patch the application. You may require a reinstall as it may no longer start." for sublime 4113.

Only change in the script I did: BASEDIR="/opt/sublime_text" --> "/snap/sublime-text/106/opt/sublime_text"

@maboloshi
Copy link
Author

@skmalviya Snaps are squashfs images, which are by definition read-only.

You can try what @leogx9r mentioned.

Either extract the files, patch them and rebuild the SquashFS image as a snap or install the application via apt the way Sublime Text recommends.

@leogx9r
Copy link

leogx9r commented Aug 23, 2021

Thanks @leogx9r, you showed me the mistake. I'm missing #!/bin/bash in first line and printf it not works as expected. I want to discuss with you @leogx9r. How can I contact you?

@iexpurgator Sorry I don't give out contact info (to avoid being spammed) so best I can do is try to help you here.

Now onto your question, best I can imagine is that your bash shell isn't properly un-escaping characters, even though it works for me and I presume @maboloshi as well. Best I can gather from this is that you need to use double-quotes rather than single quotes (" vs ') as the bash manual indicates that single quotes will not interpolate vars (perhaps this also applies to escaped byte sequences?).

Try this, replace the printf '< .... >' with printf "< ... >" for each line containing it in the script. For example, the line:

printf '\x48\x31\xC0\xC3'                 | sudo dd of="$TARGET" bs=1 seek=$((0x0036567C)) conv=notrunc > /dev/null 2>&1

Should be replaced with:

printf "\x48\x31\xC0\xC3"                 | sudo dd of="$TARGET" bs=1 seek=$((0x0036567C)) conv=notrunc > /dev/null 2>&1

... and so on for the rest of the lines.

If that doesn't work, I've no idea what to tell you. It absolutely should at the very least and it's probably a quirk of your shell version (FTR, I'm using GNU bash, version 5.1.8(1)-release (x86_64-pc-linux-gnu), perhaps ensure you're using the same version?) or your terminal emulator (Also, I'm using guake as my personal terminal emulator, you can try that but it shouldn't be necessary tbh).


I am getting this error: "Failed to patch the application. You may require a reinstall as it may no longer start." for sublime 4113.

Only change in the script I did: BASEDIR="/opt/sublime_text" --> "/snap/sublime-text/106/opt/sublime_text"

@skmalviya as indicated in this comment, Snaps aren't supported via that patching method. They are read-only SquashFS images and cannot be modified. Your only way around that is to either extract the files, patch them and rebuild the SquashFS as a Snap or to install the program via the recommended method that Sublime devs have provided.

P.S. Assuming you've resolved that, you should be able to use the script maboloshi provided in the main post just fine (or the one you quoted).


P.P.S Both of you please stop quoting long messages, a simple tag like how I've mentioned you both keeps this thread cleaner and easier to read.

@bms8197
Copy link

bms8197 commented Aug 27, 2021

Any clue how to patch Sublime Text on MacOS BigSur (for M1 cpu), Sublime Build 4113?

@vbovone
Copy link

vbovone commented Aug 27, 2021

Any clue how to patch Sublime Text on MacOS BigSur (for M1 cpu), Sublime Build 4113?

Same here, I tried to use the MacOS bash commands above but didn't work for me

@bms8197
Copy link

bms8197 commented Aug 27, 2021

@vbovone Probably the strings are different on the ARM version and that's why it's not working. I guess it should work with the right approach but everything I tried so failed

Copy link

ghost commented Aug 27, 2021

I have made a rough Python 3 patcher for Sublime Text v4113 Windows x64 that uses leogx9r's signatures instead of hardcoded offsets.

https://github.com/rainbowpigeon/sublime-text-4-patcher

image

If there is demand, I can probably update it to support Linux and macOS.

@bms8197
Copy link

bms8197 commented Aug 27, 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

@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 Aug 28, 2021

@rainbowpidgeon Nice work.

P.S. You can auto-detect Sublime Text/Merge with patterns too (as well as the version # -- not shown below). There's two strings always present in either Text/Merge and is shown if you enter a license key for another product:

    def detect_sublime_text(self):
        print('[>] Attempting to autodetect application type ...')

        # 'That appears to be a Sublime Text '<license key>
        pat1 = PatternFinder(
            "Sublime Merge Detector",
            '54 68 61 74 20 61 70 70 65 61 72 73 20 74 6F 20 62 65 20 61 20 53 75 62 6C 69 6D 65 20 54 65 78 74 20',
            can_duplicate = True
        ).locate(self.binary, slow_method = False, log = False)
        # 'That appears to be a Sublime Merge '<license key>
        pat2 = PatternFinder(
            "Sublime Text Detector",
            '54 68 61 74 20 61 70 70 65 61 72 73 20 74 6F 20 62 65 20 61 20 53 75 62 6C 69 6D 65 20 4D 65 72 67 65 20',
            can_duplicate = True
        ).locate(self.binary, slow_method = False, log = False)
        
        # Only one of these patterns can exist in the application. If neither is found, it's not a known application.
        if pat1 == -1 and pat2 == -1:
            print('[!] Failed to identify binary. Are you sure this is a Sublime Text or Sublime Merge binary?')
            quit()
        elif pat1 > 0 and pat2 > 0:
            print(
                "[!] Both identity signatures detected in the binary! Cannot detect what application this is.\n" +
                "[!] Manually specify the application type with `-t`."
            )
            quit()
        elif pat1 > 0:
            return False

        return True

# ...
self.is_sublime_text = app_type if app_type is not None else self.detect_patcher()

# PATTER_DB contains patterns for Sublime Text/Merge for each supported OS ( MacOS/Linux/Windows, x64 instruction set only )
self.patchset = PATTERN_DB[ self.is_sublime_text ][ self.target_os ]

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

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