From: Chris Wright <chris@wirex.com>
To: Senhua Tao <stao@nbnet.nb.ca>
Cc: "Albert D. Cahalan" <acahalan@cs.uml.edu>,
"H. Peter Anvin" <hpa@zytor.com>,
Manfred Spraul <manfred@colorfullife.com>,
linux-kernel@vger.kernel.org
Subject: Re: absolute path of a process (as the credential of a process)
Date: Thu, 10 Jan 2002 12:56:48 -0800 [thread overview]
Message-ID: <20020110125648.A1412@figure1.int.wirex.com> (raw)
In-Reply-To: <3C3DB937.A7E36933@nbnet.nb.ca>
In-Reply-To: <3C3DB937.A7E36933@nbnet.nb.ca>; from stao@nbnet.nb.ca on Thu, Jan 10, 2002 at 11:54:31AM -0400
* Senhua Tao (stao@nbnet.nb.ca) wrote:
<some details snipped>
> The ip filter checking can be done in sys_connect(). That is the problem
> that I am having. I try to get the absolute path of the current process
> which calls connect() to against the entries in the config file (they
> also have to be translated to absolute path) and get lost.
if you look at the code in fs/proc/base.c::proc_exe_link() you can
see how the absolute pathname is gathered (note: only on execve is the
VM_EXECUTABLE flag set). basically you need the dentry and vfsmount
of the file. btw, you are only stopping tcp and bound udp if you hook
in sys_connect, perhaps you should consider the sendmsg family as well.
also, if the trojan is a server you have not protected listen/accept or
resvmsg so sys_socket may be the best spot to watch.
also, all of this can be done using the LSM framework. (see lsm.immunix.org
for patches).
cheers,
-chris
parent reply other threads:[~2002-01-10 20:53 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <3C3DB937.A7E36933@nbnet.nb.ca>]
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=20020110125648.A1412@figure1.int.wirex.com \
--to=chris@wirex.com \
--cc=acahalan@cs.uml.edu \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=stao@nbnet.nb.ca \
/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
all inboxes | Powered by JetHome®