Krisp AI AMD fix, updated for all versions

tomnic

Member
AMD OS X Member
Joined
Nov 1, 2020
Messages
42
Schermata 2021-12-07 alle 22.38.35.png

Just replace the main executable in /Applications/krisp.app/Contents/MacOS/krisp with the patched one. Forced the program to detect our AMD cpu as a Genuine Intel, no other tricks involved.

Then codesign again the executable:

sudo codesign --force --deep --sign - /Applications/krisp.app/Contents/MacOS/krisp
 

Attachments

  • krisp.zip
    44.1 MB · Views: 33
Last edited:

x86

New member
AMD OS X Member
Joined
Jun 25, 2020
Messages
5
Amazing work, do you mind me asking, what exactly did you patch out?
 
Last edited:

Noxis

New member
AMD OS X Member
Joined
Dec 26, 2021
Messages
1
Thanks, this worked! I assume that updating to another version later on would override this patch. Can you share how the patch is accomplished?
 

tomnic

Member
AMD OS X Member
Joined
Nov 1, 2020
Messages
42
In the meantime 1.31.22 patched krisp executable is here
 

Attachments

  • krisp.zip
    44.3 MB · Views: 15
  • Like
Reactions: x86

x86

New member
AMD OS X Member
Joined
Jun 25, 2020
Messages
5
In the meantime 1.31.22 patched krisp executable is here
They must've changed something as now with the patched binary on 1.31.22, I go into a login loop. It repeatedly asks for a login.
 

tomnic

Member
AMD OS X Member
Joined
Nov 1, 2020
Messages
42
True, need to study the new executable, more cpu checks inside.
 

tomnic

Member
AMD OS X Member
Joined
Nov 1, 2020
Messages
42
As a workaround you can use the old executable: it works perfectly and the version number remains the latest, 1.31.22
 
  • Like
Reactions: x86

x86

New member
AMD OS X Member
Joined
Jun 25, 2020
Messages
5
@tomnic Would you be able to update the patched binary to the latest build of Krisp?
 

tomnic

Member
AMD OS X Member
Joined
Nov 1, 2020
Messages
42
Use these patched binaries...

/Applications/krisp.app/Contents/Frameworks/libtbb.dylib
/Applications/krisp.app/Contents/Frameworks/libtbbmalloc.dylib
/Applications/krisp.app/Contents/MacOS/krisp


Then issue these commands:

sudo codesign --force --deep --sign - /Applications/krisp.app/Contents/Frameworks/libtbb.dylib
sudo codesign --force --deep --sign - /Applications/krisp.app/Contents/Frameworks/libtbbmalloc.dylib
sudo codesign --force --deep --sign - /Applications/krisp.app/Contents/MacOS/krisp
 

Attachments

  • libtbbmalloc.dylib.zip
    120.6 KB · Views: 12
  • libtbb.dylib.zip
    210.9 KB · Views: 12
  • krisp.zip
    44.1 MB · Views: 15

charchar

New member
AMD OS X Member
Joined
May 11, 2022
Messages
6
any chance we could get this for the latest krisp version?

tried patching with amdfriend, but couldn't even get the app to open
 

tomnic

Member
AMD OS X Member
Joined
Nov 1, 2020
Messages
42
Screen Shot 2022-06-14 at 22.40.03.pngThe problem with the latest Krisp versions is that no proper entitlements are copied after forcefully recodesigning the app.

This is the way to run it anyway:

Code:
sudo amdfriend --in-place --directories /Applications/krisp.app

