Skip to content

Instantly share code, notes, and snippets.

@maboloshi
Last active May 3, 2024 17:16
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

How to Crack Sublime Text Build 4121

Thanks to @leogx9r for providing cracking methods.

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

Note: ARM platform is not supported

Win64 ↓

Desciption Offset Original Patched
Initial License Check 0x000A691C 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x0000711A E8 55 1F 20 00 90 90 90 90 90
Persistent License Check 2 0x00007133 E8 3C 1F 20 00 90 90 90 90 90
Disable Server Validation Thread 0x000A84E3 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x000A6517 55 C3
Disable Crash Reporter 0x00000400 41 C3

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

Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Text" || exit
printf '5446869D73EAEADEC1CACE4E5A6CF64D  sublime_text.exe' | md5sum -c - || exit
printf '\x48\x31\xC0\xC3'                 | dd.exe of=sublime_text.exe bs=1 seek=682268 conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd.exe of=sublime_text.exe bs=1 seek=28954  conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd.exe of=sublime_text.exe bs=1 seek=28979  conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | dd.exe of=sublime_text.exe bs=1 seek=689379 conv=notrunc
printf '\xC3'                             | dd.exe of=sublime_text.exe bs=1 seek=681239 conv=notrunc
printf '\xC3'                             | dd.exe of=sublime_text.exe bs=1 seek=1024   conv=notrunc

PS:Command Line Tools for Windows 64 extracted from PortableGit

The license can be any string.

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

Screenshot

Screenshot

Screenshot

Linux ↓

Desciption Offset Original Patched
Initial License Check 0x00375A48 55 41 57 41 48 31 C0 C3
Persistent License Check 1 0x0036BC85 E8 0C BC 11 00 90 90 90 90 90
Persistent License Check 2 0x0036BC9B E8 F6 BB 11 00 90 90 90 90 90
Disable Server Validation Thread 0x003774CB 55 41 56 53 41 89 F6 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0037570C 41 C3
Disable Crash Reporter 0x0035F930 55 C3

for 4121: https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47#gistcomment-3940961

