Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Thx to spender, we now have a working grsec bypasser :) look below...and simply modify the code to your liking
- xd / haqnet irc #HaqNET !
- */
- //includes are NOT for public, same as the exploit code main,you have to work that bit out ;) , look for dmesg.
- #define PAGE_SIZE getpagesize() // added so it works! (xd)
- static void __gr_check_mem(char *msg, char *to, unsigned long n) {
- if (object_is_on_stack(to) && !object_is_on_stack(to + n))
- //goto exploit;
- else {
- struct page *page;
- page = virt_to_head_page(to);
- if (!PageSlab(page)) {
- unsigned long max;
- char *pagestart = page_address(page);
- if ((!PageCompound(page) && ((to + n) > (pagestart + PAGE_SIZE))) || (PageCompound(page) && ((to + n) > (pagestart + (PAGE_SIZE << compound_order(page))))))
- goto exploit;
- } else if (n > ksize(to))
- goto exploit;
- }
- return;
- exploit:
- {
- if (current->signal->curr_ip)
- else
- panic(err_msg);
- }
- }
- void gr_check_mem_overflow(char *to, unsigned long n) {
- __gr_check_mem("[!] overflow", to, n);
- }
- void gr_check_mem_leak(char *to, unsigned long n) {
- __gr_check_mem("[-] info leak", to, n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement