Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Pen-Test
[Top] [All Lists]

Re: Howto strace apache as nobody/apache user?

Subject: Re: Howto strace apache as nobody/apache user?
Date: Thu, 1 Jun 2006 02:02:58 +0200 (CEST)
Hello,

into many process after leaving its root credentials, usually being
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= calling some variant of setuid()/setgid()

Is this a security feature of apache or what?

No, this is not Apache-specific. At least on Linux, calling set[ug]id() turns off the so-called "dumpable" flag for the process. As a regular user, you can only ptrace (that's the syscall used by strace) processes which have this flag turned on (naturally, you also need to have the same [ug]id as the process you're wanting to trace). If you are root or have the CAP_SYS_PTRACE capability, these restrictions don't apply.


Another example -- if you're using an OpenSSH sshd with privilege separation turned on, you should see two sshd processes associated with every connection; one of them running as root, the other one as the user. Still, you can't trace neither the first, nor the second because of aforementioned criteria.

Peter

--
[Name] Peter Kosinar   [Quote] 2B | ~2B = exp(i*PI)   [ICQ] 134813278



------------------------------------------------------------------------------
This List Sponsored by: Cenzic

Concerned about Web Application Security? Why not go with the #1 solution - Cenzic, the only one to win the Analyst's Choice Award from eWeek. As attacks through web applications continue to rise, you need to proactively protect your applications from hackers. Cenzic has the most comprehensive solutions to meet your application security penetration testing and vulnerability management needs. You have an option to go with a managed service (Cenzic ClickToSecure) or an enterprise software (Cenzic Hailstorm). Download FREE whitepaper on how a managed service can help you: http://www.cenzic.com/news_events/wpappsec.php And, now for a limited time we can do a FREE audit for you to confirm your results from other product. Contact us at request@cenzic.com for details.
------------------------------------------------------------------------------


<Prev in Thread] Current Thread [Next in Thread>
  • Re: Howto strace apache as nobody/apache user?, Peter Kosinar <=