{"id":28110,"date":"2019-08-26T06:09:10","date_gmt":"2019-08-26T10:09:10","guid":{"rendered":"https:\/\/www.kaspersky.com\/blog\/?p=28110"},"modified":"2021-05-14T09:44:51","modified_gmt":"2021-05-14T13:44:51","slug":"kaspersky-sandbox-patent","status":"publish","type":"post","link":"https:\/\/www.kaspersky.com\/blog\/kaspersky-sandbox-patent\/28110\/","title":{"rendered":"A honeytrap for malware"},"content":{"rendered":"<p>I haven\u2019t seen the sixth\u00a0<em><a href=\"https:\/\/en.wikipedia.org\/wiki\/Mission:_Impossible_%2525E2%252580%252593_Fallout\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">Mission Impossible<\/a><\/em>\u00a0movie, and I don\u2019t think I will. I sat through the fifth \u2014 in suitably zombified state, returning home on a long-haul flight after a tough week\u2019s business \u2014 but only because one scene in it was shot in our shiny new modern\u00a0<a href=\"https:\/\/eugene.kaspersky.com\/2015\/09\/03\/mission-impossible-5-in-klondon\/\" target=\"_blank\" rel=\"noopener noreferrer\">London office<\/a>. And that was one <em>Mission Impossible<\/em> installment too many, really. Nope \u2014 not for me. Slap, bang, smash, crash, pow, wow. Oof. Nah, I prefer\u00a0<a href=\"https:\/\/eugene.kaspersky.com\/tag\/evening-poster\/\" target=\"_blank\" rel=\"noopener noreferrer\">something<\/a>\u00a0a little more challenging, thought-provoking and just plain interesting. After all, I have precious little time as it is!<\/p>\n<p>I really am giving Tom Cruise and Co. a major dissing here, aren\u2019t I? But hold on. I have to give them their due for at least one scene done really rather well (i.e., thought-provoking and plain interesting!). It\u2019s the one where the good guys need to get a bad guy to rat on his bad-guy colleagues, or something like that. So they set up a fake environment in a \u201chospital\u201d with \u201cCNN\u201d on the \u201cTV\u201d broadcasting a news report about atomic Armageddon. Suitably satisfied his apocalyptic manifesto has been broadcast to the world, the baddie gives up his pals (or was it a login code?) in the deal arranged with his interrogators. Oops.\u00a0<a href=\"https:\/\/www.youtube.com\/watch?v=hhLIwmgx3vI\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">Here\u2019s the clip<\/a>.<\/p>\n<p>Why do I like this scene so much? Because, actually, it demonstrates really well one of the methods of detecting \u2026 previously unseen cyberthreats! There are in fact many such methods \u2014 they vary depending on area of application, effectiveness, resource use, and other parameters (I\u00a0<a href=\"https:\/\/eugene.kaspersky.com\/tag\/technology\/\" target=\"_blank\" rel=\"noopener noreferrer\">write<\/a>\u00a0about them regularly here). But one always seems to stand out:\u00a0<a href=\"https:\/\/encyclopedia.kaspersky.com\/glossary\/emulation\/\" target=\"_blank\" rel=\"noopener noreferrer\">emulation<\/a>\u00a0(about which I\u2019ve also written\u00a0<a href=\"https:\/\/www.kaspersky.com\/blog\/emulator-technology\/27070\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">plenty<\/a>\u00a0here before).<\/p>\n<p>As in the <em>MI<\/em> movie, an emulator launches the object being investigated in an isolated, artificial environment, which encourages it to reveal its maliciousness.<\/p>\n<p>But there\u2019s one serious downside to such an approach \u2014 the very fact that the environment is artificial. The emulator does its best to make that artificial environment seem as much as possible like a real operating system environment, but ever-increasingly smart malware still manages to distinguish it from the real thing \u2014 and then the emulator sees how the malware recognized it, regroups and improves its emulation, and on and on in a never-ending cycle that regularly opens the window of vulnerability on a protected computer. The fundamental problem is that no emulator has yet been the spitting image of a real OS.<\/p>\n<p>On the other hand, there\u2019s another option for tackling the behavioral analysis of suspicious objects: analysis \u2014 on a\u00a0<em>real<\/em>\u00a0operating system \u2014 one on a virtual machine. Well, why not? If the emulator never quite fully cuts it, let a real, albeit virtual, machine have a go! It would be the ideal \u201cinterrogation\u201d \u2014 conducted in a real environment, not an artificial one, but with no real negative consequences.<\/p>\n<p>On hearing about this concept, some may rush to ask why no one thought of it before. After all, virtualisation has been in the tech-mainstream since 1992. Well, as it turns out, it\u2019s not so simple.<\/p>\n<p>First, analyzing suspicious objects in a virtual machine is a resource-intensive process, suited only to heavyweight enterprise-grade security solutions, where scanning needs to be super-intensive so that absolutely zero maliciousness gets through the defenses. Alas, for home computers, let alone smartphones, this technology isn\u2019t suitable \u2014 yet.<\/p>\n<p>Second, such things actually do exist. In fact, we already use this technology \u2014 internally, here at the\u00a0<em>K<\/em>ompany \u2014 for internal investigations. But in terms of market-ready products, not many are available yet. Competitors have released similar products, but their effectiveness leaves a lot to be desired. As a rule, such products are limited to just collecting logs and basic analysis.<\/p>\n<p>Third, launching a file on a virtual machine is just the beginning of a very long and tricky process. After all, the aim of the exercise is to have the maliciousness of an object reveal itself, and for that you need a smart hypervisor, behavior logging and analysis, constant fine-tuning of the templates of dangerous actions, protection from anti-emulation tricks, execution optimization, and much more.<\/p>\n<p>Here I can say without false modesty that we truly are way ahead \u2014 of the whole planet!<\/p>\n<p>Recently we were granted a U.S. patent (<a href=\"https:\/\/pdfpiw.uspto.gov\/.piw?PageNum=0&amp;docid=10339301\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">US10339301<\/a>) covering the creation of a suitable environment for a virtual machine for conducting deep, rapid analysis of suspicious objects. Here\u2019s how it works:<\/p>\n<ul>\n<li>Virtual machines are created (for different types of objects) with settings that ensure both their optimal execution and a maximally high detection rate.<\/li>\n<li>The hypervisor of a virtual machine works in tandem with system logging of an object\u2019s behavior and system analysis thereof, helped by updatable databases of templates of suspicious behavior, heuristics, the logic of reactions to actions, and more.<\/li>\n<li>Should suspicious actions be detected, the analysis system enters on-the-fly changes to the process of execution of the object on a virtual machine to encourage the object to show its malicious intentions. For example, the system can create files, amend the registry, speed up time, and so on.<\/li>\n<\/ul>\n<p>That last point \u2014 the third \u2014 is the most unique and delicious feature of our technology. Let me give you an example to show you how it works.<\/p>\n<p>The system detects a launched file has \u201cfallen asleep\u201d and no longer manifests any activity. That\u2019s because the object can be programmed to quietly do nothing for several (dozen) minutes (hours) until the beginning of malicious activity. When it starts its do-nothing thing, we speed up time on-the-fly inside the virtual machine so that it passes one, three, five and up to a gazillion minutes per second. The functionality of the file being analyzed doesn\u2019t change, while the time of the wait is lowered by hundreds (or thousands) of times. And if, after its \u201csnooze,\u201d the malware decides to check the system clock (has it been ticking?), it will be fooled into thinking it has, and continue with its malicious mission \u2014 exposing itself in the process.<\/p>\n<p>Another example:<\/p>\n<p>The object uses a vulnerability in a specific library or tries to change the contents of a file or registry. At first, with the help of the regular\u00a0<em>fopen()<\/em>\u00a0function, it tries to open the library (or file or registry), and if it fails to do so (there\u2019s no library, or no access rights to the file) \u2014 then it simply gives up. In such a scenario we change (on the fly) the return value of the\u00a0<em>fopen()<\/em>\u00a0function from \u201cfile absent\u201d to \u201cfile exists\u201d (or, if necessary, we create the file itself and fill it with appropriate content), then we simply observe what the object does.<\/p>\n<p>Such an approach also works really well in conditions of logic trees of an object\u2019s behavior. For example: if there exist file A and file B, then file C is modified and the job\u2019s finished. However, it\u2019s not known what the program being investigated will do if only one of either file A or file B exists. Therefore, we launch an iteration in parallel and tell the suspect program that file A exists but B doesn\u2019t, then we analyze the further logic-tree activity.<\/p>\n<p>What\u2019s important to note is that the rules of reaction to execution of the file are configured by external, easily updatable databases. You don\u2019t need to redevelop the whole engine to add new logic, just correctly describe the multitude of possible scenarios of malicious behavior and perform a one-click update.<\/p>\n<p>And that, in a nutshell, is how this technology works. It will soon be added to\u00a0<a href=\"https:\/\/eugene.kaspersky.com\/2016\/03\/16\/the-big-picture\/\" target=\"_blank\" rel=\"noopener noreferrer\">KATA<\/a>, and also delivered to the market as a stand-alone solution for enterprise,\u00a0<a href=\"https:\/\/www.kaspersky.com\/enterprise-security\/wiki-section\/products\/sandbox\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">Kaspersky Sandbox<\/a>.<\/p>\n<input type=\"hidden\" class=\"category_for_banner\" value=\"glossary\">\n","protected":false},"excerpt":{"rendered":"<p>Eugene Kaspersky explains how Kaspersky Sandbox uses virtual machines to thoroughly examine malware\u2019s behavior.<\/p>\n","protected":false},"author":13,"featured_media":28111,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1999,3051],"tags":[499,2736,3444,2395,2901,3445],"class_list":{"0":"post-28110","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-business","8":"category-enterprise","9":"tag-apt","10":"tag-kaspersky-anti-targeted-attack","11":"tag-kaspersky-sandbox","12":"tag-kata","13":"tag-sandbox","14":"tag-targeted-threats"},"hreflang":[{"hreflang":"x-default","url":"https:\/\/www.kaspersky.com\/blog\/kaspersky-sandbox-patent\/28110\/"},{"hreflang":"en-in","url":"https:\/\/www.kaspersky.co.in\/blog\/kaspersky-sandbox-patent\/16561\/"},{"hreflang":"en-ae","url":"https:\/\/me-en.kaspersky.com\/blog\/kaspersky-sandbox-patent\/13953\/"},{"hreflang":"en-us","url":"https:\/\/usa.kaspersky.com\/blog\/kaspersky-sandbox-patent\/18500\/"},{"hreflang":"en-gb","url":"https:\/\/www.kaspersky.co.uk\/blog\/kaspersky-sandbox-patent\/16593\/"},{"hreflang":"es-mx","url":"https:\/\/latam.kaspersky.com\/blog\/kaspersky-sandbox-patent\/15234\/"},{"hreflang":"es","url":"https:\/\/www.kaspersky.es\/blog\/kaspersky-sandbox-patent\/19141\/"},{"hreflang":"it","url":"https:\/\/www.kaspersky.it\/blog\/kaspersky-sandbox-patent\/17874\/"},{"hreflang":"ru","url":"https:\/\/www.kaspersky.ru\/blog\/kaspersky-sandbox-patent\/23452\/"},{"hreflang":"fr","url":"https:\/\/www.kaspersky.fr\/blog\/kaspersky-sandbox-patent\/12181\/"},{"hreflang":"pt-br","url":"https:\/\/www.kaspersky.com.br\/blog\/kaspersky-sandbox-patent\/12289\/"},{"hreflang":"pl","url":"https:\/\/plblog.kaspersky.com\/kaspersky-sandbox-patent\/11123\/"},{"hreflang":"de","url":"https:\/\/www.kaspersky.de\/blog\/kaspersky-sandbox-patent\/20026\/"},{"hreflang":"ja","url":"https:\/\/blog.kaspersky.co.jp\/kaspersky-sandbox-patent\/23986\/"},{"hreflang":"nl","url":"https:\/\/www.kaspersky.nl\/blog\/kaspersky-sandbox-patent\/24211\/"},{"hreflang":"ru-kz","url":"https:\/\/blog.kaspersky.kz\/kaspersky-sandbox-patent\/18923\/"},{"hreflang":"en-au","url":"https:\/\/www.kaspersky.com.au\/blog\/kaspersky-sandbox-patent\/23282\/"},{"hreflang":"en-za","url":"https:\/\/www.kaspersky.co.za\/blog\/kaspersky-sandbox-patent\/23193\/"}],"acf":[],"banners":"","maintag":{"url":"https:\/\/www.kaspersky.com\/blog\/tag\/kaspersky-anti-targeted-attack\/","name":"Kaspersky Anti Targeted Attack"},"_links":{"self":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/28110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/comments?post=28110"}],"version-history":[{"count":4,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/28110\/revisions"}],"predecessor-version":[{"id":39933,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/28110\/revisions\/39933"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/media\/28111"}],"wp:attachment":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/media?parent=28110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/categories?post=28110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/tags?post=28110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}