{"id":212825,"date":"2014-02-17T02:10:03","date_gmt":"2014-02-16T22:10:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=212825"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=212825","title":{"rendered":"<span class=\"post_title\">\u0410\u043d\u0442\u0438-\u0440\u0443\u0442\u043a\u0438\u0442 \u0434\u043b\u044f Userland-RootKit Azazel \u00ab\u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435\u00bb<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412\u043e\u0442 \u0448\u0438\u043a\u0430\u0440\u043d\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <a href=\"http:\/\/habrahabr.ru\/users\/valdikss\/\" class=\"user_link\">ValdikSS<\/a> \u2014 <a href=\"http:\/\/habrahabr.ru\/post\/212769\/\">\u041d\u043e\u0432\u044b\u0439 Userland-RootKit Azazel<\/a>. \u041f\u043e\u0437\u0432\u043e\u043b\u044e \u0441\u0435\u0431\u0435 \u043f\u0440\u043e\u0446\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0431\u0437\u0430\u0446:<\/p>\n<blockquote><p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043f\u0440\u043e \u0440\u0443\u0442\u043a\u0438\u0442\u044b Jynx \u0438 Jynx2. \u042d\u0442\u043e \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 userland-\u0440\u0443\u0442\u043a\u0438\u0442\u044b, \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 LD_PRELOAD, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430. \u041e\u043d\u0438 \u0443\u0436\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0440\u044b\u0435, \u043d\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442.<br \/>  2 \u0434\u043d\u044f \u043d\u0430\u0437\u0430\u0434, Github-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c Chokepoint \u0432\u044b\u043b\u043e\u0436\u0438\u043b rootkit Azazel. \u041e\u043d \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 Jynx \u0438 \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447:<\/p>\n<p>  \u0410\u043d\u0442\u0438\u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b<br \/>  \u0421\u043a\u0440\u044b\u0442\u0438\u0435 \u043e\u0442 unhide, lsof, ps, ldd<br \/>  \u0421\u043a\u0440\u044b\u0442\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439<br \/>  \u0421\u043a\u0440\u044b\u0442\u0438\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439<br \/>  \u0421\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432<br \/>  \u0421\u043a\u0440\u044b\u0442\u0438\u0435 \u043b\u043e\u0433\u0438\u043d\u043e\u0432<br \/>  \u0421\u043a\u0440\u044b\u0442\u0438\u0435 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043d\u0438\u0444\u0444\u0438\u043d\u0433\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 PCAP<br \/>  2 \u0431\u0435\u043a\u0434\u043e\u0440\u0430 \u0441 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c\u0438 \u0448\u0435\u043b\u043b\u0430\u043c\u0438 (\u0441 PTY):<br \/>  \u2014 Crypthook accept()-\u0431\u0435\u043a\u0434\u043e\u0440<br \/>  \u2014 \u041e\u0431\u044b\u0447\u043d\u044b\u0439 accept()-\u0431\u0435\u043a\u0434\u043e\u0440<br \/>  PAM-\u0431\u0435\u043a\u0434\u043e\u0440 \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u0434 \u043b\u044e\u0431\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c<br \/>  \u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 utmp\/wtmp \u0434\u043b\u044f PTY<br \/>  \u041e\u0431\u0444\u0443\u0441\u043a\u0430\u0446\u0438\u044f \u0441\u0442\u0440\u043e\u043a \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 xor.<\/p><\/blockquote>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0440\u0443\u0442\u043a\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0448\u0442\u0430\u0442\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <code>LD_PRELOAD<\/code> \u043b\u044e\u0431\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0412\u0441\u0442\u0430\u0451\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u0430 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u043a\u0430\u043a-\u0442\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c?<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u043d\u044b\u043c, \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u044f\u0434\u0440\u0430 Linux, \u043a\u043e\u0442\u043e\u0440\u043e\u0435, \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>execve<\/code> (\u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u2014 <a href=\"http:\/\/lxr.free-electrons.com\/source\/fs\/exec.c?v=3.8#L1673\">sys_execve<\/a>), \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u043a\u0430\u043a <code>envp<\/code>) \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u043d\u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u0439 \u0441\u0430\u043c\u043e\u0439 <code>LD_PRELOAD<\/code>.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u044f\u0434\u0440\u0430. \u041f\u0435\u0440\u0435\u0445\u0432\u0430\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u0430\u0445, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u043d\u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u044f\u0445:<\/p>\n<ul>\n<li><a href=\"http:\/\/habrahabr.ru\/post\/196952\/\">\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 PageFault \u0432 \u044f\u0434\u0440\u0435 Linux<\/a><\/li>\n<li><a href=\"http:\/\/habrahabr.ru\/post\/206778\/\">\u041f\u0435\u0440\u0435\u0445\u0432\u0430\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u044f\u0434\u0440\u0430 Linux \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 (kprobes \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0443\u043a\u0430\u043c\u0438)<\/a><\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 sys_execve \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/milabs\/kmod_hooking\/blob\/hook-execve\/module-init.c#L261\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439<\/a> \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">DECLARE_KHOOK(sys_execve); long khook_sys_execve( const char __user * file, \t\t       const char __user * const __user * argv, \t\t       const char __user * const __user * envp ) { \tlong result;  \tKHOOK_USAGE_INC(sys_execve);  \tscan_env_for((void *)file, (void *)envp, env_token); \tresult = KHOOK_ORIGIN(sys_execve, file, argv, envp);  \tKHOOK_USAGE_DEC(sys_execve);  \treturn result; } <\/code><\/pre>\n<p>  \u041d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u043b\u0435\u043d\u0438\u0435\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>sys_execve<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 <code>env_token<\/code>. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <a href=\"https:\/\/github.com\/milabs\/kmod_hooking\/blob\/hook-execve\/module-init.c#L203\">scan_env_for<\/a>:<\/p>\n<pre><code class=\"cpp\">void scan_env_for(char * file, char * envp[], const char * token) { \tint i;  \tchar * string; \tchar * string_ptr;  \tif (!envp || !token) \t\treturn;  \tstring = kmalloc(MAX_ARG_STRLEN + 1, GFP_KERNEL); \tif (!string) { \t\tdebug(&quot;Can't get memory for the environ string\\n&quot;); \t\treturn; \t}  \tfor (i = 0; i &lt; MAX_ARG_STRINGS; i++) { \t\tif (get_user(string_ptr, envp + i)) { \t\t\tdebug(&quot;Can't get user pointer value\\n&quot;); \t\t\tgoto out_kfree; \t\t}  \t\tif (string_ptr == NULL) \t\t\tgoto out_kfree;  \t\tif (strncpy_from_user(string, string_ptr, MAX_ARG_STRLEN) == -EFAULT) { \t\t\tdebug(&quot;Can't get user string\\n&quot;); \t\t\tgoto out_kfree; \t\t}  \t\tstring[MAX_ARG_STRLEN] = 0;  \t\tif (strncmp(string, token, strlen(token)) == 0) { \t\t\tchar * filename;  \t\t\tfilename = kmalloc(PATH_MAX + 1, GFP_KERNEL); \t\t\tif (filename) { \t\t\t\tstrncpy_from_user(filename, file, PATH_MAX + 1); \t\t\t\tfilename[PATH_MAX] = 0; \t\t\t}  \t\t\tdebug(&quot;Attention, task \\&quot;%s\\&quot; trying to execute \\&quot;%s\\&quot; with \\&quot;%s\\&quot;\\n&quot;, \\ \t\t\t\tcurrent-&gt;comm, filename ? filename : &quot;(unknown)&quot;, string);  \t\t\tkfree(filename);  \t\t\tgoto out_kfree; \t\t} \t}  out_kfree: \tkfree(string); } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u043f\u0440\u0438 \u0435\u0451 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0430\u043c\u044f\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b \u044f\u0434\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0443\u043b\u044f, \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0441\u0431\u043e\u0440\u043a\u0438, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"bash\">$ sudo insmod envscan.ko env_token=\\&quot;LD_PRELOAD=\\&quot; $ dmesg | grep envscan   [37713.809903] [envscan] Symbol &quot;module_free&quot; found @ ffffffff810bdcd0   [37713.810190] [envscan] Symbol &quot;module_alloc&quot; found @ ffffffff810407e0   [37713.810523] [envscan] Symbol &quot;sort_extable&quot; found @ ffffffff81048a90   [37713.810524] [envscan] Hunting for &quot;LD_PRELOAD=&quot;   [37713.811798] [envscan] Symbol &quot;sys_execve&quot; found @ ffffffff8119ba30 $ LD_PRELOAD=\/lib\/ld-linux.so.2 ls   [37743.786499] [envscan] Attention, task &quot;bash&quot; trying to execute &quot;\/bin\/ls&quot; with &quot;LD_PRELOAD=\/lib\/ld-linux.so.2&quot; <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043d\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 <a href=\"https:\/\/github.com\/milabs\/kmod_hooking\/tree\/hook-execve\">\u0435\u0441\u0442\u044c<\/a> \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435, \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438, \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439, \u0441\u0432\u044f\u0437\u043d\u0430\u043d\u043d\u044b\u0445 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 <code>LD_PRELOAD<\/code>.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043c\u0435\u043d\u0435\u0435 \u043f\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044f\u0434\u0440\u043e\u043c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>  \u041a\u043e\u0434 \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/milabs\/kmod_hooking\/tree\/hook-execve\">github<\/a>.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/212825\/\"> http:\/\/habrahabr.ru\/post\/212825\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412\u043e\u0442 \u0448\u0438\u043a\u0430\u0440\u043d\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <a href=\"http:\/\/habrahabr.ru\/users\/valdikss\/\" class=\"user_link\">ValdikSS<\/a> \u2014 <a href=\"http:\/\/habrahabr.ru\/post\/212769\/\">\u041d\u043e\u0432\u044b\u0439 Userland-RootKit Azazel<\/a>. \u041f\u043e\u0437\u0432\u043e\u043b\u044e \u0441\u0435\u0431\u0435 \u043f\u0440\u043e\u0446\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0431\u0437\u0430\u0446:<\/p>\n<blockquote><p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043f\u0440\u043e \u0440\u0443\u0442\u043a\u0438\u0442\u044b Jynx \u0438 Jynx2. \u042d\u0442\u043e \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 userland-\u0440\u0443\u0442\u043a\u0438\u0442\u044b, \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 LD_PRELOAD, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430. \u041e\u043d\u0438 \u0443\u0436\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0440\u044b\u0435, \u043d\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442.<br \/>  2 \u0434\u043d\u044f \u043d\u0430\u0437\u0430\u0434, Github-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c Chokepoint \u0432\u044b\u043b\u043e\u0436\u0438\u043b rootkit Azazel. \u041e\u043d \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 Jynx \u0438 \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447:<\/p>\n<p>  \u0410\u043d\u0442\u0438\u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b<br \/>  \u0421\u043a\u0440\u044b\u0442\u0438\u0435 \u043e\u0442 unhide, lsof, ps, ldd<br \/>  \u0421\u043a\u0440\u044b\u0442\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439<br \/>  \u0421\u043a\u0440\u044b\u0442\u0438\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439<br \/>  \u0421\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432<br \/>  \u0421\u043a\u0440\u044b\u0442\u0438\u0435 \u043b\u043e\u0433\u0438\u043d\u043e\u0432<br \/>  \u0421\u043a\u0440\u044b\u0442\u0438\u0435 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043d\u0438\u0444\u0444\u0438\u043d\u0433\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 PCAP<br \/>  2 \u0431\u0435\u043a\u0434\u043e\u0440\u0430 \u0441 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c\u0438 \u0448\u0435\u043b\u043b\u0430\u043c\u0438 (\u0441 PTY):<br \/>  \u2014 Crypthook accept()-\u0431\u0435\u043a\u0434\u043e\u0440<br \/>  \u2014 \u041e\u0431\u044b\u0447\u043d\u044b\u0439 accept()-\u0431\u0435\u043a\u0434\u043e\u0440<br \/>  PAM-\u0431\u0435\u043a\u0434\u043e\u0440 \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u0434 \u043b\u044e\u0431\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c<br \/>  \u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 utmp\/wtmp \u0434\u043b\u044f PTY<br \/>  \u041e\u0431\u0444\u0443\u0441\u043a\u0430\u0446\u0438\u044f \u0441\u0442\u0440\u043e\u043a \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 xor.<\/p><\/blockquote>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0440\u0443\u0442\u043a\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0448\u0442\u0430\u0442\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <code>LD_PRELOAD<\/code> \u043b\u044e\u0431\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0412\u0441\u0442\u0430\u0451\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u0430 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u043a\u0430\u043a-\u0442\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-212825","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/212825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=212825"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/212825\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=212825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=212825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=212825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}