Bash Script
# for Linux
cd /opt/sublime_text || exit
md5sum -c <<<"D3343AD6D13F816F1F9414223B8BE091  sublime_text" || exit
printf '\x48\x31\xC0\xC3'                 | dd of=sublime_text bs=1 seek=$((0x00375A48)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_text bs=1 seek=$((0x0036BC85)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_text bs=1 seek=$((0x0036BC9B)) conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | dd of=sublime_text bs=1 seek=$((0x003774CB)) conv=notrunc
printf '\xC3'                             | dd of=sublime_text bs=1 seek=$((0x0037570C)) conv=notrunc
printf '\xC3'                             | dd of=sublime_text bs=1 seek=$((0x0035F930)) conv=notrunc

macOS ↓

Desciption Offset Original Patched
Initial License Check 0x0009257E 55 48 89 E5 48 31 C0 C3
Persistent License Check 1 0x000086F6 E8 1F 1D 12 00 90 90 90 90 90
Persistent License Check 2 0x00008715 E8 00 1D 12 00 90 90 90 90 90
Disable Server Validation Thread 0x000938CF 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x0009219C 55 C3
Disable Crash Reporter 0x00002867 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
[ $(md5 sublime_text) = 29D43CC159DA2FADFCD15D95536AA29A ] || exit
printf '\x48\x31\xC0\xC3'                 | dd of=sublime_text bs=1 seek=$((0x0009257E)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_text bs=1 seek=$((0x000086F6)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_text bs=1 seek=$((0x00008715)) conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | dd of=sublime_text bs=1 seek=$((0x000938CF)) conv=notrunc
printf '\xC3'                             | dd of=sublime_text bs=1 seek=$((0x0009219C)) conv=notrunc
printf '\xC3'                             | dd of=sublime_text bs=1 seek=$((0x00002867)) conv=notrunc
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Text.app"

Requires Apple Command Line Tools to be installed

macOS (M1 ARM64) ↓

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

Desciption Offset Original Patched
Initial License Check 0x00FCA6F8 E6 03 1E AA 19 59 0E 94 E0 03 1F AA C0 03 5F D6
Persistent License Check 1 0x00F5C160 5F 95 03 94 1F 20 03 D5
Persistent License Check 2 0x00F5C174 5A 95 03 94 1F 20 03 D5
Disable Server Validation Thread 0x00FCB7D8 F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x00FCA388 FC 6F BD A9 C0 03 5F D6
Disable Crash Reporter 0x00F577E4 FC 6F BC A9 C0 03 5F D6
Bash Script
# for MacOS
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
[ $(md5 sublime_text) = B78F54073437FDF71834D46DCEC72700 ] || exit
printf '\xE0\x03\x1F\xAA\xC0\x03\x5F\xD6' | dd of=sublime_text bs=1 seek=$((0x00FCA6F8)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_text bs=1 seek=$((0x00F5C160)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_text bs=1 seek=$((0x00F5C174)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00FCB7D8)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00FCA388)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_text bs=1 seek=$((0x00F577E4)) conv=notrunc

How to Crack Sublime Merge Build 2063

Thanks to @leogx9r for providing cracking methods.

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

Note: ARM platform is not supported

Win64 ↓

Desciption Offset Original Patched
Initial License Check 0x00024570 55 41 57 41 56 41 55 41 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x00027127 E8 9C FC 25 00 90 90 90 90 90
Persistent License Check 2 0x00027140 E8 83 FC 25 00 90 90 90 90 90
Disable Server Validation Thread 0x00025AD7 55 56 57 48 83 EC 30 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x000241C3 55 C3
Disable Crash Reporter 0x00021AF8 41 C3
Bat Script
:: for Win64
cd /d "C:\Program Files\Sublime Merge" || exit
printf 'A6D0ED92FDC38018D59A426EE3E16929  sublime_merge.exe' | md5sum -c - || exit
printf '\x48\xC7\xC0\x19\x01\x00\x00\xC3' | dd of=sublime_merge.exe bs=1 seek=148848 conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_merge.exe bs=1 seek=160039 conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_merge.exe bs=1 seek=160064 conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | dd of=sublime_merge.exe bs=1 seek=154327 conv=notrunc
printf '\xC3'                             | dd of=sublime_merge.exe bs=1 seek=147907 conv=notrunc
printf '\xC3'                             | dd of=sublime_merge.exe bs=1 seek=137976 conv=notrunc

PS:Command Line Tools for Windows 64 extracted from PortableGit

Linux ↓

Desciption Offset Original Patched
Initial License Check 0x003B3B62 55 41 57 41 56 41 55 41 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x003B66AD E8 A6 39 1D 00 90 90 90 90 90
Persistent License Check 2 0x003B66C8 E8 8B 39 1D 00 90 90 90 90 90
Disable Server Validation Thread 0x003B4F8D 55 41 56 53 41 89 F6 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x003B38AE 41 C3
Disable Crash Reporter 0x003B2832 55 C3
Bash Script
# for Linux
cd /opt/sublime_merge || exit
md5sum -c <<<"CB61D19785055FEABA792E7D908E2374  sublime_merge" || exit
printf '\x48\xC7\xC0\x19\x01\x00\x00\xC3' | dd of=sublime_merge bs=1 seek=$((0x003B3B62)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_merge bs=1 seek=$((0x003B66AD)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_merge bs=1 seek=$((0x003B66C8)) conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | dd of=sublime_merge bs=1 seek=$((0x003B4F8D)) conv=notrunc
printf '\xC3'                             | dd of=sublime_merge bs=1 seek=$((0x003B38AE)) conv=notrunc
printf '\xC3'                             | dd of=sublime_merge bs=1 seek=$((0x003B2832)) conv=notrunc

macOS ↓

Desciption Offset Original Patched
Initial License Check 0x00027747 55 48 89 E5 41 57 41 56 48 C7 C0 19 01 00 00 C3
Persistent License Check 1 0x000295E4 E8 CA B9 21 00 90 90 90 90 90
Persistent License Check 2 0x00029603 E8 AB B9 21 00 90 90 90 90 90
Disable Server Validation Thread 0x0002844F 55 48 89 E5 41 57 41 48 31 C0 48 FF C0 C3
Disable License Notify Thread 0x00027402 55 C3
Disable Crash Reporter 0x00025EA1 55 C3
Bash Script
# for MacOS
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
[ $(md5 sublime_merge) = D578F6D65F9470F84E1D6724277E6820 ] || exit
printf '\x48\xC7\xC0\x19\x01\x00\x00\xC3' | dd of=sublime_merge bs=1 seek=$((0x00027747)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_merge bs=1 seek=$((0x000295E4)) conv=notrunc
printf '\x90\x90\x90\x90\x90'             | dd of=sublime_merge bs=1 seek=$((0x00029603)) conv=notrunc
printf '\x48\x31\xC0\x48\xFF\xC0\xC3'     | dd of=sublime_merge bs=1 seek=$((0x0002844F)) conv=notrunc
printf '\xC3'                             | dd of=sublime_merge bs=1 seek=$((0x00027402)) conv=notrunc
printf '\xC3'                             | dd of=sublime_merge bs=1 seek=$((0x00025EA1)) conv=notrunc
Re-Sign App
codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Requires Apple Command Line Tools to be installed

macOS (M1 ARM64) ↓

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

Desciption Offset Original Patched
Initial License Check 0x013F14DC F8 5F BC A9 F6 57 01 A9 20 23 80 D2 C0 03 5F D6
Persistent License Check 1 0x013F2BDC 21 6D 06 94 1F 20 03 D5
Persistent License Check 2 0x013F2BF0 1C 6D 06 94 1F 20 03 D5
Disable Server Validation Thread 0x013F1FA4 F6 57 BD A9 C0 03 5F D6
Disable License Notify Thread 0x013F1230 FC 6F BD A9 C0 03 5F D6
Disable Crash Reporter 0x013EFFC8 FC 6F BC A9 C0 03 5F D6
Bash Script
# for MacOS
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
[ $(md5 sublime_merge) = D578F6D65F9470F84E1D6724277E6820 ] || exit
printf '\x20\x23\x80\xD2\xC0\x03\x5F\xD6' | dd of=sublime_merge bs=1 seek=$((0x013F14DC)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_merge bs=1 seek=$((0x013F2BDC)) conv=notrunc
printf '\x1F\x20\x03\xD5'                 | dd of=sublime_merge bs=1 seek=$((0x013F2BF0)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_merge bs=1 seek=$((0x013F1FA4)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_merge bs=1 seek=$((0x013F1230)) conv=notrunc
printf '\xC0\x03\x5F\xD6'                 | dd of=sublime_merge bs=1 seek=$((0x013EFFC8)) conv=notrunc

Sublime Text & Sublime Merge cracked by TNT ( macOS | Without License) ↓

You can check and download the latest version from here (please note that not all versions are corresponding to the cracked version)

DISABLE SYSTEM INTERGRITY PROTECTION (SIP)

sudo spctl --master-disable

DISABLE GATEKEEPER

Enable Allow apps downloaded from “Anywhere” in Security & Privacy

disable-gatekeeper

@maboloshi
Copy link
Author

@maboloshi that's a great screenshot. It show all the changes. What tool did you use for comparison?

@Destitute-Streetdwelling-Guttersnipe I use Beyond Compare for file comparison.

@Destitute-Streetdwelling-Guttersnipe
Copy link

@n6333373
Copy link

n6333373 commented Mar 1, 2024

  • The 1st and last changes are only for the certificate. It's optional.

I was wondering which one is better

  • Remove the invalid certificate
  • Or keep the invalid certificate

@AxleUnix
Copy link

AxleUnix commented Mar 4, 2024

Sublime Text Dev Channel, Build 4173
Win x64

cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "b555dd9841329a56e1044931825a92b7" || exit
echo 0007F818: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 00004D7E: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00004D97: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00080F44: C3                      | xxd -r - sublime_text.exe
echo 0007F4B9: C3                      | xxd -r - sublime_text.exe

Sublime Text Dev Channel, Build 4173
Linux

#!/bin/bash

# for Linux
cd /opt/sublime_text || exit
md5sum -c <<< "CFAA168CF236D9F4AE5586BBB42A0DFC  sublime_text" || exit
echo 0044D836: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0043765B: 90 90 90 90 90          | xxd -r - sublime_text
echo 00437673: 90 90 90 90 90          | xxd -r - sublime_text
echo 0044F5AE: C3                      | xxd -r - sublime_text
echo 0044D4FA: C3                      | xxd -r - sublime_text

@jomifepe
Copy link

jomifepe commented Mar 7, 2024

@urxi macOS is not working in either stable or dev on an M1 with Sonoma.

@bad1dea
Copy link

bad1dea commented Mar 12, 2024

Was wondering why I was getting so many weird notifications, did 4173 change that much - I can take a look at the windows and linux (x64) versions if there's an issue, ping me if there is and I can update accordingly.

@STSMHQ
Copy link

STSMHQ commented Apr 16, 2024

@AxleUnix Thank you very much for the Win64 Patch.

@HassanMirza01
Copy link

Sublime merge 2095 ?

@Fidenciano
Copy link

Please anyone has for Sublime merge 2096 linux?

@urxi
Copy link

urxi commented Apr 26, 2024

Sublime Merge (Stable Channel, Build 2096)

macOS (tested)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "F18216115A7A3CBFEFC5AF58AF87E0B1" || exit

echo 0002ADDD: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_merge
echo 0002CF60: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002CF7F: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002BBE5: C3                      | xxd -r - sublime_merge
echo 0002AAEE: C3                      | xxd -r - sublime_merge

echo 013D7C3C: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 013D9784: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D9798: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D88AC: C0 03 5F D6             | xxd -r - sublime_merge
echo 013D79C0: C0 03 5F D6             | xxd -r - sublime_merge

codesign --force --deep --sign - "/Applications/Sublime Merge.app"

Sublime Merge (Dev Channel, Build 2095)

macOS (tested)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "E4136CD1C8179FCC6E7B76C5F006513E" || exit

echo 0002ADE9: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002CF60: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002CF7F: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002BBE5: C3                      | xxd -r - sublime_merge
echo 0002AAFA: C3                      | xxd -r - sublime_merge

echo 013D7CBC: 20 23 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 013D97B8: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D97CC: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D88E0: C0 03 5F D6             | xxd -r - sublime_merge
echo 013D7A40: C0 03 5F D6             | xxd -r - sublime_merge

codesign --force --deep --sign - "/Applications/Sublime Merge.app"

@urxi
Copy link

urxi commented Apr 26, 2024

Sublime Text (Stable Channel, Build 4169)

macOS (tested)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "3AEA5F094739BC66C5A6C11A4EA08B58" || exit

echo 000A5AAB: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C7D5: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000C7ED: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A701D: C3                      | xxd -r - sublime_text
echo 000A56A6: C3                      | xxd -r - sublime_text

echo 0108A908: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 010118F4: 1F 20 03 D5             | xxd -r - sublime_text
echo 01011908: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108BB94: C0 03 5F D6             | xxd -r - sublime_text
echo 0108A588: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"

Sublime Text (Dev Channel, Build 4173)

macOS (tested)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "6B4A74308EBE8A7604EADCB17C86EF54" || exit

echo 000D5E63: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0004797F: 90 90 90 90 90          | xxd -r - sublime_text
echo 00047997: 90 90 90 90 90          | xxd -r - sublime_text
echo 000D724D: C3                      | xxd -r - sublime_text
echo 000D5AE4: C3                      | xxd -r - sublime_text

echo 00FF5468: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 00F86838: 1F 20 03 D5             | xxd -r - sublime_text
echo 00F8684C: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FF65DC: C0 03 5F D6             | xxd -r - sublime_text
echo 00FF512C: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"

@HassanMirza01
Copy link

Sublime Merge (Stable Channel, Build 2096)

macOS (tested)

Sublime Merge (Dev Channel, Build 2095)

macOS (tested)

can share patcher for mac? i have Linux, will try to adapt it for linux

@urxi
Copy link

urxi commented Apr 26, 2024

I don't have a patcher, it's just my brain and a decompiler ;-)

@HassanMirza01
Copy link

I don't have a patcher, it's just my brain and a decompiler ;-)

well, i'd request to do little tutorial then? or write steps? i tried hexed.it and offline hex editor but dont know why its hard to search for some patches whcih actually work, but are not showing in my search on hexed.it, i tried big endian, small endian, all possibilities, there are many many matches but i can't understand the tag on left of colon here ( 000D5E63: 48 C7 C0 00 00 00 00 C3 )

@Destitute-Streetdwelling-Guttersnipe
Copy link

@HassanMirza01
Copy link

@HassanMirza01 There's a patcher by @maboloshi at the beginning of this gist. There's also a link to the guide by @leogx9r at https://gist.github.com/JerryLokjianming/71dac05f27f8c96ad1c8941b88030451?permalink_comment_id=3762200#gistcomment-3762200

really appreciated this link, now i can patch any binary too, tbh, it was straight forward thing, replace given line and hex value at first tag/point with that value given next haha, appreciated <3

@wtask
Copy link

wtask commented Apr 26, 2024

Python patcher by @maboloshi is little bit outdated under Windows for SM 2096 :(

> python .\crack_st_sm.py .\sublime_merge.exe
[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Merge, Win64, Stable Channel, Build 2096
    MD5 Checksum -> B4E6827719B1B2FB7E3F6744DCDF0286

[!] No pattern found for "isValidLicense" ...

[!] No pattern found for "isValidLicense2" ...

[!] No pattern found for "isValidLicense_st" ...

[>] Found pattern for "invalidationFunction" at 0x1FC3E ...
[*] Rewrite data 'E8 5D 0A 1F 00' -> '90 90 90 90 90' ...


[>] Found pattern for "validationFunction" at 0x1FC57 ...
[*] Rewrite data 'E8 44 0A 1F 00' -> '90 90 90 90 90' ...


[!] No pattern found for "serverThread" ...

[!] No pattern found for "licenseNotifyThread" ...

[!] No pattern found for "licenseNotifyThread for 2082" ...

[!] No pattern found for "licenseNotifyThread for 2091" ...

@HassanMirza01
Copy link

Python patcher by @maboloshi is little bit outdated under Windows for SM 2096 :(

> python .\crack_st_sm.py .\sublime_merge.exe
[>] Attempting to autodetect input file ...
[*] Input file -> Sublime Merge, Win64, Stable Channel, Build 2096
    MD5 Checksum -> B4E6827719B1B2FB7E3F6744DCDF0286

[!] No pattern found for "isValidLicense" ...

[!] No pattern found for "isValidLicense2" ...

[!] No pattern found for "isValidLicense_st" ...

[>] Found pattern for "invalidationFunction" at 0x1FC3E ...
[*] Rewrite data 'E8 5D 0A 1F 00' -> '90 90 90 90 90' ...


[>] Found pattern for "validationFunction" at 0x1FC57 ...
[*] Rewrite data 'E8 44 0A 1F 00' -> '90 90 90 90 90' ...


[!] No pattern found for "serverThread" ...

[!] No pattern found for "licenseNotifyThread" ...

[!] No pattern found for "licenseNotifyThread for 2082" ...

[!] No pattern found for "licenseNotifyThread for 2091" ...

same on linux 2096, need to find hooks again

@EchoEngineer77
Copy link

EchoEngineer77 commented Apr 27, 2024

Sublime Merge Linux AMD64 Build 2096

cd /opt/sublime_merge || exit
md5sum -c <<< "afcbef3317f68eb631418474dfce4497  sublime_merge" || exit

echo 004A421C: 48 31 C0 C3 90 90 90 90 90 90 90 90 90 90 90 90 90 | xxd -r - sublime_merge
echo 004A6D9C: 90 90 90 90 90                                     | xxd -r - sublime_merge
echo 004A6DB5: 90 90 90 90 90                                     | xxd -r - sublime_merge
echo 004A5892: C3                                                 | xxd -r - sublime_merge
echo 004A3F86: C3                                                 | xxd -r - sublime_merge

@urxi
Copy link

urxi commented Apr 27, 2024

@EchoEngineer77: I'm not sure the last two offsets are correct -- I found other values.

Here are my patches for all current builds. Please let me know if the untested ones work or not.

Sublime Text (Stable Channel, Build 4169)

macOS (tested)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "3AEA5F094739BC66C5A6C11A4EA08B58" || exit

echo 000A5AAB: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C7D5: 90 90 90 90 90          | xxd -r - sublime_text
echo 0000C7ED: 90 90 90 90 90          | xxd -r - sublime_text
echo 000A701D: C3                      | xxd -r - sublime_text
echo 000A56A6: C3                      | xxd -r - sublime_text

echo 0108A908: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 010118F4: 1F 20 03 D5             | xxd -r - sublime_text
echo 01011908: 1F 20 03 D5             | xxd -r - sublime_text
echo 0108BB94: C0 03 5F D6             | xxd -r - sublime_text
echo 0108A588: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"
Linux (tested, thanks @leagueofperez)
cd /opt/sublime_text || exit
md5sum -c <<< "EA51D76D34A1EE908FD88CB8F0F351A6  sublime_text" || exit

echo 00446684: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0042D960: 90 90 90 90 90          | xxd -r - sublime_text
echo 0042D978: 90 90 90 90 90          | xxd -r - sublime_text
echo 004485AA: C3                      | xxd -r - sublime_text
echo 004462E8: C3                      | xxd -r - sublime_text
Windows (tested, thanks @leagueofperez)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "5B3C8CEA0FCA4323F0E8A994209042A8" || exit

echo 000A0DBC: 48 C7 C0 00 00 00 00 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 000A2B52: C3                      | xxd -r - sublime_text.exe
echo 000A0983: C3                      | xxd -r - sublime_text.exe

Sublime Text (Dev Channel, Build 4173)

macOS (tested)
cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "6B4A74308EBE8A7604EADCB17C86EF54" || exit

echo 000D5E63: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0004797F: 90 90 90 90 90          | xxd -r - sublime_text
echo 00047997: 90 90 90 90 90          | xxd -r - sublime_text
echo 000D724D: C3                      | xxd -r - sublime_text
echo 000D5AE4: C3                      | xxd -r - sublime_text

echo 00FF5468: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 00F86838: 1F 20 03 D5             | xxd -r - sublime_text
echo 00F8684C: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FF65DC: C0 03 5F D6             | xxd -r - sublime_text
echo 00FF512C: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"
Linux (untested)
cd /opt/sublime_text || exit
md5sum -c <<< "CFAA168CF236D9F4AE5586BBB42A0DFC  sublime_text" || exit

echo 0044D836: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0043765B: 90 90 90 90 90          | xxd -r - sublime_text
echo 00437673: 90 90 90 90 90          | xxd -r - sublime_text
echo 0044F5AE: C3                      | xxd -r - sublime_text
echo 0044D4FA: C3                      | xxd -r - sublime_text
Windows (untested)
cd /d "C:\Program Files\Sublime Text" || exit
certutil -hashfile sublime_text.exe md5 | find /i "B555DD9841329A56E1044931825A92B7" || exit

echo 0007F818: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 00004D7E: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00004D97: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00080F44: C3                      | xxd -r - sublime_text.exe
echo 0007F4B9: C3                      | xxd -r - sublime_text.exe

Sublime Merge (Stable Channel, Build 2096)

macOS (tested)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "F18216115A7A3CBFEFC5AF58AF87E0B1" || exit

echo 0002ADDD: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_merge
echo 0002CF60: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002CF7F: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002BBE5: C3                      | xxd -r - sublime_merge
echo 0002AAEE: C3                      | xxd -r - sublime_merge

echo 013D7C3C: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 013D9784: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D9798: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D88AC: C0 03 5F D6             | xxd -r - sublime_merge
echo 013D79C0: C0 03 5F D6             | xxd -r - sublime_merge

codesign --force --deep --sign - "/Applications/Sublime Merge.app"
Linux (tested, thanks @leagueofperez)
cd /opt/sublime_merge || exit
md5sum -c <<< "AFCBEF3317F68EB631418474DFCE4497  sublime_merge" || exit

echo 004A421C: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_merge
echo 004A6D9C: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004A6DB5: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004A5892: C3                      | xxd -r - sublime_merge
echo 004A3F86: C3                      | xxd -r - sublime_merge
Windows (tested, thanks @wtask & @leagueofperez)
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "B4E6827719B1B2FB7E3F6744DCDF0286" || exit

echo 0001d6b4: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_merge.exe
echo 0001fc3e: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0001fc57: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0001e77d: C3                      | xxd -r - sublime_merge.exe
echo 0001d3af: C3                      | xxd -r - sublime_merge.exe

Sublime Merge (Dev Channel, Build 2095)

macOS (tested)
cd "/Applications/Sublime Merge.app/Contents/MacOS/" || exit
md5 -q sublime_merge | grep -i "E4136CD1C8179FCC6E7B76C5F006513E" || exit

echo 0002ADE9: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 0002CF60: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002CF7F: 90 90 90 90 90          | xxd -r - sublime_merge
echo 0002BBE5: C3                      | xxd -r - sublime_merge
echo 0002AAFA: C3                      | xxd -r - sublime_merge

echo 013D7CBC: 20 23 80 D2 C0 03 5F D6 | xxd -r - sublime_merge
echo 013D97B8: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D97CC: 1F 20 03 D5             | xxd -r - sublime_merge
echo 013D88E0: C0 03 5F D6             | xxd -r - sublime_merge
echo 013D7A40: C0 03 5F D6             | xxd -r - sublime_merge

codesign --force --deep --sign - "/Applications/Sublime Merge.app"
Linux (untested)
cd /opt/sublime_merge || exit
md5sum -c <<< "DD9C39264E7ADD0CF05D0A36725222B2  sublime_merge" || exit

echo 004A41B8: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge
echo 004A6DCA: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004A6DE3: 90 90 90 90 90          | xxd -r - sublime_merge
echo 004A58BE: C3                      | xxd -r - sublime_merge
echo 004A3F22: C3                      | xxd -r - sublime_merge
Windows (tested, thanks @StarLeet)
cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "71C74D6B6603246705F947A4F52FFCF6" || exit

echo 0001D6B0: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 0001FC2C: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0001FC45: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0001E76D: C3                      | xxd -r - sublime_merge.exe
echo 0001D3AB: C3                      | xxd -r - sublime_merge.exe

@wtask
Copy link

wtask commented Apr 27, 2024

@urxi Thank you. SM 2096, Windows patch works.

@HassanMirza01
Copy link

@urxi for me @EchoEngineer77's patch worked fine on SM 2096

@StarLeet
Copy link

@EchoEngineer77: I'm not sure the last two offsets are correct -- I found other values.

Here are my patches for all current builds. Please let me know if the untested ones work or not.

Sublime Text (Stable Channel, Build 4169)

macOS (tested)
Linux (untested)
Windows (untested)

Sublime Text (Dev Channel, Build 4173)

macOS (tested)
Linux (untested)
Windows (untested)

Sublime Merge (Stable Channel, Build 2096)

macOS (tested)
Linux (untested)
Windows (untested)

Sublime Merge (Dev Channel, Build 2095)

macOS (tested)
Linux (untested)
Windows (untested)

cd /d "C:\Program Files\Sublime Merge" || exit
certutil -hashfile sublime_merge.exe md5 | find /i "71C74D6B6603246705F947A4F52FFCF6" || exit

echo 0001D6B0: 48 C7 C0 19 01 00 00 C3 | xxd -r - sublime_merge.exe
echo 0001FC2C: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0001FC45: 90 90 90 90 90          | xxd -r - sublime_merge.exe
echo 0001E76D: C3                      | xxd -r - sublime_merge.exe
echo 0001D3AB: C3                      | xxd -r - sublime_merge.exe

SM2095 works on win10

@leagueofperez
Copy link

leagueofperez commented Apr 27, 2024

@EchoEngineer77: I'm not sure the last two offsets are correct -- I found other values.

Here are my patches for all current builds. Please let me know if the untested ones work or not.

Sublime Text (Stable Channel, Build 4169)

macOS (tested)
Linux (untested)
Windows (untested)

Sublime Text (Dev Channel, Build 4173)

macOS (tested)
Linux (untested)
Windows (untested)

Sublime Merge (Stable Channel, Build 2096)

macOS (tested)
Linux (untested)
Windows (tested, thanks @wtask)

Sublime Merge (Dev Channel, Build 2095)

macOS (tested)
Linux (untested)
Windows (tested, thanks @StarLeet)

Tested and working:

  • Windows:
    • Sublime Text 4169
    • Sublime Merge 2096
  • Linux:
    • Sublime Text 4169
    • Sublime Merge 2096

@Destitute-Streetdwelling-Guttersnipe
Copy link

@AxleUnix
Copy link

AxleUnix commented May 1, 2024

Sublime Text (Dev Channel, Build 4174)

@echo off
:: for Win64, ST4B4174

cd /d ".\Sublime Text" || exit
md5sum sublime_text.exe | find /i "3de7ca7a5f5ffc48e4ab8d2d8cc23f20" || exit

echo 0007F9A4: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 00004D7E: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00004D97: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 0007F645: C3                      | xxd -r - sublime_text.exe
echo 000810BA: C3                      | xxd -r - sublime_text.exe

Sublime Text (Dev Channel, Build 4174)

# for Linux64, ST4B4174
md5sum -c <<< "885bfa13309dfaf31dfe5fbbb8ab6d47  sublime_text" || exit

echo 00449984: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0043373B: 90 90 90 90 90          | xxd -r - sublime_text
echo 00433753: 90 90 90 90 90          | xxd -r - sublime_text
echo 00449648: C3                      | xxd -r - sublime_text
echo 0044B6F6: C3                      | xxd -r - sublime_text

@StarLeet
Copy link

StarLeet commented May 1, 2024

Sublime Text (Dev Channel, Build 4174)

@echo off
:: for Win64, ST4B4174

cd /d ".\Sublime Text" || exit
md5sum sublime_text.exe | find /i "3de7ca7a5f5ffc48e4ab8d2d8cc23f20" || exit

echo 0007F9A4: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text.exe
echo 00004D7E: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 00004D97: 90 90 90 90 90          | xxd -r - sublime_text.exe
echo 0007F645: C3                      | xxd -r - sublime_text.exe
echo 000810BA: C3                      | xxd -r - sublime_text.exe

works on win10

@AxleUnix
Copy link

AxleUnix commented May 1, 2024

works on win10
Of course, otherwise I wouldn't be posting this.

@urxi
Copy link

urxi commented May 3, 2024

Here's the patch for the macOS version of ST 4174. Thanks to @Destitute-Streetdwelling-Guttersnipe for the B8 trick!

Clever tricks to improve the ARM64 part are also welcome :)

cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "99F7F9C8FE8AF673697189D456CC3287" || exit

echo 0004793F: B8 | xxd -r - sublime_text
echo 00047957: B8 | xxd -r - sublime_text
echo 000D5A30: C3 | xxd -r - sublime_text
echo 000D5DAF: C3 | xxd -r - sublime_text
echo 000D7199: C3 | xxd -r - sublime_text

echo 00F85AD8: 1F 20 03 D5             | xxd -r - sublime_text
echo 00F85AEC: 1F 20 03 D5             | xxd -r - sublime_text
echo 00FF43C0: C0 03 5F D6             | xxd -r - sublime_text
echo 00FF46FC: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 00FF5870: C0 03 5F D6             | xxd -r - sublime_text

codesign --force --deep --sign - "/Applications/Sublime Text.app"

@Destitute-Streetdwelling-Guttersnipe
Copy link

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