Create new application thread and make it start at a specific function

28 views
Skip to first unread message

Mihai Enache

unread,
Mar 19, 2022, 3:01:53 PM3/19/22
to DynamoRIO Users
Hi! I'm trying to create a new application thread from within my client that should start from one of the functions that I identified in the binary. I have the PC of that function and I assign it to a function pointer which I then pass to the clone syscall to initialise the new thread. However, the new thread crashes at the specified PC (Tool internal crash at PC <here is the PC I passed to clone>).

I'm not sure how to debug this further. Am I on the right track or is this the wrong approach? Any advice would be appreciated.

Thank you.

Derek Bruening

unread,
Mar 21, 2022, 11:38:41 PM3/21/22
to Mihai Enache, DynamoRIO Users
First, the clone syscall does not take a function pointer argument: that's a separate thing in the libc wrapper.  Second, how is this syscall being invoked?

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/8dfaab81-68be-4d61-962e-b0a32b1c0cedn%40googlegroups.com.

Mihai Enache

unread,
Apr 18, 2022, 5:39:22 PM4/18/22
to DynamoRIO Users
Thanks for your comment Derek and apologies for my delayed reply. When I wrote the question the clone libcwrapper was called from within a clean call, which I believe was wrong. I managed to fix it by inserting the call to clone as an app instruction and now I'm able to create the additional thread as required initially.
Reply all
Reply to author
Forward
0 new messages