Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing instructions for using austin with sudo through vs code? #55

Open
zestysoft opened this issue Dec 2, 2023 · 3 comments
Open

Comments

@zestysoft
Copy link

zestysoft commented Dec 2, 2023

Heya, I've been trying to get this working per the instructions, but the error I keep getting back from the terminal is exit 37 which I know to mean 'insufficient permissions'.

I've created an appropriate /private/etc/sudoers.d file and tested sudo austin from the terminal to make sure it runs without a password prompt.

However when running a task within vs code (running as the user in the sudoers.d file), I still get that exit 37 issue. The only thing I can think of is that the vs code extension isn't executing austin with sudo? Is this something that must exist in the tasks.json file?

Also, unrelated, I could not get the recommended sudoers line to work in MacOS Sonoma. I had to replace the (root) part with (ALL). sudo would refuse to recognize it for whatever reason. (sudo -l -l would not display the entry as existing at all, even when sudo visudo -c thatsudoersfile returned a clean bill of health )

@zestysoft
Copy link
Author

zestysoft commented Dec 2, 2023

Okay, I found this: https://github.com/P403n1x87/austin#on-macos-1

I'm using poetry already with the .venv existing within the project folder, and I even went so far as to remove the code signature from the python executable, however I still have the same results.

Now that I have a better understanding of what's going on here, I think I may be running into the same problem I've been having using IDA Pro. There are a lot of parallels -- their workaround were similar to yours -- run sudo on the debugger, etc etc however I could not debug the app.

It turns out that the app was using a dependent library that was using the hardened runtime. No amount of codesigning trickery worked on the main executable. Hopefully that's not what's happening here.

@zestysoft
Copy link
Author

Well, if I take the command line I see in the terminal in vs code and verbatim type it out in iterm it works with sudo, so I don't think the OS is getting in the way.

@P403n1x87
Copy link
Owner

@zestysoft I'm currently unable to test this on Sonoma. However, on other versions of MacOS I don't seem to have any problems running austin as a task when it is added to the sudoers. I think this is a step that you have also tried yourself, based I what I've read from your comments. Austin itself does not depend on anything else other than the standard C library and the OS API. Perhaps there are some new security policies on the latest MacOS version that prevent spawning certain type of processes from something like VS Code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants