OpenBSD

Friss biztonsági változások az OpenBSD-ben

Címkék

Az OpenBSD atyja, Theo de Raadt bejelentette, hogy az OpenBSD újabb biztonságot erősítő funkciókkal gyarapodott. Ezek a biztonsági funkciók amellett, hogy erősítik a rendszer alapbiztonságát, még el is veszik a kedvét az átlagos, puffer túlcsordítással manipuláló támadónak. A funkcióbővítések része a POSIX PROT_EXEC direktíva implementálása, amely biztosítja, hogy az oldalakat (pages) ne lehessen egy időben írni és végrehajtani a memóriában, és megjelent a propolice, amely nehezebbé teszi, hogy a puffer változók tulcsordulhassanak.

Theo de Raadt levele:From: deraadt@cvs.openbsd.org (Theo de Raadt)

Newsgroups: mailing.openbsd.tech

Subject: recent security changes in openbsd

Date: Thu, 30 Jan 2003 09:08:33 +0000 (UTC)

In the last while, a couple of people in OpenBSD have been putting some buffer overflow "solutions" into our source tree; under my continual prodding. I thought I would summarize some of these and how they fit together, since what I have seen written up so far has been wildly inaccurate. (Bad reporter, no cookie).

These are, in short form:

1) PROT_* purity

2) W^X

3) .rodata

4) propolice

Let me start at the top then.

1) PROT_* purity

POSIX systems have three permissions for each page.

PROT_READ

PROT_WRITE

PROT_EXEC

To control the behaviour of a page, one or's these values together. Unfortunately, as you can see from mprotect(2):

The mprotect() system call changes the specified pages to have protection prot. Not all implementations will guarantee protection on a page basis; the granularity of protection changes may be as large as an entire region. This might not be true on a page. All real Unix systems I know of support PROT_READ and PROT_WRITE correctly, but PROT_EXEC has largely been implied as soon as you ask for PROT_READ.

This is because the pmap modules have been poorly written, or because the mmu's in question are not fully capable. This change makes a best effort based on the MMU in question to enforce PROT_EXEC as an independent flag.

BEFORE AFTER

sparc nope fully correct

sparc64 nope fully correct

alpha nope fully correct

vax nope impossible

m68k nope impossible

hppa nope fully correct

i386 nope see Note 1

powerpc nope see Note 2

Oh oh. i386 and powerpc, two very common architecures, have ominous notes. Now you guys know why I want fast sparc64 machines to run.

Note 1)

The i386 is not capable of doing per-page execute permission. At most it is only capable of drawing a line through the address space, by limiting the code segment length (using the code segment register). So we can say, "from 0 to this point is executable" and "from that point on to the end of userland is not executable". This sucks, but it is the best we can currently do. We can protect the stack, and not much else.

There are a lot of other i386 details that are interesting to some of us, but you don't want to know them. Anyways we are investigating some possible changes that might help us protect more.

By the way, hammer will not have this problem...

Note 2)

The powerpc has a slightly more flexible mechanism than the i386, but let me just say it still totally sucks. We can protect

the stack, and not much else.

So what we did here is to make a best effort solution at making the stack non-executable on most architectures. On many others, we have also made the data and bss segments non-executable.

