Skip to content

eisenxp/macos-golink-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

macos-golink-wrapper

solution to "syscall.Mprotect panic: permission denied" in Golang on macOS Catalina 10.15.x when using gomonkey or gohook

How it works

Change the max_prot value to 0x7 after linking.

refer to the question: https://stackoverflow.com/questions/60654834/using-mprotect-to-make-text-segment-writable-on-macos

Usage

Assuming Go is installed in /opt/go

  1. Navigate to Path: /opt/go/pkg/tool/darwin_amd64
  2. Rename file link to original_link
  3. Download link wrapper for replacement
  4. Make sure link wrapper is executable: chmod +x link
  5. Enjoy it

Thanks

Thanks to Elliott Darfink for sharing.

License

MIT

About

solution to "syscall.Mprotect panic: permission denied" on macOS Catalina 10.15.x

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages