{"id":152,"date":"2006-11-10T14:43:51","date_gmt":"2006-11-10T12:43:51","guid":{"rendered":"http:\/\/soci.hu\/blog\/index.php\/2006\/11\/10\/vista-protected-mode\/"},"modified":"2006-11-10T14:47:34","modified_gmt":"2006-11-10T12:47:34","slug":"vista-protected-mode","status":"publish","type":"post","link":"https:\/\/soci.hu\/blog\/index.php\/2006\/11\/10\/vista-protected-mode\/","title":{"rendered":"Vista Protected mode"},"content":{"rendered":"<p>Huncut dolog ez az <a target=\"_blank\" href=\"http:\/\/msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/ietechcol\/dnwebgen\/protectedmode.asp\">IE7 v\u00e9dett m\u00f3d<\/a>, illetve a m\u00f6g\u00f6tte lev\u0151 technol\u00f3gi\u00e1k (csak Vist\u00e1n, XP-n nem).<\/p>\n<p>Ha egy process Integrity Levelje mondjuk 100, pl. egy protected m\u00f3dban fut\u00f3 IE7-ben fut\u00f3 k\u00f3d\u00e9 ennyi, akkor az hi\u00e1ba \u00edr ki OutputDebugStringgel valamit, nem l\u00e1tszik a <a target=\"_blank\" href=\"http:\/\/www.microsoft.com\/technet\/sysinternals\/utilities\/debugview.mspx\">DebugView<\/a>-ban, mert a debugview 200-as szinten fut. Minden user processz, amit az explorer ind\u00edt alapban ezen a szinten fut, mert a child processzek \u00f6r\u00f6klik a sz\u00fcl\u0151 integrity levelj\u00e9t.<\/p>\n<p>Nem tudom az OutputDebugString illetve a DebugView bel\u00fcl hogyan m\u0171k\u00f6dik (pont most j\u00f3l j\u00f6tt volna a DebugView forr\u00e1sk\u00f3dja&#8230;), de a jelek szerint messagekkel, mert pont azokat blokkolj\u00e1k az integrity levelekben k\u00fcl\u00f6nb\u00f6z\u0151 processzek k\u00f6z\u00f6tt.<\/p>\n<p>Ez\u00e9rt ha Low Integrity alatt fut\u00f3 folyamat OutputDebugStringj\u00e9t akarom megn\u00e9zni, akkor Low-ban ind\u00edtom el a Debugview-t. De hogyan? A <a target=\"_blank\" href=\"http:\/\/msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/ietechcol\/dnwebgen\/protectedmode.asp\">kor\u00e1bbi cikkben<\/a> van egy kis k\u00f3dr\u00e9szlet, ami megmutatja hogyan kell Low-ban elind\u00edtani egy \u00faj processzt. Az ott tal\u00e1lhat\u00f3 k\u00f3dot beraktam egy kis console appban, \u00edgy LI ize.exe-vel m\u00e1ris b\u00e1rmit el tudok ind\u00edtani low integrity levelen.<br \/>\nPontosan a k\u00f6vetkez\u0151ket befoly\u00e1solja a protected m\u00f3d a User Interface Privilege Isolation (UIPI)-re \u00e9p\u00edtve:<\/p>\n<p>A lower privilege process cannot:<\/p>\n<ul>\n<li>Perform a window handle validation of higher process privilege.<\/li>\n<li>SendMessage or PostMessage to higher privilege application windows. These application programming interfaces (APIs) return success but silently drop the window message.<\/li>\n<li>Use thread hooks to attach to a higher privilege process.<\/li>\n<li>Use Journal hooks to monitor a higher privilege process.<\/li>\n<li>Perform dynamic link library (DLL)\u2013injection to a higher privilege process.<\/li>\n<\/ul>\n<p>With UIPI enabled, the following shared USER resources are still shared between processes at different privilege levels.<\/p>\n<ul>\n<li>Desktop window, which actually owns the screen surface<\/li>\n<li>Desktop heap read-only shared memory<\/li>\n<li>Global atom table<\/li>\n<li>Clipboard<\/li>\n<\/ul>\n<p>Sz\u00f3val a clipboard m\u00e9g oszott, sz\u00e9p is lenne, nem lehetne m\u00e1solni az IE-b\u0151l pl. notepadba kopipaszt\u00e1val.<\/p>\n<p>Ez \u00fagy n\u00e9z ki, hogy ha l\u00e9trehozol pl. egy megnevezett mutexet egy 200-as sz\u00e1lban, \u00e9s azt el akarod \u00e9rni egy 100-as integrity level\u0171 k\u00f3db\u00f3l, akkor access denied-ot kapsz. Az\u00e9rt, mert ha nincs ACL az er\u0151forr\u00e1son, akkor azt \u00fagy \u00e9rtelmezi a Vista, mitha egy 200 vagy e f\u00f6l\u00f6ttieket beenged\u0151 ACL lenne rajta (r\u00e9szben <a target=\"_blank\" href=\"http:\/\/soci.hu\/blog\/index.php\/2006\/10\/18\/vista-ie-protected-mode\/\">\u00edrtam<\/a> m\u00e1r err\u0151l).<br \/>\nCsak \u00fagy f\u00e9rhet hozz\u00e1 a 100-as sz\u00e1l a 200-as \u00e1ltal l\u00e9trehozott glob\u00e1lis er\u0151forr\u00e1shoz, ha az er\u0151sebb sz\u00e1l k\u00e9zzel r\u00e1rak egy olyan ACL-t, ami beengedi a 100-asokat. De mif\u00e9le ACL ez, hisz tudjuk, hogy csak DACL van, ami J\u00f3zsinak ad read jogot mondjuk egy file eset\u00e9n, vagy az SACL, ami az auditok ig\u00e9ny\u00e9t t\u00e1rolja. Nos, az SACL-t b\u0151v\u00edtett\u00e9k ki, az Integrity leveleket itt t\u00e1rolj\u00e1k.<\/p>\n<p>Szopat\u00f3s a Vista, belek\u00f6p t\u00f6bb ponton az appok \u00e9let\u00e9be, de j\u00f3l teszi, v\u00e9gre l\u00e1tszik, hogy komolyan vett\u00e9k a secut az msn\u00e9l. Persze, a Windows 2003 az XP SP2 m\u00e1r j\u00f3l l\u00e1that\u00f3an ebbe az ir\u00e1nyba ment el, de most befoltoztak olyan arhitektur\u00e1lis likat is, mint amilyen a mindenki k\u00fcldhet mindenkinek \u00fczenetb\u0151l fakadt.<\/p>\n<p>Ja, \u00e9s m\u00e9g egy tapasztalat. Low, azaz 100-as Integrity level eset\u00e9n virtualiz\u00e1lj\u00e1k a file \u00e9s reg hozz\u00e1f\u00e9r\u00e9st is, ez\u00e9rt sz\u00e1m\u00edt, hogy ha neked csak read jog kell valamihez, akkor t\u00e9nyleg azt k\u00e9rj, ne read write-ot. Gyakori, hogy az ember laz\u00e1n lek\u00e9r egy all accesses handle-t, pedig csak read kellett volna. Az ilyen akci\u00f3k k\u00f6nnyen b\u00fcntivel v\u00e9gzik Vist\u00e1ban. M\u00e9g jobban \u00e9szn\u00e9l kell lenni programoz\u00e1skor, ez a secu \u00e1ra. De legal\u00e1bb prec\u00edzebb munk\u00e1ra k\u00e9nyszer\u00edt.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Huncut dolog ez az IE7 v\u00e9dett m\u00f3d, illetve a m\u00f6g\u00f6tte lev\u0151 technol\u00f3gi\u00e1k (csak Vist\u00e1n, XP-n nem). Ha egy process Integrity Levelje mondjuk&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,22,23],"tags":[],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-szakmai-elet","category-security","category-vista"],"_links":{"self":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=152"}],"version-history":[{"count":0,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/152\/revisions"}],"wp:attachment":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}