{"id":74,"date":"2018-01-11T09:17:24","date_gmt":"2018-01-11T09:17:24","guid":{"rendered":"http:\/\/piratesecurityblog.com\/?p=74"},"modified":"2018-03-11T09:20:00","modified_gmt":"2018-03-11T09:20:00","slug":"kernel-injecting-trojan-was-found-in-the-wild-by-kaspersky-from-securelist-com","status":"publish","type":"post","link":"https:\/\/piratesecurityblog.com\/?p=74","title":{"rendered":"Lamberts Toolkit &#8211; kernel injecting trojan was found in the wild by kaspersky (from securelist.com)"},"content":{"rendered":"<p>post originally taken from here:\u00a0https:\/\/securelist.com\/unraveling-the-lamberts-toolkit\/77990\/<\/p>\n<p>&nbsp;<\/p>\n<p>Yesterday, our colleagues from\u00a0<a href=\"https:\/\/www.symantec.com\/connect\/blogs\/longhorn-tools-used-cyberespionage-group-linked-vault-7\">Symantec published their analysis of Longhorn<\/a>, an advanced threat actor that can be easily compared with Regin, ProjectSauron, Equation or Duqu2 in terms of its complexity.<\/p>\n<p>Longhorn, which we internally refer to as \u201cThe Lamberts\u201d, first came to the attention of the ITSec community in 2014, when our colleagues from\u00a0<a href=\"https:\/\/www.fireeye.com\/blog\/threat-research\/2014\/10\/two-targeted-attacks-two-new-zero-days.html\">FireEye discovered an attack using a zero day vulnerability (CVE-2014-4148)<\/a>. The attack leveraged malware we called \u2018BlackLambert\u2019, which was used to target a high profile organization in Europe.<\/p>\n<p>Since at least 2008, The Lamberts have used multiple sophisticated attack tools against high-profile victims. Their arsenal includes network-driven backdoors, several generations of modular backdoors, harvesting tools, and wipers. Versions for both Windows and OSX are known at this time, with the latest samples created in 2016.<\/p>\n<p>Although the operational security displayed by actors using the Lamberts toolkit is very good, one sample includes a PDB path that points to a project named \u201cArchan~1\u201d (perhaps \u2018Archangel\u2019). The root folder on the PDB path is named \u201cHudson\u201d. This is one of the very few mistakes we\u2019ve seen with this threat actor.<\/p>\n<p>While in most cases the infection vector remains unknown, the high profile attack from 2014 used a very complex Windows TTF zero-day exploit (CVE-2014-4148).<\/p>\n<p>Kaspersky Lab products successfully detect and eradicate all the known malware from the Lamberts family. For more information please contact:\u00a0<a href=\"mailto:intelreports@kaspersky.com\">intelreports@kasperskycom<\/a><\/p>\n<h2 id=\"an-overview-of-the-lamberts\">An Overview of the Lamberts<\/h2>\n<p><a class=\"magnificImage\" href=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180108\/lamberts_discovery.png\"><img loading=\"lazy\" class=\"alignnone wp-image-78018\" src=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180108\/lamberts_discovery-1024x103.png\" alt=\"\" width=\"593\" height=\"60\" \/><\/a><\/p>\n<p><i>Figure 1. Lamberts discovery timeline<\/i><\/p>\n<p>The first time the Lambert family malware was uncovered publicly was in October 2014, when FireEye\u00a0<a href=\"https:\/\/www.fireeye.com\/blog\/threat-research\/2014\/10\/two-targeted-attacks-two-new-zero-days.html\" target=\"_blank\" rel=\"noopener\">posted<\/a>\u00a0a blog about a zero day exploit (CVE-2014-4148) used in the wild. The vulnerability was patched by Microsoft at the same time. We named the malware involved \u2018Black Lambert\u2019 and described it thoroughly in a private report, available to Kaspersky APT Intel Reports subscribers.<\/p>\n<p>The authors of Black Lambert included a couple of very interesting details in the sample, which read as the following:\u00a0<b>toolType=wl<\/b>,\u00a0<b>build=132914<\/b>,\u00a0<b>versionName = 2.0.0<\/b>. Looking for similar samples, we were able to identify another generation of related tools which we called White Lambert. While Black Lambert connects directly to its C&amp;C for instructions, White Lambert is a fully passive, network-driven backdoor.<\/p>\n<div align=\"center\">\n<table border=\"0\" width=\"80%\">\n<tbody>\n<tr>\n<td><\/td>\n<td>Black Lambert<\/td>\n<td>White Lambert<\/td>\n<\/tr>\n<tr>\n<td>Implant type<\/td>\n<td>Active<\/td>\n<td>Passive<\/td>\n<\/tr>\n<tr>\n<td>toolType<\/td>\n<td>wl<\/td>\n<td>aa (\u201cArchAngel\u201d)<\/td>\n<\/tr>\n<tr>\n<td>build<\/td>\n<td>132914<\/td>\n<td>113140<\/td>\n<\/tr>\n<tr>\n<td>versionName<\/td>\n<td>2.0.0<\/td>\n<td>5.0.2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><i>Internal configuration similarities in Black and White Lambert<\/i><\/p>\n<p>White Lambert runs in kernel mode and intercepts network traffic on infected machines. It decrypts packets crafted in a special format to extract instructions. We named these passive backdoors \u2018White Lambert\u2019 to contrast with the active \u201cBlack Lambert\u201d implants.<\/p>\n<p>Looking further for any other malware related to White Lambert and Black Lambert, we came by another generation of malware that we called Blue Lambert.<\/p>\n<p>One of the Blue Lambert samples is interesting because it appears to have been used as second stage malware in a high profile attack, which involved the Black Lambert malware.<\/p>\n<p>Looking further for malware similar to Blue Lambert, we came by another family of malware we called Green Lambert. Green Lambert is a lighter, more reliable, but older version of Blue Lambert. Interestingly, while most Blue Lambert variants have version numbers in the range of 2.x, Green Lambert is mostly in 3.x versions. This stands in opposition to the data gathered from export timestamps and C&amp;C domain activity that points to Green Lambert being considerably older than the Blue variant. Perhaps both Blue and Green Lamberts have been developed in parallel by two different teams working under the same umbrella, as normal software version iterations, with one seeing earlier deployment than the other.<\/p>\n<p>Signatures created for Green Lambert (Windows) have also triggered on an OS X variant of Green Lambert, with a very low version number: 1.2.0. This was uploaded to a multiscanner service in September 2014. The OS X variant of Green Lambert is in many regards functionally identical to the Windows version, however it misses certain functionality such as running plugins directly in memory.<\/p>\n<p>Kaspersky Lab detections for Blue, Black, and Green Lamberts have been triggered by a relatively small set of victims from around the world. While investigating one of these infections involving White Lambert (network-driven implant) and Blue Lambert (active implant), we found yet another family of tools that appear to be related. We called this new family Pink Lambert.<\/p>\n<p>The Pink Lambert toolset includes a beaconing implant, a USB-harvesting module and a multi-platform orchestrator framework which can be used to create OS-independent malware. Versions of this particular orchestrator were found on other victims, together with White Lambert samples, indicating a close relationship between the White and Pink Lambert malware families.<\/p>\n<p>By looking further for other undetected malware on victims of White Lambert, we found yet another apparently related family. The new family, which we called Gray Lambert is the latest iteration of the passive network tools from the Lamberts\u2019 arsenal. The coding style of Gray Lambert is similar to the Pink Lambert USB-harvesting module, however, the functionality mirrors that of White Lambert. Compared to White Lambert, Gray Lambert runs in user mode, without the need for exploiting a vulnerable signed driver to load arbitrary code on 64-bit Windows variants.<\/p>\n<p>Connecting all these different families by shared code, data formats, C&amp;C servers, and victims, we have arrived at the following overarching picture:<\/p>\n<p><a class=\"magnificImage\" href=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180023\/Lamberts_chart.png\"><img loading=\"lazy\" class=\"aligncenter size-large wp-image-78065\" src=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180023\/Lamberts_chart-1024x991.png\" alt=\"\" width=\"604\" height=\"585\" \/><\/a><\/p>\n<p><i>Figure 2. An overview of connections between the Lambert families<\/i><\/p>\n<h2 id=\"the-lamberts-in-brief-from-black-to-gray\">The Lamberts in Brief \u2013 from Black to Gray<\/h2>\n<p>Below, we provide a small summary of all the Lamberts. A full description of all variants is available to subscribers of Kaspersky APT Reports. Contact\u00a0<a href=\"mailto:intelreports@kaspersky.com\">intelreports@kaspersky.com<\/a><\/p>\n<h3 id=\"black-lambert\">Black Lambert<\/h3>\n<p>The only known sample of Black Lambert was dropped by a TTF-exploit zero day (CVE-2014-4148). Its internal configuration included a proxy server which suggests the malware was created to work in a very specific network configuration, inside the victim\u2019s network.<\/p>\n<p>An internal description of Black Lambert indicates what appears to be a set of markers used by the attackers to denote this particular branch:\u00a0<b>toolType=wl<\/b>,\u00a0<b>build=132914<\/b>,\u00a0<b>versionName = 2.0.0<\/b>.<\/p>\n<div align=\"center\">\n<table border=\"0\" width=\"80%\">\n<tbody>\n<tr>\n<td>Hash<\/td>\n<td>Description<\/td>\n<\/tr>\n<tr>\n<td>683afdef710bf3c96d42e6d9e7275130<\/td>\n<td>generic loader (hdmsvc.exe)<\/td>\n<\/tr>\n<tr>\n<td>79e263f78e69110c09642bbb30f09ace<\/td>\n<td>winlib.dll, final payload (toolType=wl)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"blue-lambert\">Blue Lambert<\/h3>\n<p>The Blue Lambert implants contain what appear to be version numbers in the 2.x range, together with project\/operation codename sets, which may also indicate codenames for the victims or campaigns.<\/p>\n<p><a class=\"magnificImage\" href=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180203\/lamberts_en_3.png\"><img loading=\"lazy\" class=\"aligncenter size-large wp-image-77995\" src=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180203\/lamberts_en_3-1024x267.png\" alt=\"Unraveling the Lamberts Toolkit\" width=\"604\" height=\"157\" \/><\/a><\/p>\n<p><i>Figure 4. Blue Lambert configuration in decrypted form, highlighting internal codenames<\/i><\/p>\n<p>Known codenames include TRUE CRIME (2.2.0.2), CERVELO YARDBIRD (2.6.1.1), GAI SHU (2.2.0.5), DOUBLESIDED SCOOBYSNACK (2.3.0.2), FUNNELCAKE CARNIVAL (2.5.0.2), PROSPER SPOCK (2.0.0.2), RINGTOSS CARNIVAL (2.4.2.2), COD FISH (2.2.0.0), and INVERTED SHOT (2.6.2.3).<\/p>\n<h3 id=\"green-lambert\">Green Lambert<\/h3>\n<p>Green Lambert is a family of tools deeply related to Blue Lambert. The functionality is very similar, both Blue and Green are active implants. The configuration data shares the same style of codenames for victims, operations, or projects.<\/p>\n<p><a class=\"magnificImage\" href=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180159\/lamberts_en_4.png\"><img loading=\"lazy\" class=\"aligncenter size-large wp-image-77996\" src=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180159\/lamberts_en_4-1024x472.png\" alt=\"Unraveling the Lamberts Toolkit\" width=\"604\" height=\"278\" \/><\/a><\/p>\n<p><i>Figure 5. Green Lambert configuration block (decrypted) highlighting internal codenames<\/i><\/p>\n<p>The Green Lambert family is the only one where non-Windows variants have been found. An old version of Green Lambert, compiled for OS X was uploaded from Russia to a multiscanner service in 2014. Its internal codename is HO BO (1.2.0).<\/p>\n<p>The Windows versions of Green Lambert have the following code names: BEARD BLUE (2.7.1), GORDON FLASH (3.0), APE ESCAPE (3.0.2), SPOCK LOGICAL (3.0.2), PIZZA ASSAULT (3.0.5), and SNOW BLOWER (3.0.5).<\/p>\n<p>Interestingly, one of the droppers of Green Lambert abused an ICS software package named \u201cSubway Environmental Simulation Program\u201d or \u201cSES\u201d, which has been available on certain forums visited by engineers working with industrial software. Similar techniques have been observed in the past from other threat groups, for instance, trojanized Oracle installers by the Equation group.<\/p>\n<h3 id=\"white-lambert\">White Lambert<\/h3>\n<p>White Lambert is a family of tools that share the same internal description as Black Lambert. Known tool types, builds, and version names include:<\/p>\n<ul>\n<li>ToolType \u201caa\u201d, protocol 3, version 7, versionName 5.0.2, build 113140<\/li>\n<li>ToolType \u201caa\u201d, protocol 3, version 7, versionName 5.0.0, build 113140<\/li>\n<li>ToolType \u201caa\u201d, protocol 3, version 6, versionName 4.2.0, build 110836M<\/li>\n<li>ToolType \u201caa\u201d, protocol 3, version 5, versionName 3.2.0<\/li>\n<\/ul>\n<p>One of the White Lambert samples is interesting because it has a forgotten PDB path inside, which points to \u201cArchan~1l\u201d and \u201cHudson\u201d. Hudson could point to a project name, if the authors name their projects by rivers in the US, or, it could also be the developer\u2019s first name. The truncated (8.3) path \u201carchan~1\u201d most likely means \u201cArchangel\u201d. The tool type \u201caa\u201d could also suggest \u201cArchAngel\u201d. By comparison, the Black Lambert tool type \u201cwl\u201d has no known meaning.<\/p>\n<p><a class=\"magnificImage\" href=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180154\/lamberts_en_5.png\"><img loading=\"lazy\" class=\"aligncenter size-large wp-image-77997\" src=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180154\/lamberts_en_5-1024x233.png\" alt=\"Unraveling the Lamberts Toolkit\" width=\"604\" height=\"137\" \/><\/a><\/p>\n<p>White Lambert samples run in kernel mode and sniff network traffic looking for special packets containing instructions to execute. To run unsigned code in kernel mode on 64-bit Windows, White Lambert uses an exploit against a signed, legitimate SiSoftware Sandra driver. The same method was used before by Turla, ProjectSauron, and Equation\u2019s Grayfish, with other known, legitimate drivers.<\/p>\n<h3 id=\"pink-lambert\">Pink Lambert<\/h3>\n<p>Pink Lambert is a suite of tools initially discovered on a White Lambert victim. It includes a beaconing implant, partially based on publicly available source code. The source code on top of which Pink Lambert\u2019s beaconing implant was created is\u00a0<a href=\"http:\/\/www.codeproject.com\/Articles\/66625\/A-Fully-Featured-Windows-HTTP-Wrapper-in-C\" target=\"_blank\" rel=\"noopener\">\u201cA Fully Featured Windows HTTP Wrapper in C++\u201d<\/a>.<\/p>\n<p><a class=\"magnificImage\" href=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180150\/lamberts_en_6.png\"><img loading=\"lazy\" class=\"aligncenter size-large wp-image-77998\" src=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180150\/lamberts_en_6-1024x477.png\" alt=\"Unraveling the Lamberts Toolkit\" width=\"604\" height=\"281\" \/><\/a><\/p>\n<p><i>Figure 6. \u201cA Fully Featured Windows HTTP Wrapper\u201d by shicheng<\/i><\/p>\n<p>Other tools in the Pink Lambert suite include USB stealer modules and a very complex multi-platform orchestrator.<\/p>\n<p>In a second incident, a Pink Lambert orchestrator was found on another White Lambert victim, substantiating the connection between the Pink and White Lamberts.<\/p>\n<h3 id=\"gray-lambert\">Gray Lambert<\/h3>\n<p>Gray Lambert is the most recent tool in the Lamberts\u2019 arsenal. It is a network-driven backdoor, similar in functionality to White Lambert. Unlike White Lambert, which runs in kernel mode, Gray Lambert is a user-mode implant. The compilation and coding style of Gray Lambert is similar to the Pink Lambert USB stealers. Gray Lambert initially appeared on the computers of victims infected by White Lambert, which could suggest the authors were upgrading White Lambert infections to Gray. This migration activity was last observed in October 2016.<\/p>\n<p>Some of the known filenames for Gray Lambert are mwapi32.dll and poolstr.dll \u2013 it should be pointed though that the filenames used by the Lamberts are generally unique and have never been used twice.<\/p>\n<h2 id=\"timeline\">Timeline<\/h2>\n<p>Most of the Blue and Green Lambert samples have two C&amp;C servers hardcoded in their configuration block: a hostname and an IP address. Using our own pDNS as well as DomainTools IP history, we plotted the times when the C&amp;C servers were active and pointing to the same IP address as the one from the configuration block.<\/p>\n<p>Unfortunately, this method doesn\u2019t work for all samples, since some of them don\u2019t have a domain for C&amp;C. Additionally, in some cases we couldn\u2019t find any pDNS information for the hostname configured in the malware.<\/p>\n<p>Luckily, the attackers have made a few mistakes, which allow us to identify the activity times for most of the other samples. For instance, in case when no pDNS information was available for a subdomain on top of the main C&amp;C domain, the domain registration dates were sufficient to point out when the activity began. Additionally, in some cases the top domain pointed to the same IP address as the one from the configuration file, allowing us to identify the activity times.<\/p>\n<p>Another worthwhile analysis method focuses on the set of Blue Lambert samples that have exports. Although most compilation timestamps in the PE header appear to have been tampered (to reflect a 2003-2004 range), the authors forgot to alter the timestamps in the export section. This allowed us to identify not just the activity \/ compilation timestamps, but also the method used for faking the compilation timestamps in the PE header.<\/p>\n<p>It seems the algorithm used to tamper with the samples was the following: subtract 0x10 from the highest byte of timestamp (which amounts to about 8 and half years) and then randomize the lowest 3 bytes. This way we conclude that for Blue Lamberts, that original compilation time of samples was in the range of 2012-2015.<\/p>\n<p>Putting together all the various families, with recovered activity times, we come to the following picture:<\/p>\n<p><a class=\"magnificImage\" href=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180034\/Lamberts.png\"><img loading=\"lazy\" class=\"aligncenter size-large wp-image-78043\" src=\"https:\/\/s3-eu-west-1.amazonaws.com\/khub-media\/wp-content\/uploads\/sites\/43\/2017\/04\/07180034\/Lamberts-1024x403.png\" alt=\"\" width=\"604\" height=\"238\" \/><\/a><\/p>\n<p><i>Figure 8. A timeline of activity for known Lamberts<\/i><\/p>\n<p>As it can be seen from the chart above, Green Lambert is the oldest and longest-running in the family, while Gray is the newest. White, Blue and Pink somehow overlap in deployment, with Blue replacing Green Lambert. Black Lambert was seen only briefly and we assume it was \u201cretired\u201d from the arsenal after being discovered by FireEye in 2014.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>post originally taken from here:\u00a0https:\/\/securelist.com\/unraveling-the-lamberts-toolkit\/77990\/ &nbsp; Yesterday, our colleagues from\u00a0Symantec published their analysis of Longhorn, an advanced threat actor that can be easily compared with Regin, ProjectSauron, Equation or Duqu2 in terms of its complexity. Longhorn, which we internally refer to as \u201cThe Lamberts\u201d, first came to the attention of the ITSec community in 2014, &hellip; <a href=\"https:\/\/piratesecurityblog.com\/?p=74\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Lamberts Toolkit &#8211; kernel injecting trojan was found in the wild by kaspersky (from securelist.com)<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/piratesecurityblog.com\/index.php?rest_route=\/wp\/v2\/posts\/74"}],"collection":[{"href":"https:\/\/piratesecurityblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/piratesecurityblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/piratesecurityblog.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/piratesecurityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=74"}],"version-history":[{"count":2,"href":"https:\/\/piratesecurityblog.com\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions"}],"predecessor-version":[{"id":77,"href":"https:\/\/piratesecurityblog.com\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions\/77"}],"wp:attachment":[{"href":"https:\/\/piratesecurityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/piratesecurityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/piratesecurityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}