exec-shield: kellems tapasztalatok

Kezdőlap Fórumok Biztonság exec-shield: kellems tapasztalatok

3 bejegyzés megtekintése - 1-3 / 3
  • Szerző
    Bejegyzés
  • #1921988
    fellow
    Felhasználó

      hogy ertheto legyen, miert szoftveres megoldasra van szukseg, erdmese elolvasni a http://people.redhat.com/mingo/exec-shield…NCE-exec-shield „Background” reszet;
      de ugy nez ki, hogy egyszer csak veget er az „x86-os siralomvolgy”: http://www.ussg.iu.edu/hypermail/linux/ker…311.0/0249.html

      #1921989
      fellow
      Felhasználó

        mar jo negyed eve elek egyutt felvaltva az exec-shielddel es a grsecurityvel, ugyhogy gondoltam leirom a _szubjektiv_ _velemenyemet_ az elobbirol, amit nem altalanos itelkezesnek szanok, elvegre az emberek / disztrok / igenyek kulonbozoek;
        kezdjuk azzal, hogy egy nagyon jo kezdemenyezes, sok helyen (desktop disztrok) van igeny olyan exploit elleni vedelemre, ami az egyszeri felhasznalo beavatkozasa nelku is ellatja a feladatat; az exec-shield ilyen lesz, ha majd elterjed az (altalma tapasztalat) ket problemas program – a localedef es a wine ( http://winehq.org/?issue=210#Prelinking and Exec Shield Problems ) – exec-shield kompatibilis valtzata; de onmagaban keves es esetleg hamis biztonsagerzetet adhat (mint emlitettem: ez maganvelemeny)
        a kiforratlansaga pedig sajnos szembetuno: a G9ben meg benne van egy eleg durva bug, ami azt eredmenyezi, hogy az indirekt fuggvenyhivasok megtevesztik es engedelyez olyan kodot is, amit nem kene (vo: paxtest-0.9.5 forrasa)
        felreertes ne essek: nem lehuzni akarom az exec-shieldet, mert vszinuleg egy korrekt eszkoz lesz belole, de per pillanat a pax jobb nala; elvegre ha az ember valaszthat, ket megoldas kozul es az egyik tobb szolgaltatast nyujt a masiknal, nos akkor nem azt fogja valasztani, ami kevesebbet tud;
        a pax hasznalatarol egy kicsit kesobb majd irogatok;

        #1871855
        csaba
        Felhasználó

          mivel ugyis uj kernelt kellett forditanom ( http://portal.fsn.hu/modules.php?name=News…rder=0&thold=-1 ) gondoltam kiprobalom az exec-shield patchet ( http://people.redhat.com/mingo/exec-shield/ );

          a patch celja szeleskoru vedelmet nyujtani a memoria manipulacoval probalkozo exploitok ellen; hasznalat (a pax-szal ellentetben) nem igenyli kritikus binarisok patcheleset (pontosabban az xnek kell egy valtoztatas a /proc-ban, de a disztrok nagy reszehez mar elkezdtek az exec-shield kompatibilis x feltolteset);

          kicsit tobb info: https://portal.fsn.hu/modules.php?name=Sear…ries&category=0

          minden kiprobalt program futott nalam: ut2003, java, mplayer, wine, stb;

          es amit nyujt:

          $ cat /proc/version
          Linux version 2.4.23-exec-shield (root@cecil) (gcc version 3.3.2 (Debian)) #1 2003. dec. 3., szerda, 18.08.00 CET

          $ cat /proc/sys/kernel/exec-shield
          2

          libsafe-2.0-16:
          ./canary-exploit
          This program tries to use printf(„%n”) to overwrite the
          return address on the stack.
          If you get a /bin/sh prompt, then the exploit has worked.
          Press any key to continue…
          Szegmens hiba

          ./exploit-non-exec-stack
          This program demonstrates how a (stack) buffer overflow
          can attack linux kernels with *non-executable* stacks.
          This is variation on return-int-libc attack.
          If you get a /bin/sh prompt, then the exploit has worked.
          Press any key to continue…
          Szegmens hiba

          ./t1
          This program tries to use strcpy() to overflow the buffer.
          If you get a /bin/sh prompt, then the exploit has worked.
          Press any key to continue…
          Szegmens hiba

          ./t1w
          This program tries to use strcpy() to overflow the buffer.
          If you get a /bin/sh prompt, then the exploit has worked.
          Press any key to continue…
          Szegmens hiba

          ./t3
          This program will exec() a new program. The new program will
          overflow the buffer using strcpy().
          If you get a /bin/sh prompt, then the exploit has worked.
          Press any key to continue…
          Szegmens hiba

          ./t3w
          This program will exec() a new program. The new program will
          overflow the buffer using strcpy().
          If you get a /bin/sh prompt, then the exploit has worked.
          Press any key to continue…
          Szegmens hiba

          ./t4
          This program will fork() child process, and the child
          will overflow the buffer using strcpy().
          If you get a /bin/sh prompt, then the exploit has worked.
          Press any key to continue…
          parent process terminating

          ./t4w
          This program will fork() child process, and the child
          will overflow the buffer using strcpy().
          If you get a /bin/sh prompt, then the exploit has worked.
          Press any key to continue…
          parent process terminating

          ./t5
          This program tries to use strcat() to overflow the buffer.
          If you get a /bin/sh prompt, then the exploit has worked.
          Press any key to continue…
          Szegmens hiba

          ./t6
          This program tries to use scanf() to overflow the buffer.
          If you get a /bin/sh prompt, then the exploit has worked.
          Press any key to continue…
          Szegmens hiba

          tehat aki eddig hasznalta a libsafet, annak ez a patch jelenleteben nincs kulonosebb szuksege ra;

          paxtest-0.9.3:
          ./paxtest
          PaXtest – Copyright© 2003 by Peter Busser
          Released under the GNU Public Licence version 2 or later

          It may take a while for the tests to complete
          Test results:
          PaXtest – Copyright© 2003 by Peter Busser
          Released under the GNU Public Licence version 2 or later

          Executable anonymous mapping : Killed
          Executable bss : Killed
          Executable data : Killed
          Executable heap : Killed
          Executable stack : Killed
          Executable anonymous mapping (mprotect) : Killed
          Executable bss (mprotect) : Vulnerable
          Executable data (mprotect) : Vulnerable
          Executable heap (mprotect) : Vulnerable
          Executable shared library bss (mprotect) : Vulnerable
          Executable shared library data (mprotect): Vulnerable
          Executable stack (mprotect) : Vulnerable
          Anonymous mapping randomisation test : 8 bits (guessed)
          Heap randomisation test (ET_EXEC) : 14 bits (guessed)
          Heap randomisation test (ET_DYN) : 13 bits (guessed)
          Main executable randomisation (ET_EXEC) : No randomisation
          Main executable randomisation (ET_DYN) : 12 bits (guessed)
          Shared library randomisation test : 12 bits (guessed)
          Stack randomisation test (SEGMEXEC) : 17 bits (guessed)
          Stack randomisation test (PAGEEXEC) : 17 bits (guessed)
          Return to function (strcpy) : Vulnerable
          Return to function (memcpy) : Executable shared library bss
          Executable shared library data : Killed
          Writable text segments : Vulnerable

          tehat a paxot meg nem tudna felvaltani, de az eredmeny nem rossz;

          mindenkinek tudom ajanlani ezt a patchet, aki sajat kernelt hasznal;
          telepites, beallitas: http://people.redhat.com/mingo/exec-shield…NCE-exec-shield

        3 bejegyzés megtekintése - 1-3 / 3
        • Be kell jelentkezni a hozzászóláshoz.