{"id":260,"date":"2010-06-22T16:17:44","date_gmt":"2010-06-22T13:17:44","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=260"},"modified":"2013-07-14T10:48:01","modified_gmt":"2013-07-14T07:48:01","slug":"%d0%b2%d1%8b%d0%bf%d0%be%d0%bb%d0%bd%d1%8f%d0%b5%d0%bc-%d0%ba%d0%be%d0%bc%d0%b0%d0%bd%d0%b4%d1%8b-%d0%be%d1%82-%d0%b4%d1%80%d1%83%d0%b3%d0%be%d0%b3%d0%be-%d0%bf%d0%be%d0%bb%d1%8c%d0%b7%d0%be%d0%b2","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=260","title":{"rendered":"\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f."},"content":{"rendered":"<p>\u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432\u0435\u0449\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u043d\u0430\u0442\u044c, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0432 \u043f\u043e\u0440\u044b\u0432\u0435 \u043f\u0430\u043d\u0438\u043a\u0438 \u0432\u0441\u0451 \u0432\u044b\u043b\u0435\u0442\u0430\u0435\u0442 \u0438\u0437 \u0433\u043e\u043b\u043e\u0432\u044b :). \u041a\u0430\u043a \u0431\u044b \u0442\u0430\u043c \u043d\u0435 \u0431\u044b\u043b\u043e, \u043e\u043f\u0438\u0448\u0443 \u0437\u0434\u0435\u0441\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u0432\u00a0<strong>*nix<\/strong>,\u00a0<strong>windows\u00a0<\/strong>\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445.<\/p>\n<p><!--more--><\/p>\n<p><strong><span style=\"color: #ff0000;\">Windows<\/span><\/strong><\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434, \u043e\u0434\u043d\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f (<strong>runas<\/strong>), \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0430\u0432\u044f\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>psexec<\/strong> \u0438\u0437 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0430 <strong>pstools<\/strong>).<\/p>\n<p><em><strong>&#8211; runas<\/strong><\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u0442 \u0435\u0451 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<p><code>runas [{\/profile|\/noprofile}] \/user:\u0443\u0447\u0435\u0442\u043d\u0430\u044f_\u0437\u0430\u043f\u0438\u0441\u044c_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f program<\/code><\/p>\n<p>\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0443\u044e \u0444\u043e\u0440\u043c\u0443 (\u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0441\u043f\u0440\u0430\u0432\u043a\u0435):<\/p>\n<p><code>runas \/user:\u0443\u0447\u0435\u0442\u043d\u0430\u044f_\u0437\u0430\u043f\u0438\u0441\u044c_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f program<\/code><\/p>\n<p>\u0433\u0434\u0435,\u00a0<strong>\u0443\u0447\u0435\u0442\u043d\u0430\u044f_\u0437\u0430\u043f\u0438\u0441\u044c_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/strong> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439, \u0442\u0430\u043a \u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p><em><strong><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/span><\/strong><\/em><\/p>\n<p><code>runas \/user:mymachine\\administrator CMD<br \/>\nrunas \/user:SCOT_DOMAIN\\administrator NOTEPAD<br \/>\nrunas \/user:jDoe@swest.ss64.com \"NOTEPAD \\\"my file.txt\\\"\"<\/code><\/p>\n<p>\u0422\u0440\u0435\u0442\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0442\u044c, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0438 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0438.<\/p>\n<p><strong><span style=\"color: #ff6600;\">\u041f\u043b\u044e\u0441\u044b<\/span><\/strong> &#8211; \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b: \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430, \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<p><strong><span style=\"color: #ff6600;\">\u041c\u0438\u043d\u0443\u0441\u044b<\/span><\/strong>: \u043d\u0435\u043b\u044c\u0437\u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0443 \u0432 \u0444\u043e\u043d\u0435.<\/p>\n<p><em><strong> &#8211; psexec<\/strong><\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<p><code>psexec \\\\computer[,computer[,..] command<br \/>\npsexec @run_file command<\/code><\/p>\n<p>\u042d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043a\u043e\u043c\u0431\u0430\u0439\u043d \u043f\u043e \u0444\u043e\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0443, \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0443 \u043d\u0430 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u043e\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0437\u0430\u043f\u0443\u0441\u043a \u0432 \u0444\u043e\u043d\u0435 \u0438 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e. \u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0441\u043f\u0440\u0430\u0432\u043a\u0435 \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435. \u041d\u0430\u043c \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0446\u0438\u0438, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u043e\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u044e\u0437\u0435\u0440\u0430. \u0412\u043e\u0442 \u043e\u043f\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u0431\u0443\u0434\u0443\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b:<\/p>\n<p>computer\u00a0 \u041d\u0430 \u043a\u0430\u043a\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443. \u041f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 = \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439. \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430 \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445 \u0434\u043e\u043c\u0435\u043d\u0430, \u0432\u0432\u043e\u0434\u0438\u043c &#8220;\\\\*&#8221;<br \/>\n@run_file\u00a0 \u0417\u0430\u043f\u0443\u0441\u043a \u043d\u0430 \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445, \u0443\u043a\u0430\u0445\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u0430\u0439\u043b\u0435 run_file.<br \/>\n-p psswd\u00a0\u00a0 \u0417\u0430\u0434\u0430\u0451\u0442 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u043a\u043b\u044e\u0447 -u user (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e). \u041f\u0430\u0440\u043e\u043b\u044c \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430. \u0415\u0441\u043b\u0438 \u043a\u043b\u044e\u0447 \u0441\u0442\u043e\u0438\u0442, \u0430 \u043f\u0430\u0440\u043e\u043b\u044c \u043d\u0435 \u0437\u0430\u0434\u0430\u043d, \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0430\u0440\u043e\u043b\u044c<br \/>\n-s\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u043c (\u0430\u043a\u043a\u0430\u0443\u043d\u0442 System)<br \/>\n-u user\u00a0\u00a0\u00a0\u00a0\u00a0 Specify a user name for login to remote computer(optional).<br \/>\n-d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Don&#8217;t wait for the application to terminate. Only use for non-interactive applications.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p><code>psexec \\\\workstation64 ipconfig \/all<br \/>\npsexec \\\\workstation64 \"c:\\Program Files\\test.exe\"<br \/>\npsexec -d \"c:\\program files\\internet explorer\\iexplore.exe\"<br \/>\n<\/code><br \/>\n\u041f\u0435\u0440\u0432\u0430\u044f \u0438 \u0432\u0442\u043e\u0440\u0430\u044f &#8211; \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435\u00a0<strong>workstation64<\/strong>, \u0442\u0440\u0435\u0442\u044c\u044f &#8211; \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435.<\/p>\n<p><strong><span style=\"color: #ff0000;\">*nix<\/span><\/strong><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0442\u043e\u0436\u0435 2 \u043a\u043e\u043c\u0430\u043d\u0434\u044b: \u043e\u0434\u043d\u0430 \u043a\u0430\u043a \u0431\u044b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f (<strong>su<\/strong>), \u0430 \u0432\u0442\u043e\u0440\u0430\u044f &#8211; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e (<strong>sudo<\/strong>).<\/p>\n<p><em><strong> &#8211; su <\/strong><\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u0442:<\/p>\n<p><code>su -c \"command\" user<\/code><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p><code>su -c \"less \/home\/fred\/secret\" fred<\/code><\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u00a0<strong>fred<\/strong>.<\/p>\n<p><em><strong>-sudo<\/strong><\/em><\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u0442:<\/p>\n<p><code>sudo -h | -K | -k | -L | -l | -V | -v<br \/>\nsudo [-bEHPS] [-c class|-] [-p prompt] [-u username|#uid] [VAR=value] {-i | -s | command}<\/code><\/p>\n<p>\u041d\u043e \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u0443\u044e \u0444\u043e\u0440\u043c\u0443:<\/p>\n<p><code>sudo -u user command<\/code><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p><code>sudo cat \/var\/log\/auth.log<br \/>\nsudo -u fred mv \/home\/fred\/secret \/home\/fred\/supersecret<\/code><\/p>\n<p><strong><em>-pfexec\u00a0<\/em><\/strong>(\u0422\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f Solaris)<\/p>\n<p><code>pfexec command<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432\u0435\u0449\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u043d\u0430\u0442\u044c, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0432 \u043f\u043e\u0440\u044b\u0432\u0435 \u043f\u0430\u043d\u0438\u043a\u0438 \u0432\u0441\u0451 \u0432\u044b\u043b\u0435\u0442\u0430\u0435\u0442 \u0438\u0437 \u0433\u043e\u043b\u043e\u0432\u044b :). \u041a\u0430\u043a \u0431\u044b \u0442\u0430\u043c \u043d\u0435 \u0431\u044b\u043b\u043e, \u043e\u043f\u0438\u0448\u0443 \u0437\u0434\u0435\u0441\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u0432\u00a0*nix,\u00a0windows\u00a0\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,10,25,24,8],"tags":[],"class_list":["post-260","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-linux","category-others","category-openbsd","category-solaris","category-windows"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=260"}],"version-history":[{"count":6,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions"}],"predecessor-version":[{"id":1137,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions\/1137"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}