public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: pageexec@freemail.hu
To: linux-kernel@vger.kernel.org
Cc: Arjan van de Ven <arjan@infradead.org>,
	Peter Busser <busser@m-privacy.de>,
	"Theodore Ts'o" <tytso@mit.edu>
Subject: Re: Sabotaged PaXtest (was: Re: Patch 4/6  randomize the stack pointer)
Date: Wed, 02 Feb 2005 22:18:27 +1000	[thread overview]
Message-ID: <420151B3.27974.D9F79C@localhost> (raw)
In-Reply-To: <20050202001549.GA17689@thunk.org>

> Umm, so exactly how many applications use multithreading (or otherwise
> trigger the GLIBC mprotect call), and how many applications use nested
> functions (which is not ANSI C compliant, and as a result, very rare)?

i think you're missing the whole point of paxtest. it's not about what
glibc et al. do or don't do. it's about what an exploit can do (by
virtue of forcing the exploited application to do something). if your
line of thinking was correct, then why didn't you also object to the
fact that the paxtest applications overflow their own stack/heap/etc?
or that they put 'shellcode' onto the stack/heap/etc and invoke it by
abusing a memory corrupting bug? surely no sane real-life application
does any of this.

so once again, let me explain what paxtest does. it tests PaX for its
claims. since PaX claims to be an intrusion prevention system, paxtest
tries to simulate said intrusions (in particular, we're talking about
exploiting memory corruption bugs). the stress is on 'simulate'. none
of the paxtest applications are full blown exploits. nor do they need
to be. knowing what PaX does (or claims to do), it's very easy to design
and write small applications that perform the core steps of an exploit
that may be able to break the protection mechanisms. i.e., any 'real'
exploit would eventually have to perform these core steps, so by ensuring
that they don't work (at least when the PaX claims stand) we can ensure
that no real life exploit would work either.

now let's get back to mprotect(), nested functions, etc. when an exploit
writer knows that the only barrier that prevents him from executing his
shellcode is a circumventible memory protection, then guess what, he'll
first try to circumvent said memory protection then execute his shellcode
as usual. since memory protection is controlled by mmap/mmprotect, his
goal will be to somehow force the exploited application to end up calling
these functions to get an executable region holding his shellcode.

your concerns would be valid if this was impossible to achieve by an
exploit, sadly, you'd be wrong too, it's possible to force an exploited
application to call something like dl_make_stack_executable() and then
execute the shellcode. there're many ways of doing this, the simplest
(in terms of lines of code) was chosen for paxtest. or put another way,
would you still argue that the use of the nested function trampoline
is sabotage whereas an exploit forcing a call to dl_make_stack_executable()
isn't? because the two achieve the exact same thing, they open up the
address space (or part of it, depending on the intrusion prevention
system) for shellcode execution.

one thing that paxtest didn't get right in the 'kiddie' mode is that
it still ran with an executable stack, that was not the intention but
rather an oversight, it'll be fixed in the next release. still, this
shouldn't leave you with a warm and fuzzy feeling about the security
of intrusion prevention systems that 'pass' the 'kiddie' mode but fail
the 'blackhat' mode, in the real life out there, only the latter matters
(if for no other reason, then for natural evolution/adaptation of
exploit writers).


  parent reply	other threads:[~2005-02-02 12:18 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200501311015.20964.arjan@infradead.org>
2005-01-31 12:57 ` Sabotaged PaXtest (was: Re: Patch 4/6 randomize the stack pointer) Peter Busser
2005-01-31 16:41   ` Arjan van de Ven
2005-02-01  9:44     ` Peter Busser
2005-02-01 11:46       ` Ingo Molnar
2005-02-01 14:48         ` Peter Busser
2005-02-01 21:39       ` Diego Calleja
2005-02-02  0:15       ` Theodore Ts'o
2005-02-02  8:26         ` Theodore Ts'o
2005-02-02  9:55           ` Peter Busser
2005-02-02  9:35         ` Peter Busser
2005-02-02  9:52           ` Arjan van de Ven
2005-02-02 12:18         ` pageexec [this message]
2005-02-02 13:13           ` Peter Busser
2005-02-02 14:12           ` Ingo Molnar
2005-02-02 18:02           ` Olivier Galibert
2005-02-07 18:35     ` Sabotaged PaXtest John Richard Moser
2005-02-02 16:51 Sabotaged PaXtest (was: Re: Patch 4/6 randomize the stack pointer) Ingo Molnar
2005-02-02 22:08 ` pageexec
2005-02-03  9:44   ` Ingo Molnar
2005-02-03 14:20     ` pageexec
2005-02-03 20:20       ` Ingo Molnar
2005-02-07 14:23         ` pageexec
2005-02-07 21:08           ` Ingo Molnar
2005-02-08 12:27             ` pageexec
2005-02-08 21:23               ` Ingo Molnar
2005-02-07 22:36           ` Ingo Molnar
2005-02-08 12:27             ` pageexec
2005-02-08 13:41               ` Ingo Molnar
2005-02-08 14:25                 ` Julien TINNES
2005-02-08 16:56                   ` Ingo Molnar
2005-02-03 13:55   ` Peter Busser
2005-02-03 14:39     ` Roman Zippel
2005-02-07 12:23       ` pageexec
2005-02-07 18:31       ` John Richard Moser

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=420151B3.27974.D9F79C@localhost \
    --to=pageexec@freemail.hu \
    --cc=arjan@infradead.org \
    --cc=busser@m-privacy.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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