ralphy wrote:so it appears paxtest gave false positives? or is
Stack randomisation test (SEGMEXEC) : 23 bits (guessed)
Stack randomisation test (PAGEEXEC) : 24 bits (guessed)
still sufficient? im extremely worried about incoming attacks including ret2libc type attacks
, i realize an entire stack thats randomized won't circumvent this completely but i'd rather have my computer's stack randomized the best it can instead of not being randomized at all. what i don't understand is if i have it enabled then why hasn't my init continously looped yet???
You're right that some randomness is better than none, but remember that randomness only helps you against one class of attacks. It doesn't help against program errors which permit an attacker to receive a service that he wouldn't normally be allowed, such as if I asked your server to send me /etc/passwd and it agreed to do so because I formed the request in such a way that its access checks didn't recognize that I was asking for a prohibited file. For example, I could request "/etc/passwd\0foo", which is not equal to "/etc/passwd" when all characters are considered. However, when the request is passed to the kernel, the kernel will stop at the first null, giving it "/etc/passwd" as the file requested. In such a case, the attack would be based on bad logic in the server, but wouldn't require me to know where any particular piece of code is in the server's memory (and thus randomization wouldn't stop it).
If you're exposing services to potentially malicious users, I'd strongly suggest you use GRsecurity's RBAC system to restrict those services. It's still theoretically possible that there's a way around RBAC, but then the attacker would need to find a request that satisfies both the checks your service imposes
and satisfy RBAC's checks. As an added bonus, even if the attacker performs a buffer overflow attack (e.g. ret2libc), his code is still subject to the checks of RBAC, since that's on the kernel side and can't be bypassed no matter where he jumps in userland.