In other words, the VM system needed slight tracks to correct the tracking of PROT_EXEC more carefully, and then the pmap modules in each architecture was modified to take a `best effort' approach towards making PROT_EXEC an independent flag.

2) W^X.

W^X is a short form for "PROT_WRITE XOR PROT_EXEC". The basic idea here is that most buffer overflow "eggs" rely on a particular feature: That there is memory which they can write to, and then jump to.

What if there was no such memory? Does a normal Unix process have memory that is both writeable and executable? Turns out they do: In particular, (ELF) shared library programs have these two segments called GOT and PLT that are (depending on which architecture) normally part of the text or data segment. They are overwritten at times.

But do they need it? The change that has been made is to put the GOT and PLT into their own segments. The main goal of course, is to try to ensure that at any time, no page in the system is both writeable and executable.

We managed to get it working. The attackers just lost a place to put their buffer overflow egg. On architectures where goal (1) is fully working, that is...

3) .rodata

Now there is another problem. The code segment of a program, called the text segment, has two parts in it on most systems: real code, and read-only data. Historically a.out only had text, data and bss segments, and it appears that when people moved to ELF they basically just didn't use any new features that ELF has. We've finally now moved to a seperate .rodata segment. Unlike the real text segment which is PROT_READ|PROT_EXEC, this new segment is only PROT_READ.

What difference does this make? Well, if you manage to find some data in a program that looks like instructions you might want to run from your exploit, you can no longer do that. This may sound like a minor chance (but there are also cache and performance reasons too ;-)

4) Propolice

Propolice is, as I like say describe it, "Stackgaurd on steriods". Stackgaurd uses a random canary (random value constant per run) placed by the function prologue and checked by the function epilogues to ensure the return address has not been moved. It was i386 only code. Propolice is machine independent, running on most of our architectures. As well, Propolice rearranges variables inside a stack frame so that the ones most likely to overflow (ie buffers) are closest to the canary, thereby making it hard to overwrite pointers or

regular integers (which it moves down).

We feel that these 4 technologies together will be a a royal pain in the ass for the typical buffer overflow attacker.

We'll be writing a real paper about all of this later, but perhaps now people will understand why we are excited about 3.4.

Az OpenBSD fejlesztők harca az UltraSparc III dokumentumokért

Címkék

Egy cikk jelent meg a KernelTrap-on, mely szerint az OpenBSD fejlesztők nem adják fel a reményt, hogy megszerezzék a Sun-tól az UltraSparc III processzorok részletes dokumentációját. A dokumentumok nagyon fontosak lennének a fejlesztőknek, az operációs rendszer fejlesztéséhez. Az UltraSparc III processzor a Sun Microsystems harmadik generációs 64-bites processzora.

A cikket elolvashatod itt.

OpenBSD: új szálkezelkési támogatás

Címkék

Úgy látszik, hogy az összes OS-re egyszerre jön rá a "fejlesztheteni kéne valamit". A Linux (NGPT) és a NetBSD (natív pthreads és sched activations) után az OpenBSD is bejelentette a következő generációs szálkezelési megoldást (threading). Az OpenBSD core C könyvtára teljesen más elgondolás alapján kezeli majd ezután a többszálú alkalmazásokat. Elbúcsúzik a libc_r és a libnpthread. Helyette jön a libpthread. A gcc fordítót a -pthread kapcsolóval lehet majd rávenni a támogatás bekapcsolására.

Bővebb infó az OpenBSD Journal oldalain itt.

Egyszerű OpenBSD tűzfal felület

Címkék

A "Simple OpenBSD Firewall Interface" (SOFI) projectet ezen a hétvégén jelentették be emailben a misc@ levlistán. A project célja:

Néhány érdekesebb tervezett funkció: * Automatikus telepítési folyamat

* Hálózati autodetektálás

* Webes felület az összes adminisztratív feladathoz

* Támogatás DNS és DHCP szerverekhez

A project maga a SOFT Sourceforge oldalon található meg, ahol bővebb információ és demo található a stuffból.

OpenBSD foltozása

Címkék

securing small.. Folytatódik Jacek Artymiak cikksorozata az OnLamp.com-on. A most megjelent cikk folytatása a ``Securing Small Networks with OpenBSD" cikksorozatnak. A mostani rész azzal foglalkozik, hogy hogyan hozzuk rendszerünket az aktuális állapotra, hogyan tegyünk meg mindent annak érdekében, hogy a rendszerünk a lehető legnagyobb biztonságban legyen. A cikk az OpenBSD biztonsági foltozásával foglalkozik.

A cikket megtalálod itt.

Már rendelhetők az új OpenBSD 3.2 pólók

Címkék

obsd polo Úgy látszik, hogy már rendelhetők az OpenBSD legújabb release-hez (OBSD 3.2) készült pólók a honlapról. Az OpenBSD szerintem az project, aki a legjobb artwork-oket készíti a kiadásaihoz. A mostaninak sincs mit szégyenkeznie az elődökkel szemben. Egy kevéske James Bond feeling és fanyar humor.


A 3.2 puffy (az ismert tüskehal, blowfish), a Agent 077, "secure not stirred" a póló hátulján, és a 3.2 artwork az elején.


obsd polo


Megrendelés:

https://https.openbsd.org/cgi-bin/order

OpenOffice.org az OpenBSD-n

Címkék

David Lebel sikeresen állított össze egy receptet, amiben leírja a módját annak, hogy hogyan is lehet OpenOffice.org irodai alkalmazást futtatni OpenBSD-n.A futtatáshoz szükség van a Linux emuláció telepítésére, bekapcsolására. Aminet ez kész, lehet telepíteni az OpenOffice.org-ot.

David receptjét megtalálod a ports listán. A natív futtatáshoz számos változtatás kellene, és számos olyan véltoztatás is ami még nem ismert.

OpenBSD: az Amiga platform vége (egyelőre)

Címkék

Az OpenBSD honalpján kisebb változások mentek végbe a napokban. Letisztult a támogatott platformok listája (full platform pages) és néhány más platform specefikus oldal is változott. Változott az Amiga platform oldal is, amelyből megtudhatjuk, hogy karbantartó és érdeklődés hiányában az OpenBSD Amiga portja a 3.2-es verziótól kezdve nem lesz többé támogatott addig, amíg valaki életre nem hívja újra a projectet. A forráskód elérhető marad a CVS Attic-ban.

TrojanProof a 3.2-Release-hez

Címkék

A TrojanProof.org-os fiúk kiadták a legújabb foltjukat a 3.2-release-hez. A folt szabadon letölthető, akinek szüksége van hozzá támogatásra, az itt tud rendelni. A csomagokat a 3.2-höz itt találod, természetesen PGP aláírással.

A program elektronikus aláírásokkal dolgozik. A pontos működési mechanizmusát megismerheted ebből a PDF dokumentumból. Megjegyzendő, hogy a dolog összekapcsolható a systrace nevű biztonsági eszközzel is.

FIGYELEM: a TrojanProof módosítja a kernelt, ami a rendszer működésére is kihatással lehet. Az OpenBSD project hivatalosan nem támogatja a foltot. Szükséges lehet fejlesztői környezetben tesztelni a patchet, mielőtt produktív környezetben használatra kerül.

Kacsolódó oldalak:

Niels Provos systrace weblapja

OpenBSD

systrace az alaprendszerben

Fejlemények systrace ügyben

OpenBSD: privilégium emelés (Privilege Elevation)

Anti-trójai kernel patchek FreeBSD 4.6, 4.6.2-höz. és OpenBSD 3.1-hez


Trójai programok elleni védelem FreeBSD-hez és OpenBSD-hez

Segítsd az OpenBSD projectet: vásárolj CD-t, és pólót

Címkék

Artur Grabowski egy levelet postázott az OBSD levlistára, amelyben felkér mindenkit, hogy aki tud támogassa az OpenBSD fejlesztést azzal, hogy az OpenBSD projecttől CD-t és pólót vásárol. Grabowski leírja a levelében, hogy azok a pénzek amelyek ebből a forrásból folynak be, részint de Raadt-hoz kerülnek, amelyből Ő fenntartja az OpenBSD infrastruktúrát, részint pedig más projecteket finanszíroznak, rész- és egész munkaidős alkalmazottakat fizetnek ki belőle.A támogatás ezen formája kicsit lelassult az utóbbi időben, rengetegen csak az FTP letöltést veszik igénybe, amelyből nincs bevétele a projectnek. Grabowski elmondja, hogy tudja, hogy a gazdaság nics topon jelenleg, és a cégeknek nincs pénzük szoftverre, de reméli, hogy túl tudják élni ezeket a nehéz időket azzal, hogy CD-t és pólót adnak el. Kéri a cégeket is, hogy akik OpenBSD-t használnak rendeljenek ezekeből a cuccokból néhány extra darabot.

Bővebben itt.