Re: Lids preventing buffer overflow
Kazuki Omo <omok <at> honto.info>
2005-11-15 01:25:40 GMT
Hi, Christian,
Sorry for my bad english too
AFAIK, LIDS only enhancing Access Control. I guess LIDS won't protect
your server from buffer overflow vulnerability. But, from LIDS concept,
you can't kill protected process or can't access hidden files
even if you could obtain shell.
If you want to protect your machine from buffe overflow, exec-shield
might to be a better solution.
I don't know we can use exec-shield and LIDS on same system,
but we can try. (Or, lids-1.2.2-ow1 with OpenWall Linux can protect
too.)
SELinux is also can't protect from buffer overflow I guess.
But most of buffer overflow attack can't work on SELinux because of
SELinux's concept(least(actually, very very granulate) permission).
Even if attack will success, attacker can't obtain shell or something
caused from least permission.
Anyway, I want to test "sc.tgz" too.
Regards,
OMO
On Mon, Nov 14, 2005 at 12:10:47AM -0300, Christian Piva Franzen wrote:
> hy everyone,
>
> First of all, sorry my terrible english.
>
> I'm using LIDS 2.2.1, Kernel 2.6.13.2 in my course conclusion work
> and tested it with a date/time server containing a buffer overflow
> vulnerability. It tries to guess the return address sending diferent
> offsets each time it runs. Most of it was obtained from
> http://packetstormsecurity.org/advisories/b0f/sc.tgz
>
> I tested it using the same machine as a server (the one with the
> vulnerability) and the client.
>
> Running just one instance of the exploit didn't work, but when I
> used five instances I could obtain the Shell, that is, the exploit
> worked.
>
> Exit without LIDS:
> Stack pointer: 0xbfffecd8
> Offset: 3550
> Return Address: 0xbffffab6 (guess ;)
> *** servidor DATA/HORA versao 1.0 ***
> prompt "username" received.
> Sending buffer...200 bytes
> Sending /usr/bin/id...
>
> Stack pointer: 0xbfffecd8
> Offset: 3600
> Return Address: 0xbffffae8 (guess ;)
> *** servidor DATA/HORA versao 1.0 ***
> prompt "username" received.
> Sending buffer...200 bytes
> Sending /usr/bin/id...
> uid=1000(sysadm) gid=1000(sysadm)
> groups=20(dialout),24(cdrom),25(floppy),29(audio),44(video),46(plugdev),1000(sysadm)
>
>
> Exit with LIDS:
>
> Stack pointer: 0xbfd3b868
> Offset: 4050
> Return Address: 0xbfd3c83a (guess ;)
> *** servidor DATA/HORA versao 1.0 ***
> prompt "username" received.
> Sending buffer...200 bytes
> Sending /usr/bin/id...
> Stack pointer: 0xbfbb0698
> Offset: 4100
> Return Address: 0xbfbb169c (guess ;)
> *** servidor DATA/HORA versao 1.0 ***
> prompt "username" received.
> Sending buffer...200 bytes
> Sending /usr/bin/id...
> uid=1000(sysadm) gid=1000(sysadm)
> groups=20(dialout),24(cdrom),25(floppy),29(audio),44(video),46(plugdev),1000(sysadm)
>
>
> Does anyone knows which feature in LIDS prevented the buffer
> overflow with one process? And why it couldn't stop it when I had five
> processes runing together?
>
> The only diference i saw is that the stack pointer is always the
> same without LIDS, but with LIDS most of it change between each run.
>
> I would appreciate any help.
>
> []'s
> Christian Piva Franzen
> Brazil.
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> lids-user mailing list
> lids-user <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lids-user
>
--
--
Kazuki Omo: omok <at> honto.info
LIDS Japanese Information:
Japanese: http://www.selinux.gr.jp/LIDS-JP/index.html
English: http://www.selinux.gr.jp/LIDS-JP/LIDS_en/index.html
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click