{"id":41614,"date":"2020-02-13T20:48:26","date_gmt":"2020-02-13T17:48:26","guid":{"rendered":"https:\/\/prohoster.info\/blog\/blog_prohoster\/ohotimsya-na-tehniki-i-taktiki-atakuyushhih-s-ispolzovaniem-prefetch-fajlov"},"modified":"2020-02-13T20:48:26","modified_gmt":"2020-02-13T17:48:26","slug":"ohotimsya-na-tehniki-i-taktiki-atakuyushhih-s-ispolzovaniem-prefetch-fajlov","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/ohotimsya-na-tehniki-i-taktiki-atakuyushhih-s-ispolzovaniem-prefetch-fajlov","title":{"rendered":"Hunting for techniques and tactics of attackers using Prefetch files","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"Hunting for techniques and tactics of attackers using Prefetch files\" src=\"\/wp-content\/uploads\/2020\/02\/96e4b61d527ce7cb904f663b763ac9aa.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nTrace files, or Prefetch files, have been around in Windows since the XP era. Since then, they have assisted digital forensics and computer incident response specialists in tracking the execution traces of programs, including malicious ones. Leading computer forensics expert at Group-IB, <b>Oleg Skulkin<\/b> explains what can be found using Prefetch files and how to do it.<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>Prefetch files are stored in the directory <b>%SystemRoot%Prefetch<\/b> and are used to speed up program launch processes. If we take a look at any of these files, we will see that its name consists of two parts: the name of the executable file and a checksum derived from its path, which consists of eight characters.<\/p>\n<p>Prefetch files contain a wealth of information from a forensic standpoint: the name of the executable file, the number of launches, lists of files and directories interacted with by the executable file, and, of course, timestamps. Forensic specialists typically use the creation date of a particular Prefetch file to determine the date of the program's first launch. Additionally, these files store the last launch date and, starting from version 26 (Windows 8.1), timestamps for the seven most recent launches.<\/p>\n<p>Let's take one of the Prefetch files, extract the data using PECmd by Eric Zimmermann, and examine each part. For demonstration, I will extract data from the file <b>CCLEANER64.EXE-DE05DBE1.pf<\/b>.<\/p>\n<p>So, let's start from the top. Of course, we have timestamps for the creation, modification, and access of the file:<\/p>\n<p><img decoding=\"async\" alt=\"Hunting for techniques and tactics of attackers using Prefetch files\" src=\"\/wp-content\/uploads\/2020\/02\/5308f36909b8e0c2fb2280f8e4505334.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nFollowing those are the executable file name, checksum of its path, size of the executable file, and the version of the Prefetch file:<\/p>\n<p><img decoding=\"async\" alt=\"Hunting for techniques and tactics of attackers using Prefetch files\" src=\"\/wp-content\/uploads\/2020\/02\/b08151447a967d5770205b1870669e44.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nSince we are dealing with Windows 10, next we will see the number of launches, date and time of the last launch, and seven additional timestamps indicating previous launch dates:<\/p>\n<p><img decoding=\"async\" alt=\"Hunting for techniques and tactics of attackers using Prefetch files\" src=\"\/wp-content\/uploads\/2020\/02\/ba2eee3c6514fe595553452a20294893.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nNext is the volume information, including its serial number and creation date:<\/p>\n<p><img decoding=\"async\" alt=\"Hunting for techniques and tactics of attackers using Prefetch files\" src=\"\/wp-content\/uploads\/2020\/02\/190dcad09d2839e22a679fb3aa8cfe3c.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nAnd last but not least is the list of directories and files that the executable file interacted with: <\/p>\n<p><img decoding=\"async\" alt=\"Hunting for techniques and tactics of attackers using Prefetch files\" src=\"\/wp-content\/uploads\/2020\/02\/9a238c90b4ab21d2a536f980d897d81d.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nToday, I want to focus on the directories and files that the executable file interacted with. It's this data that allows digital forensics specialists, incident responders, or proactive threat hunters to not only establish the execution of a file but also, in some cases, reconstruct the specific tactics and techniques used by attackers. Nowadays, cybercriminals often use tools to irretrievably delete data, such as SDelete, so the ability to recover at least traces of tactics and techniques is essential for any modern defender\u2014a computer forensics expert, incident response specialist, or Threat Hunter expert.<\/p>\n<p>Let's start with the tactic Initial Access (TA0001) and the most popular technique\u2014Spearphishing Attachment (T1193). Some cybercriminal groups take a creative approach to choosing such attachments. For instance, the Silence group has used CHM files (Microsoft Compiled HTML Help) for this purpose. This brings us to another technique\u2014Compiled HTML File (T1223). Such files are executed using <b>hh.exe<\/b>, and if we extract data from its Prefetch file, we will learn which specific file was opened by the victim:<\/p>\n<p><img decoding=\"async\" alt=\"Hunting for techniques and tactics of attackers using Prefetch files\" src=\"\/wp-content\/uploads\/2020\/02\/d7b807fd1b90847996455306cea2cb8f.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nLet's continue working with real case examples and move to the next tactic Execution (TA0002) and the technique CSMTP (T1191). The Microsoft Connection Manager Profile Installer (CMSTP.exe) can be used by attackers to run malicious scripts. A good example is the Cobalt group. If we extract data from the Prefetch file <b>cmstp.exe<\/b>, we will again find out what was executed:<\/p>\n<p><img decoding=\"async\" alt=\"Hunting for techniques and tactics of attackers using Prefetch files\" src=\"\/wp-content\/uploads\/2020\/02\/328c193e00af4c31566b19826f75c0a2.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nAnother popular technique is Regsvr32 (T1117). <b>Regsvr32.exe<\/b> is also frequently used by attackers for execution. Here's another example from the Cobalt group: if we extract data from the Prefetch file <b>regsvr32.exe<\/b>, we will again see what was executed:<\/p>\n<p><img decoding=\"async\" alt=\"Hunting for techniques and tactics of attackers using Prefetch files\" src=\"\/wp-content\/uploads\/2020\/02\/7626266c1215902d03ded817d7342a30.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nThe next tactics are Persistence (TA0003) and Privilege Escalation (TA0004), as well as Application Shimming (T1138) as a technique. This technique was used by Carbanak\/FIN7 for persistence in the system. Typically, to work with databases containing program compatibility information (.sdb), the tool used is <b>sdbinst.exe<\/b>. Therefore, the Prefetch file of this executable can help us identify the names and locations of such databases:<\/p>\n<p><img decoding=\"async\" alt=\"Hunting for techniques and tactics of attackers using Prefetch files\" src=\"\/wp-content\/uploads\/2020\/02\/22d1599bbe9fe1d2f48ced0548b07e68.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nAs shown in the illustration, we have not only the name of the file used for installation but also the name of the installed database.<\/p>\n<p>Let\u2019s take a look at one of the most typical examples of network exploitation (TA0008) \u2014 PsExec, which utilizes administrative shares (T1077). A service named PSEXECSVC (of course, any other name can be used if the attackers specify it) <b>-r<\/b>) will be created on the target system, therefore if we extract data from the Prefetch file, we will see that it was executed:<\/p>\n<p><img decoding=\"async\" alt=\"Hunting for techniques and tactics of attackers using Prefetch files\" src=\"\/wp-content\/uploads\/2020\/02\/a416b17ae7e9d2c155e0d47062ebdda8.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nI will conclude, perhaps, with what I started \u2014 file deletion (T1107). As I mentioned earlier, many attackers use SDelete for permanent file deletion at different stages of the attack lifecycle. If we look at the data from the Prefetch file <b>sdelete.exe<\/b>, we will see what exactly was deleted:<\/p>\n<p><img decoding=\"async\" alt=\"Hunting for techniques and tactics of attackers using Prefetch files\" src=\"\/wp-content\/uploads\/2020\/02\/8a1ab986ed0274fea2d9a95d1f8fd186.jpeg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Of course, this is not an exhaustive list of techniques that can be detected during Prefetch file analysis, but it should be enough to understand that such files can help not only to find traces of execution but also to reconstruct the specific tactics and techniques of the attackers.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/group-ib\/blog\/487516\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0424\u0430\u0439\u043b\u044b \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438, \u0438\u043b\u0438 Prefetch-\u0444\u0430\u0439\u043b\u044b, \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 Windows \u0435\u0449\u0435 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d XP. \u0421 \u0442\u0435\u0445 \u043f\u043e\u0440 \u043e\u043d\u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c \u043f\u043e \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043a\u0440\u0438\u043c\u0438\u043d\u0430\u043b\u0438\u0441\u0442\u0438\u043a\u0435 \u0438 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0435 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0445. \u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043f\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u043a\u0440\u0438\u043c\u0438\u043d\u0430\u043b\u0438\u0441\u0442\u0438\u043a\u0435 Group-IB \u041e\u043b\u0435\u0433 \u0421\u043a\u0443\u043b\u043a\u0438\u043d \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Prefetch-\u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. Prefetch-\u0444\u0430\u0439\u043b\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":41615,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-41614","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0424\u0430\u0439\u043b\u044b.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/ohotimsya-na-tehniki-i-taktiki-atakuyushhih-s-ispolzovaniem-prefetch-fajlov\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041e\u0445\u043e\u0442\u0438\u043c\u0441\u044f \u043d\u0430 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u0438 \u0442\u0430\u043a\u0442\u0438\u043a\u0438 \u0430\u0442\u0430\u043a\u0443\u044e\u0449\u0438\u0445 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Prefetch-\u0444\u0430\u0439\u043b\u043e\u0432 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0424\u0430\u0439\u043b\u044b.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/ohotimsya-na-tehniki-i-taktiki-atakuyushhih-s-ispolzovaniem-prefetch-fajlov\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-02-13T17:48:26+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-02-13T17:48:26+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Hunting Techniques and Tactics of Attackers Using Prefetch Files | ProHoster","description":"Files.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/ohotimsya-na-tehniki-i-taktiki-atakuyushhih-s-ispolzovaniem-prefetch-fajlov","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041e\u0445\u043e\u0442\u0438\u043c\u0441\u044f \u043d\u0430 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u0438 \u0442\u0430\u043a\u0442\u0438\u043a\u0438 \u0430\u0442\u0430\u043a\u0443\u044e\u0449\u0438\u0445 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Prefetch-\u0444\u0430\u0439\u043b\u043e\u0432 | ProHoster","og:description":"\u0424\u0430\u0439\u043b\u044b.","og:url":"https:\/\/prohoster.info\/en\/blog\/ohotimsya-na-tehniki-i-taktiki-atakuyushhih-s-ispolzovaniem-prefetch-fajlov","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-02-13T17:48:26+00:00","article:modified_time":"2020-02-13T17:48:26+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"41614","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 00:13:40","updated":"2022-09-28 14:43:35","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/41614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=41614"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/41614\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/41615"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=41614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=41614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=41614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}