Главная » Все файлы » Просмотр файлов из архивов » PDF-файлы » 2005. Programming Languages Security - A Survey

2005. Programming Languages Security - A Survey, страница 10

PDF-файл 2005. Programming Languages Security - A Survey, страница 10 Конструирование компиляторов (53037): Статья - 7 семестр2005. Programming Languages Security - A Survey: Конструирование компиляторов - PDF, страница 10 (53037) - СтудИзба2019-09-18СтудИзба

Описание файла

PDF-файл из архива "2005. Programming Languages Security - A Survey", который расположен в категории "". Всё это находится в предмете "конструирование компиляторов" из 7 семестр, которые можно найти в файловом архиве МГУ им. Ломоносова. Не смотря на прямую связь этого архива с МГУ им. Ломоносова, его также можно найти и в других разделах. .

Просмотр PDF-файла онлайн

Текст 10 страницы из PDF

Thisapproach aims at protecting against all known and unknownmemory error exploits.The techniques used in achieving this randomization aresketched below.PointGuardPointGuard is a C compiler enhancement that seeks to protect pointers by encrypting them when they are stored in memory and decrypting them just prior to dereferencing, i.e.

whenthey are loaded into CPU registers, where they are not threatened by overwriting, as registers are not directly addressable thru calculated addresses. Attackers will still be able tocorrupt pointers stored in memory, but cannot produce predictable pointer values as they have no knowledge of the decryption key.“PointGuard critically depends on a load/store instructiondiscipline” [18], where pointers are always loaded into registers before being dereferenced and operated upon.The encryption key is generated when program executionbegins, using some source of randomness such as a valuefrom /dev/random.

This key is then kept secret withinthe process’s address space, but is available to other processesthat share memory. Encryption is done by XOR’ing pointersagainst the key, and decryption is done in a similar fashion byXOR’ing again against the same key. Brute force guessing isimpractical, as incorrect guesses cause the process to abort,and the new process will have a different key.A possible way to bypass PointGuard protection is to guessthe decryption key by causing the program to print out pointerinformation via some other means.The encryption has been kept simple so as to avoid performance overheads and performance costs have been found tobe between 0%-20%.PointGuard is no longer available.4.5• Randomizing variables on the stack – at run-time thepositions of variables on the stack are continuouslychanged.

This is done via:1. Shadow stack – arrays and structures are allocatedon a different stack, thereby preventing overflowsfrom corrupting return addresses or pointer variables. The allocation order of these buffer variablesis also varied for each call.2. Randomizing the base of stackframes – to blur thelocation of other data on the stack, the base of thestack is randomized, and stack frames are separatedby random-sized gaps.• Static data randomization – the location and relative order of static variables is determined at the start of thetransformed program execution.

Accesses to these staticvariables are then converted to be carried out in an indirect manner. This is done by converting the program toonly have static pointer variables that store the locationof these static variables. The static pointer variables arestored in read-only memory to prevent against attacks.Kernel and Operating System AlterationsKernel and Operating system modifications try to prevent amalicious user’s injected code from executing.

The focus hereis not on finding and fixing exploitation of software bugs butrather on prevention and containment of exploit techniques.To use these tools the kernel of the operating system needsto be patched with them and the system built and rebootedwith the patched kernel. Minor modifications might evenneed to be made to some of the system configuration files.• Code randomization – code is randomized at the function granularity level.

Each function is associated witha function pointer and every function call is transformed19into an indirect call via the function pointer. By updatingthe function pointers to point to different locations of thefunction body, the order of functions can be changed inthe executable. Function pointers are write-protected toprevent against attacks.Shacham et al. [83] have shown that Pax ASLR is not veryeffective on 32-bit architectures. The randomization that itintroduces is not resistant to brute force attacks.PaX is functional and effective on many CPU architectures,including IA-32 (x86), IA-64, Alpha, PA-RISC, PowerPC,SPARC and SPARC64.In addition to these steps, “the base of the heap, gaps between heap allocations, and the location of functions in sharedlibraries” [76] are randomized.The tool has been built for RedHat Linux 9.0 and isshipped under GPL.4.6Library PatchesLibrary patches help make programs that are dynamicallylinked safe without requiring them to be recompiled.After the libraries have been installed, programs will needto be either implicitly or explicitly linked to them at run-time.The loader will look for these libraries and add the relevantdata from them into the process’s memory space.Solar Designer’s Non-executable stackStack smashing attacks are based on overwriting a function’s return address on the stack to point to some arbitrarycode in the stack, which is executed when the function returns.