...so the app will be patched but codesign not replaced (if you replace it with the --sign option in AMDFriend the app won't make you logging in because of special entitlements to access the keychain going lost).

At this stage if you directly run the app you'll get the classic invalid codesign error. Let's go on...

Now open terminal and write:

Code:
lldb /Applications/krisp.app

After the app gets preloaded issue this command:

Code:
run

Give your admin password when asked and everything will work fine.

Probably you'll need at least Xcode command tools installed.
 
Last edited:

charchar

New member
AMD OS X Member
Joined
May 11, 2022
Messages
6
Thanks, I'm just seeing your reply.

The first command ran without issues. However when executing:

Code:
lldb /Applications/krisp.app

I get the following response:

Code:
(lldb) target create "/Applications/krisp.app"
error: more than one platform supports this executable (host, remote-macosx), specify an architecture to disambiguate

Not sure, how to proceed after this.


UPDATE:

Tried setting --arch flag.

Code:
lldb /Applications/krisp.app --arch x86_64

And looked like it worked, got this response:

Code:
(lldb) target create --arch=x86_64 "/Applications/krisp.app"
Current executable set to '/Applications/krisp.app' (x86_64).
(lldb)

After that, executed:

Code:
run

And received this error:

Code:
error: process exited with status -1 (attach failed (Not allowed to attach to process.  Look in the console messages (Console.app), near the debugserver entries, when the attach failed.  The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.))
(lldb)
 
Last edited:

tomnic

Member
AMD OS X Member
Joined
Nov 1, 2020
Messages
42
error: process exited with status -1 (attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed.

Can you report the specified log?
 

charchar

New member
AMD OS X Member
Joined
May 11, 2022
Messages
6
Sure, these are the logs around the error, i'll attach a couple, not sure which one contains the necessary info.

These following are process=debugserver
Code:
debugserver-@(#)PROGRAM:LLDB  PROJECT:lldb-1316.0.9.46
 for x86_64.


Got a connection, waiting for process information for launching or attaching.


[LaunchAttach] START 33245 vAttach to pid 33244


[LaunchAttach] (33245) about to task_for_pid(33244)

Then this one is process=kernel (AppleMobileFileIntegrity)
Code:
macOSTaskPolicy: (com.apple.debugserver) may not get the task control port of (krisp) (pid: 33244): (krisp) is hardened, (krisp) doesn't have get-task-allow, (com.apple.debugserver) is a declared debugger(com.apple.debugserver) is not a declared read-only debugger

The a couple more process=debugserver
Code:
error: [LaunchAttach] MachTask::TaskPortForProcessID task_for_pid(33244) failed: ::task_for_pid ( target_tport = 0x0203, pid = 33244, &task ) => err = 0x00000005 ((os/kern) failure)

1 +0.000000 sec [81dd/0103]: error: ::task_for_pid ( target_tport = 0x0203, pid = 33244, &task ) => err = 0x00000005 ((os/kern) failure) err = ::task_for_pid ( target_tport = 0x0203, pid = 33244, &task ) => err = 0x00000005 ((os/kern) failure) (0x00000005
 

tomnic

Member
AMD OS X Member
Joined
Nov 1, 2020
Messages
42
Screen Shot 2022-08-28 at 15.38.27.pngTry to enable Developer Tools tab and add Krisp.app

Code:
spctl developer-mode enable-terminal
 

charchar

New member
AMD OS X Member
Joined
May 11, 2022
Messages
6
Sadly, that did not work.

Enabled the following in the Developer Tools tab:

1661871453313.png

And also ran:
Code:
spctl developer-mode enable-terminal

After this, restarted the machine and ran:
Code:
sudo amdfriend --in-place --directories /Applications/krisp.app
lldb /Applications/krisp.app
run
But kept getting the same error.



PS: Also tried enabling
Code:
sudo DevToolsSecurity -enable

Restarted, ran the steps from the beginning but still the same error.
 

tomnic

Member
AMD OS X Member
Joined
Nov 1, 2020
Messages
42
Try to disable SIP and gatekeeper, then try this command:

Code:
codesign -d -vvv --entitlements :- /Applications/krisp.app

and post your output, mine is:

Code:
Executable=/Applications/krisp.app/Contents/MacOS/krisp
Identifier=ai.krisp.krispMac
Format=app bundle with Mach-O universal (x86_64 arm64)
CodeDirectory v=20500 size=683197 flags=0x10000(runtime) hashes=21339+7 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha256=24c122eb622c42dc5b2be2b395aea705ca603b1e
CandidateCDHashFull sha256=24c122eb622c42dc5b2be2b395aea705ca603b1e23f13914c3d6a0ec6851ee7f
Hash choices=sha256
CMSDigest=24c122eb622c42dc5b2be2b395aea705ca603b1e23f13914c3d6a0ec6851ee7f
CMSDigestType=2
CDHash=24c122eb622c42dc5b2be2b395aea705ca603b1e
Signature size=8997
Authority=Developer ID Application: Krisp Technologies, Inc. (U5R26XM5Z2)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=17 Aug 2022 at 13:23:24
Info.plist entries=31
TeamIdentifier=U5R26XM5Z2
Runtime Version=12.3.0
Sealed Resources version=2 rules=13 files=136
Internal requirements count=1 size=180
Warning: Specifying ':' in the path is deprecated and will not work in a future release
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>com.apple.application-identifier</key><string>U5R26XM5Z2.ai.krisp.krispMac</string><key>com.apple.developer.team-identifier</key><string>U5R26XM5Z2</string><key>com.apple.security.cs.allow-unsigned-executable-memory</key><true/><key>com.apple.security.device.audio-input</key><true/><key>com.apple.security.device.camera</key><true/><key>keychain-access-groups</key><array><string>U5R26XM5Z2.ai.krisp.krispMac.token</string></array></dict></plist>
 

charchar

New member
AMD OS X Member
Joined
May 11, 2022
Messages
6
Alright, disabled SIP (from recovery mode) then disabled gatekeeper.

Ran the codesign command and got the output:
Code:
Executable=/Applications/krisp.app/Contents/MacOS/krisp
Identifier=ai.krisp.krispMac
Format=app bundle with Mach-O universal (x86_64 arm64)
CodeDirectory v=20500 size=680797 flags=0x10000(runtime) hashes=21264+7 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha256=262b0e9739723eeeef0485e80af4c62f68cd036f
CandidateCDHashFull sha256=262b0e9739723eeeef0485e80af4c62f68cd036f99d6f7b1d89d290f0749c0ab
Hash choices=sha256
CMSDigest=262b0e9739723eeeef0485e80af4c62f68cd036f99d6f7b1d89d290f0749c0ab
CMSDigestType=2
CDHash=262b0e9739723eeeef0485e80af4c62f68cd036f
Signature size=8999
Authority=Developer ID Application: Krisp Technologies, Inc. (U5R26XM5Z2)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=15 Jul 2022 5:59:19
Info.plist entries=31
TeamIdentifier=U5R26XM5Z2
Runtime Version=12.3.0
Sealed Resources version=2 rules=13 files=132
Internal requirements count=1 size=180
Warning: Specifying ':' in the path is deprecated and will not work in a future release
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>com.apple.security.device.camera</key><true/><key>com.apple.security.device.audio-input</key><true/><key>com.apple.developer.team-identifier</key><string>U5R26XM5Z2</string><key>com.apple.security.cs.allow-unsigned-executable-memory</key><true/><key>keychain-access-groups</key><array><string>U5R26XM5Z2.ai.krisp.krispMac.token</string></array><key>com.apple.application-identifier</key><string>U5R26XM5Z2.ai.krisp.krispMac</string></dict></plist>%
 
Top Bottom
  AdBlock Detected
Sure, ad-blocking software does a great job at blocking ads, but it also blocks some useful and important features of our website. For the best possible site experience please take a moment to disable your AdBlocker.