* Re: absolute path of a process (as the credential of a process)
[not found] <3C3DB937.A7E36933@nbnet.nb.ca>
@ 2002-01-10 20:56 ` Chris Wright
0 siblings, 0 replies; only message in thread
From: Chris Wright @ 2002-01-10 20:56 UTC (permalink / raw)
To: Senhua Tao
Cc: Albert D. Cahalan, H. Peter Anvin, Manfred Spraul, linux-kernel
* 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-01-10 20:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3C3DB937.A7E36933@nbnet.nb.ca>
2002-01-10 20:56 ` absolute path of a process (as the credential of a process) Chris Wright
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®