Solar Designer’s Linux kernel patch [55] makes thestack segment non-executable so the operating system will notallow instructions to be executed in the this portion of a userprocess’s virtual address space, making buffer overflow vulnerabilities more difficult to exploit.However, making the stack non-executable can cause certain programs (some Lisp compilers) that rely on its executability to break [100]. The non-executable stack cannot prevent buffer overflow attacks that do not use the stackto place their attack code.

Attack code injected into heapallocated or statically allocated buffers can be used as exploits.The stack patch can also be circumvented by using a returnto-libc attack [98].The patch does not impose any performance overhead norrequire program recompilation. Its use however requires thekernel of the operating system to be patched. The patch isavailable for Linux 2.0.x, 2.2.x and 2.4.x.Libsafe - LibverifyLibsafe - Libverify [3] are methods to overcome bufferoverflow attacks. Both methods are implemented as dynamically loadable libraries and have performance overhead rangesbetween 0% - 15%.Libsafe replaces calls to known vulnerable library functions with a comparable version that ensures that any bufferoverflows are contained within the local stackframe. It triesto automatically approximate a safe upper limit on the size ofbuffers by recognizing that such local buffers cannot extendbeyond the end of the current stack frame; i.e.

it uses the calling function’s frame pointer as an upper limit for writing tostack variables. The substitute function then enforces theseboundaries, preventing the return address located on the stackfrom being overwritten.Libsafe does not need access to program source code, nordoes it require recompilation of binaries.

It however fails toprovide protection against heap-based buffer overflow attacksor to programs that do not use the standard C library functionsto copy into the buffer [84].It does not substitute the standard C library; instead it relies on the loader searching for it before the standard C library,so that the safe LibSafe functions are used instead of the standard unsafe library functions.

By suitably setting environmentvariables LibSafe can be installed as the default library.It is implemented on Linux and the source code is availableunder the GNU Lesser General Public License from here [54].Libverify inserts checks dynamically into a processes’memory to implement a scheme that verifies a function’sreturn address before it is used. Like Libsafe it works withpre-compiled binaries. On entering a function, it copies thereturn address onto a return address stack (canary stack ),which is in the heap, and on exiting the function the savedreturn address and the actual return address are compared.

Ifthere is a mismatch, execution is halted and an alert raised.PaXPaX [68] is a Linux kernel patch that implements nonexecutable stack and heap memory pages. It prevents execution of unsafe code by moderating access to memory pagesand is able to do so without interfering with execution ofproper code. Unlike Solar Designer’s non-executable stackpatch, PaX is able to protect the heap as well.It implements least privilege protection for memory pagesi.e. only data in a processes’s address space that needs to beexecutable will be granted execute permissions.Pax provides protection in two ways – making all writablememory pages non-executable (PAGEEXEC) and by usingaddress space layout randomization (ASLR).

It uses ASLRto randomize mmap()’ed library base addresses. This counteracts many security exploits, such as buffer overflow andreturn-to-libc attacks, but in effect reduces them to denialof service (DoS) attacks. It incurs a small amount of overhead [69].20It however does not protect the integrity of the canary stack.Libverify does not require access to the source code of theapplication, and hence can be used for legacy programs aswell.ily signify that the tool completely defends against that particular vulnerability. It only suggests that the tool has somemechanism for dealing with that vulnerability.

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Нашёл ошибку?
Или хочешь предложить что-то улучшить на этой странице? Напиши об этом и получи бонус!
Бонус рассчитывается индивидуально в каждом случае и может быть в виде баллов или бесплатной услуги от студизбы.
Предложить исправление
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5136
Авторов
на СтудИзбе
443
Средний доход
с одного платного файла
Обучение Подробнее