{"id":8703,"date":"2023-09-03T18:00:04","date_gmt":"2023-09-03T18:00:04","guid":{"rendered":"https:\/\/www.hexacorn.com\/blog\/?p=8703"},"modified":"2023-09-03T22:13:42","modified_gmt":"2023-09-03T22:13:42","slug":"the-secret-of-961c151d2e87f2686a955a9be24d316f1362bf21","status":"publish","type":"post","link":"https:\/\/www.hexacorn.com\/blog\/2023\/09\/03\/the-secret-of-961c151d2e87f2686a955a9be24d316f1362bf21\/","title":{"rendered":"The secret of 961c151d2e87f2686a955a9be24d316f1362bf21"},"content":{"rendered":"\n<p>I recently came across a malware sample that included the following, mysterious string:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>961c151d2e87f2686a955a9be24d316f1362bf21 &#91;digit].&#91;digit].&#91;digit]<\/code><\/pre>\n\n\n\n<p>There are a few versions of this strings out there (extracted from a few malware samples downloaded in 2023):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">961c151d2e87f2686a955a9be24d316f1362bf21 2.1.1\n961c151d2e87f2686a955a9be24d316f1362bf21 3.5.0\n961c151d2e87f2686a955a9be24d316f1362bf21 3.6.1\n961c151d2e87f2686a955a9be24d316f1362bf21 3.9.1\n961c151d2e87f2686a955a9be24d316f1362bf21 3.11.2<\/pre>\n\n\n\n<p>The way this string is formed triggered my curiosity &#8211; it kinda looked like someone was using this hash on purpose to track the use of their code. So, I googled around and not only <a href=\"https:\/\/www.google.com\/search?q=961c151d2e87f2686a955a9be24d316f1362bf21\">found<\/a> a few more occurrences of this string, but also found a <a href=\"https:\/\/www.mnemo.com\/wp-content\/uploads\/2022\/03\/BOLETIN_ESP_ENE22.pdf\">yara rule<\/a> (PDF warning) that referenced it. <\/p>\n\n\n\n<p>I had to know where it came from. <\/p>\n\n\n\n<p>Due to its length, I obviously suspected it is a SHA1 hash, but couldn&#8217;t figure out what secret text was hashed to create it. Eventually, I just <a href=\"https:\/\/github.com\/nlohmann\/json\/discussions\/4123#discussion-5559164\">asked<\/a> \ud83d\ude42<\/p>\n\n\n\n<p>The answer turned out to be pretty simple:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">echo \"JSON for Modern C++\" | sha1sum<\/pre>\n\n\n\n<p>Thanks to <a href=\"https:\/\/github.com\/nlohmann\">Niels<\/a> for revealing the secret \ud83d\ude42<\/p>\n\n\n\n<p>Two lessons from this little exercise:<\/p>\n\n\n\n<ul>\n<li>If you don&#8217;t know, just ask<\/li>\n\n\n\n<li>When you write Yara rules, make sure you are not using &#8216;clean&#8217; strings<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I recently came across a malware sample that included the following, mysterious string: There are a few versions of this strings out there (extracted from a few malware samples downloaded in 2023): 961c151d2e87f2686a955a9be24d316f1362bf21 2.1.1 961c151d2e87f2686a955a9be24d316f1362bf21 3.5.0 961c151d2e87f2686a955a9be24d316f1362bf21 3.6.1 961c151d2e87f2686a955a9be24d316f1362bf21 3.9.1 &hellip; <a href=\"https:\/\/www.hexacorn.com\/blog\/2023\/09\/03\/the-secret-of-961c151d2e87f2686a955a9be24d316f1362bf21\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[53,83],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/8703"}],"collection":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/comments?post=8703"}],"version-history":[{"count":9,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/8703\/revisions"}],"predecessor-version":[{"id":8712,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/8703\/revisions\/8712"}],"wp:attachment":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/media?parent=8703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/categories?post=8703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/tags?post=8703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}