From: Tejun Heo <tj@kernel.org>
To: Andy Lutomirski <luto@MIT.EDU>
Cc: Matt Helsley <matthltc@us.ibm.com>,
Pavel Emelyanov <xemul@parallels.com>,
Nathan Lynch <ntl@pobox.com>, Oren Laadan <orenl@cs.columbia.edu>,
Daniel Lezcano <dlezcano@fr.ibm.com>,
"James E.J. Bottomley" <JBottomley@parallels.com>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [EXAMPLE CODE] Parasite thread injection and TCP connection hijacking
Date: Mon, 8 Aug 2011 12:20:45 +0200 [thread overview]
Message-ID: <20110808102045.GJ23937@htj.dyndns.org> (raw)
In-Reply-To: <20110806130037.GD23937@htj.dyndns.org>
On Sat, Aug 06, 2011 at 03:00:37PM +0200, Tejun Heo wrote:
> Hello,
>
> On Sat, Aug 06, 2011 at 08:45:28AM -0400, Andy Lutomirski wrote:
> > > 2. Decide where to inject the foreign code and save the original code
> > > with PTRACE_PEEKDATA. Tracer can poke any mapped area regardless
> > > of protection flags but it can't add execution permission to the
> > > code, so it needs to choose memory area which already has X flag
> > > set. The example code uses the page the %rip is in.
> >
> > If the process is executing from the vsyscall page, then you'll
> > probably fail. (Admittedly, this is rather unlikely, given that the
> > vsyscalls are now exactly one instruction.) Presumably you also
> > fail if executing from a read-only MAP_SHARED mapping.
>
> Heh, yeah, I originally thought about scanning /proc/PID/maps to look
> for the page to use but was lazy and just used %rip. I think that
> should work. I'll note the problem in README.
Okay, updated README.
http://code.google.com/p/ptrace-parasite/source/browse/README
Thanks.
--
tejun
next prev parent reply other threads:[~2011-08-08 10:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-06 12:12 [EXAMPLE CODE] Parasite thread injection and TCP connection hijacking Tejun Heo
2011-08-06 12:45 ` Andy Lutomirski
2011-08-06 13:00 ` Tejun Heo
2011-08-06 13:15 ` Andrew Lutomirski
2011-08-06 13:20 ` Tejun Heo
2011-08-08 10:20 ` Tejun Heo [this message]
2011-10-30 4:48 ` hiberante hangs TCP " David Fries
2011-10-30 20:16 ` Tejun Heo
2011-10-30 20:43 ` David Fries
2011-11-02 9:44 ` MyungJoo Ham
2011-11-02 15:10 ` Tejun Heo
2012-02-17 19:28 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110808102045.GJ23937@htj.dyndns.org \
--to=tj@kernel.org \
--cc=JBottomley@parallels.com \
--cc=davem@davemloft.net \
--cc=dlezcano@fr.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@MIT.EDU \
--cc=matthltc@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=ntl@pobox.com \
--cc=orenl@cs.columbia.edu \
--cc=xemul@parallels.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).