You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting LD_PRELOAD as in gdb.debug(... ,env={'LD_PRELOAD' : './some.so'}) makes gdbserver itself use that some.so library. Currently I see no mechanism in pwntools allowing specifying env only for the debugged process.
It's been kind of fixed in #1083, yet gdbserver can give different outputs than those starting with "ERROR:".
--wrapper option could solve that problem. gdbserver --wrapper env 'LD_PRELOAD=./libefence.so' -- :1234 ./test-program gdbserver manual
The text was updated successfully, but these errors were encountered:
On Wed, May 8, 2019 at 2:31 PM Jan Mazur ***@***.***> wrote:
Setting LD_PRELOAD as in gdb.debug(... ,env={'LD_PRELOAD' : './some.so'})
makes gdbserver itself use that some.so library. Currently I see no
mechanism in pwntools allowing specifying env only for the debugged process.
It's been kind of fixed in #1083
<#1083>, yet gdbserver can
give different outputs than those starting with "ERROR:".
--wrapper option could solve that problem.
gdbserver --wrapper env 'LD_PRELOAD=./libefence.so' -- :1234 ./test-program
gdbserver manual <http://man7.org/linux/man-pages/man1/gdbserver.1.html>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1307>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAA3IGGKLB7TEPNNGIVFVPTPUMTC7ANCNFSM4HLUSOJA>
.
On follow-up, I'm not sure the best way to handle this. The current way we do this is to set the environment on gdbserver which is inherited by the child binary (which you pointed out). This causes issues on LD_PRELOAD, specifically.
We might want to special-case tricky environment variables like this and PATH. It looks like we can do the following:
gdbserver --wrapper env LD_PRELOAD=libtest.so --
I can't contribute to Pwntools anymore (employer), but if you submit a PR I can merge it.
Setting
LD_PRELOAD
as ingdb.debug(... ,env={'LD_PRELOAD' : './some.so'})
makes gdbserver itself use thatsome.so
library. Currently I see no mechanism in pwntools allowing specifying env only for the debugged process.It's been kind of fixed in #1083, yet gdbserver can give different outputs than those starting with "ERROR:".
--wrapper
option could solve that problem.gdbserver --wrapper env 'LD_PRELOAD=./libefence.so' -- :1234 ./test-program
gdbserver manual
The text was updated successfully, but these errors were encountered: