Добрый день я столкнулся с проблемой при попытке компиляции эксплоитов есть веб шелл доступ к серверу при попытки компиляции на сервере выдаёт такую ошибку
я попробовал скомпилировать файл на kali linux которая стоит на Малинке все компилируется без проблем но не запускается на веб шелле и за разницы в ядрах.
Дальше я сделал загрузочную флешку с Kali linux 2018.3 но там тоже проблема версия gcc - там оказалось 6 по этому после компеляции и попытке запуска эксплоита на веб шелле выдаёт ошибку что нету /lib64/libc.so.6 на самом веб шелле стоит версия gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
может у кого то есть под рукой
данная версия и он может помочь скомпилировать эти две эскплоита
www.exploit-db.com
In file included from 15024.c:43: /usr/include/string.h:34:20: error: stddef.h: No such file or directory In file included from 15024.c:43: /usr/include/string.h:45: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:49: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:58: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:65: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:68: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:95: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:132: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:140: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:146: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:153: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strxfrm' In file included from 15024.c:43: /usr/include/string.h:168: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strxfrm_l' /usr/include/string.h:183: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:284: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strcspn' /usr/include/string.h:288: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strspn' /usr/include/string.h:399: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strlen' /usr/include/string.h:406: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strnlen' /usr/include/string.h:427: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:451: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:455: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:459: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:462: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:540: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:577: error: expected declaration specifiers or '...' before 'size_t' /usr/include/string.h:580: error: expected declaration specifiers or '...' before 'size_t' In file included from 15024.c:44: /usr/include/unistd.h:357: error: expected declaration specifiers or '...' before 'size_t' /usr/include/unistd.h:363: error: expected declaration specifiers or '...' before 'size_t' /usr/include/unistd.h:373: error: expected declaration specifiers or '...' before 'size_t' /usr/include/unistd.h:381: error: expected declaration specifiers or '...' before 'size_t' /usr/include/unistd.h:508: error: expected declaration specifiers or '...' before 'size_t' In file included from 15024.c:44: /usr/include/unistd.h:620: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'confstr' /usr/include/unistd.h:793: error: expected declaration specifiers or '...' before 'size_t' /usr/include/unistd.h:829: error: expected declaration specifiers or '...' before 'size_t' /usr/include/unistd.h:840: error: expected declaration specifiers or '...' before 'size_t' /usr/include/unistd.h:876: error: expected declaration specifiers or '...' before 'size_t' In file included from 15024.c:44: /usr/include/unistd.h:898: error: expected declaration specifiers or '...' before 'size_t' /usr/include/unistd.h:905: error: expected declaration specifiers or '...' before 'size_t' /usr/include/unistd.h:916: error: expected declaration specifiers or '...' before 'size_t' /usr/include/unistd.h:918: error: expected declaration specifiers or '...' before 'size_t' /usr/include/unistd.h:936: error: expected declaration specifiers or '...' before 'size_t' /usr/include/unistd.h:937: error: expected declaration specifiers or '...' before 'size_t' In file included from 15024.c:46: /usr/include/stdlib.h:140: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__ctype_get_mb_cur_max' /usr/include/stdlib.h:337: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:367: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:369: error: nonnull argument with out-of-range operand number (argument 1, operand 4) /usr/include/stdlib.h:471: error: expected ')' before '__size' /usr/include/stdlib.h:473: error: expected ')' before '__nmemb' /usr/include/stdlib.h:485: error: expected declaration specifiers or '...' before 'size_t' In file included from /usr/include/stdlib.h:497, from 15024.c:46: /usr/include/alloca.h:33: error: expected ')' before '__size' In file included from 15024.c:46: /usr/include/stdlib.h:503: error: expected ')' before '__size' /usr/include/stdlib.h:508: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:508: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:756: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:756: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:757: error: nonnull argument with out-of-range operand number (argument 1, operand 5) /usr/include/stdlib.h:761: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:761: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:762: error: nonnull argument with out-of-range operand number (argument 1, operand 4) /usr/include/stdlib.h:840: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:843: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:847: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:851: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:860: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdlib.h:863: error: expected ')' before '*' token /usr/include/stdlib.h:867: error: expected declaration specifiers or '...' before 'wchar_t' /usr/include/stdlib.h:871: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mbstowcs' /usr/include/stdlib.h:874: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wcstombs' In file included from /usr/include/signal.h:356, from /usr/include/sys/wait.h:31, from 15024.c:47: /usr/include/bits/sigstack.h:54: error: expected specifier-qualifier-list before 'size_t' In file included from /usr/include/sys/uio.h:29, from /usr/include/sys/socket.h:28, from 15024.c:49: /usr/include/bits/uio.h:47: error: expected specifier-qualifier-list before 'size_t' In file included from /usr/include/sys/socket.h:40, from 15024.c:49: /usr/include/bits/socket.h:253: error: expected specifier-qualifier-list before 'size_t' /usr/include/bits/socket.h:276: error: expected specifier-qualifier-list before 'size_t' In file included from 15024.c:49: /usr/include/sys/socket.h:141: error: expected declaration specifiers or '...' before 'size_t' /usr/include/sys/socket.h:148: error: expected declaration specifiers or '...' before 'size_t' /usr/include/sys/socket.h:155: error: expected declaration specifiers or '...' before 'size_t' /usr/include/sys/socket.h:166: error: expected declaration specifiers or '...' before 'size_t' In file included from /usr/include/sched.h:43, from 15024.c:50: /usr/include/bits/sched.h:201: error: expected ')' before '__setsize' /usr/include/bits/sched.h:203: error: expected ')' before '__count' In file included from /usr/include/stdio.h:75, from 15024.c:52: /usr/include/libio.h:53:21: error: stdarg.h: No such file or directory In file included from /usr/include/stdio.h:75, from 15024.c:52: /usr/include/libio.h:332: error: expected specifier-qualifier-list before 'size_t' /usr/include/libio.h:364: error: expected declaration specifiers or '...' before 'size_t' /usr/include/libio.h:373: error: expected declaration specifiers or '...' before 'size_t' /usr/include/libio.h:491: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/libio.h:493: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/libio.h:495: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_IO_sgetn' In file included from 15024.c:52: /usr/include/stdio.h:80: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'va_list' In file included from 15024.c:52: /usr/include/stdio.h:318: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdio.h:324: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdio.h:336: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdio.h:343: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdio.h:371: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/stdio.h:376: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/stdio.h:379: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/stdio.h:385: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdio.h:387: error: format string argument not a string type /usr/include/stdio.h:389: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdio.h:390: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/stdio.h:391: error: format string argument not a string type /usr/include/stdio.h:417: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/stdio.h:476: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/stdio.h:483: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/stdio.h:488: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/stdio.h:498: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/stdio.h:503: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/stdio.h:506: error: expected declaration specifiers or '...' before '__gnuc_va_list' /usr/include/stdio.h:661: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdio.h:664: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdio.h:674: error: expected declaration specifiers or '...' before 'size_t' /usr/include/stdio.h:704: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fread' /usr/include/stdio.h:710: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fwrite' /usr/include/stdio.h:732: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fread_unlocked' /usr/include/stdio.h:734: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fwrite_unlocked' In file included from 15024.c:55: /usr/include/sys/mman.h:58: error: expected declaration specifiers or '...' before 'size_t' /usr/include/sys/mman.h:77: error: expected declaration specifiers or '...' before 'size_t' /usr/include/sys/mman.h:82: error: expected declaration specifiers or '...' before 'size_t' /usr/include/sys/mman.h:90: error: expected declaration specifiers or '...' before 'size_t' /usr/include/sys/mman.h:95: error: expected declaration specifiers or '...' before 'size_t' /usr/include/sys/mman.h:99: error: expected declaration specifiers or '...' before 'size_t' /usr/include/sys/mman.h:104: error: expected declaration specifiers or '...' before 'size_t' /usr/include/sys/mman.h:107: error: expected declaration specifiers or '...' before 'size_t' /usr/include/sys/mman.h:124: error: expected declaration specifiers or '...' before 'size_t' In file included from 15024.c:57: /usr/include/sys/msg.h:73: error: expected declaration specifiers or '...' before 'size_t' /usr/include/sys/msg.h:80: error: expected declaration specifiers or '...' before 'size_t' 15024.c:62:2: error: #error "r34d th3 c0d3 m0r0n!!# () #"
я попробовал скомпилировать файл на kali linux которая стоит на Малинке все компилируется без проблем но не запускается на веб шелле и за разницы в ядрах.
Дальше я сделал загрузочную флешку с Kali linux 2018.3 но там тоже проблема версия gcc - там оказалось 6 по этому после компеляции и попытке запуска эксплоита на веб шелле выдаёт ошибку что нету /lib64/libc.so.6 на самом веб шелле стоит версия gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
может у кого то есть под рукой
данная версия и он может помочь скомпилировать эти две эскплоита
Linux Kernel 2.6.27 < 2.6.36 (RedHat x86-64) - 'compat' Local Privilege Escalation
Linux Kernel 2.6.27 < 2.6.36 (RedHat x86-64) - 'compat' Local Privilege Escalation. CVE-2010-3081CVE-68213 . local exploit for Linux_x86-64 platform