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

Cannot inject in launchd #2

Open
rtibdewal opened this issue Oct 12, 2011 · 3 comments
Open

Cannot inject in launchd #2

rtibdewal opened this issue Oct 12, 2011 · 3 comments

Comments

@rtibdewal
Copy link

Hello Comex,

I am new to git so I emailed you directly. Sorry, I was not aware of process.

I had few observations. Thought I should share it with you. This injection system is working nice with all applications (like, itunes, firefox, skype, finder, dock.. etc) but it fails to inject in "launchd" process. Another observation is if I run injection on terminal in bash, it cannot inject in bash and if I run it in sh, it cannot inject in sh.

While debugging, it appears to fail in following line when during start of 3rd loop for exception.

    TRY(mach_msg_overwrite(NULL, MACH_RCV_MSG, 0, sizeof(msg), exc, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL, (void *) &msg, sizeof(msg)));

Thank you,
Rahul

@comex
Copy link
Owner

comex commented Oct 13, 2011

What is the error code?

@rtibdewal
Copy link
Author

This may sound odd.

From last 2 days I was getting sigtrap error and sometimes call never returned from inject command and if I debuged EXC_BREAKPOINT (SIGTRAP) mostly around

TRY(mach_msg_overwrite(NULL, MACH_RCV_MSG, 0, sizeof(msg), exc, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL, (void *) &msg, sizeof(msg)));

Where as today when I tried to inject in launchd so that I can give you the error codes, it worked.

May be its something related to environment. Just for your information I was using 10.6 OS X Server in VMware Fussion.

If you wish you can mark this issue closed and if I can reproduce the exact environment, I will open a new issue and will post it with complete error codes.

Thank you,
Rahul

@rtibdewal
Copy link
Author

Hi there,

I was able to reproduce above issue if I link against frameworks like Carbon, CoreFoundation or any of them. And then inject in Launchd.

Injection fails and control does not return back to you. Thus there is no error 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