P2P Botnets: Review - Status - Continuous Monitoring
<!--kg-card-begin: markdown--><h1 id="origins">Origins</h1>
<p>P2P networks are more scalable and robust than traditional C/S structures, and these advantages were recognized by the botnet authors early on and used in their botnets. In terms of time, <a href="https://en.wikipedia.org/wiki/Storm_botnet">Storm</a>, which appeared in 2007, can be considered the progenitor of this area, when botnet threats were first known to the public. after Storm, there have been Karen, <a href="https://ijcttjournal.org/archives/ijctt-v12p112">ZeroAccess</a>, GameOver, Hijime, mozi and other kinds of P2P botnes, P2P botnets come and go, and some, for example, Mozi keep on going even though the author had been  caught.</p>
<p>The early P2P botnets mainly targeted Windows machines, such as Storm, ZeroAccess and GameOver, which were infected with the Windows operating system. after Mirai appeared in 2016, Linux IoT devices, which exist in large numbers on the network and lack some basic security defense, started to become the target of many botnets. For example, Hijime, mozi, pink all target Linux devices.</p>
<p>Because of the &quot;centerless&quot; nature of P2P networks, it is somewhat difficult to assess their size using traditional means. To try to solve this problem, security researchers have invented P2P crawler technology, which can track a P2P botnet and obtain node IPs, download links and configuration information for scale assessment and targeted removal.</p>
<p>Our team(360 netlab) has been focusing on discovering and tracking active botnets for a long time, and P2P botnets are surely on our radar. For example, we first disclosed the mozi botnet in 2019. In order to gain better visibility, we built an industrial-level tracking system for P2P botnets, with the goal of covering major active P2P botnets, This blog article will briefly analyze the current status of the following 5 families based on the tracking data generated by this system.</p>
<p>(In addition to the 5 families mentioned in this article, readers are also welcomed to leave comments below about new|active families of interest, and we will look into them accordingly)</p>
<h1 id="overviewoftrackingstrategy">Overview of tracking Strategy</h1>
<p>This section will briefly introduce the main tracking strategies used in our tracking system.</p>
<h2 id="trackinggoals">Tracking Goals</h2>
<p>The main goal of the system is to record the IPs of all the p2p nodes, we “create” a node by simulating the communication protocol, so it can join the corresponding P2P network to participate in the data message exchange. Every time a message exchange is successfully completed, the IP of the other party is recorded, this goes on and on and finally the majority of the nodes from the target P2P network would be recorded.</p>
<h2 id="methods">Methods</h2>
<p>The protocol design of each P2P family varies, but following are some common strategies, normally at least one of these would be selected as the tracking method.</p>
<p><strong>Active Probe</strong>: This strategy is somewhat similar to a public network scanner in terms of working principle. It first feeds probe messages to the target node, then parses the received reply messages, and identifies the peer as a peer node when the returned message format matches the family characteristics. In practice, we will first delineate a probe range and then probe the nodes within this range (where the probe range may consist of a suspicious network segment or suspicious nodes generated from other policies).</p>
<p><strong>Recent communications</strong>：Common P2P families maintain a &quot;recent communications list&quot; of recent peers in each node's memory. In some families, this list is also available to other nodes via specific commands, and would commonly be used as a seed list when the node “boots up”, so that they can quickly join the P2P network. In this case, we can discover more peer nodes by traversing this &quot;recent communication list&quot;.</p>
<p><strong>Node heartbeat</strong>: When a node maintains a &quot;recent communication list&quot;, it will send heartbeat messages to the nodes on the list periodically to declare its online status. Based on this, we can add the &quot;fake node&quot; to the other node's active list to get the active status of the corresponding node at any time. In some cases, we also send heartbeat messages to ensure that we don’t get kicked out by the network.</p>
<p><strong>Wait and see</strong>: &quot;Hajime&quot; and &quot;Mozi&quot;, for example, use &quot;<a href="https://en.bitcoinwiki.org/wiki/Kademlia">Distributed Hash Table</a>&quot; to implement their P2P network structure. This technique is designed to speed up data lookup by adding a rule of information-to-node distance and prioritizing the information to be stored on those nodes that are closer. Based on this rule, we can forge a “we-are-more-closer” node then wait for the arrival of other nodes. When other nodes try to obtain the information of the corresponding family from the forged node, we can directly record the other IP as the tracking result.</p>
<h1 id="howtoreadthedata">How to read the Data</h1>
<h2 id="trackingfamilyselectionbasis">Tracking family selection basis</h2>
<p>We consider the following two dimensions to screen the appropriate families for tracking to ensure the relative objectivity of the final results.</p>
<p><strong>Based on size</strong>: When selecting families, the most priority indicator is that the size of the botnet has to be large, or once historically large enough, in this case &quot;Hajime&quot;/&quot;Mozi&quot;/ “pink&quot; all stand out.</p>
<p><strong>Recent Disclosures</strong>: The next choice is the newly emerged ones that have been active at lease for a little while, based on this, we have chosen &quot;panchan&quot; and &quot;frizefrog&quot; as they are newly discovered this year.</p>
<h2 id="sizeoftheinfectedbotnodes">Size of the infected bot nodes</h2>
<p>Depending on the type of the host device, the number of bot IPs does not necessarily reflect the true number of infected devices.</p>
<p><em>Bots are servers</em>: In order to provide stable services, the public IPs of servers usually do not change, so the numbers are more accurate.</p>
<p><em>Bots are IoT devices</em>: These devices are usually found in the residential network. We all know that the IP addresses of residents devices change frequently. This can lead to a large uncertainty in the mapping relationship between the public IP and the device. Multiple devices might share a common public IP (NAT scenario), and devices can switch to different IPs multiple times within a time window (dial-up Internet scenario).</p>
<h1 id="dailyactivityofeachfamily">Daily activity of each family</h1>
<p>As a comparison, if we take the daily activity of each Monday since August as a sample to plot the medium- and long-term tracking graph, the following is shown.</p>
<p><img src="__GHOST_URL__/content/images/2022/10/P2P_080910_HMP.png" alt="P2P_080910_HMP" loading="lazy"></p>
<p><img src="__GHOST_URL__/content/images/2022/10/P2P_080910_Fri_Panchan.png" alt="P2P_080910_Fri_Panchan" loading="lazy"></p>
<p>We can clearly see the order of the family size:</p>
<p>Pink &gt; Hajime &gt; Mozi &gt;&gt; FritzFrog &lt;&gt; Panchan</p>
<p>We can see that the daily activity data of each family has not changed much over the three months period (see the discussion below for Pink's fluctuations in August)</p>
<h1 id="statisticsbyfamily">Statistics by family</h1>
<h2 id="pink">Pink</h2>
<p>At one point, the Pink family had infected more than one million devices in China, it has some cleverly designed command and control protocols. For time sensitive instructions, the control commands are pushed to the bots through a centralized mechanism, On the other hand, if the instructions are not urgent, P2P would be used. For more information, please refer to our previous report.</p>
<p>《<a href="__GHOST_URL__/pink-en/">Pink, a botnet that competed with the vendor to control the massive infected devices</a>》</p>
<p><strong>Geographical distribution</strong></p>
<p><img src="__GHOST_URL__/content/images/2022/08/pink_world_map.png" alt="pink_world_map" loading="lazy"></p>
<p>As shown in the figure, Pink's scope of influence is mainly domestic IoT devices, and the following is its distribution in China.</p>
<p><img src="__GHOST_URL__/content/images/2022/08/pink_china_map.png" alt="pink_china_map" loading="lazy"></p>
<p><strong>Daily activity fluctuation</strong></p>
<p>It is worth mentioning in particular that the daily activity data of the family has fluctuated greatly since July, first dropping by an order of magnitude in a week starting on July 12, reaching a daily activity of about 20,000, then returning to zero for about 10 days after August 20, and then returning to 20,000 in September. The fluctuation of daily activity can be seen in the following chart.</p>
<p><img src="__GHOST_URL__/content/images/2022/09/pink_tracker-1.png" alt="pink_tracker-1" loading="lazy"></p>
<p>Now let’s take a look at daily activity data of July 12, July 26 and September 1.  It is easy to tell that the number of daily activities in most provinces decreased significantly with time goes by.</p>
<p><img src="__GHOST_URL__/content/images/2022/09/pink_0712_china_map.png" alt="pink_0712_china_map" loading="lazy"></p>
<p><img src="__GHOST_URL__/content/images/2022/09/pink_2022_07_26.png" alt="pink_2022_07_26" loading="lazy"></p>
<p><img src="__GHOST_URL__/content/images/2022/09/pink_2022_09_01.png" alt="pink_2022_09_01" loading="lazy"></p>
<p>So, it is very likely that starting from July, the major device vendor carried out a national wide clean up effort, resulting in a significant decrease in the number of infected devices.</p>
<p>The fluctuations in late August, on the other hand, are likely due to a national wide C2 blocking action in place.</p>
<h2 id="hajime">Hajime</h2>
<p>Hajime, which emerged in the same year as MIRAI, less than a few months apart, has been claimed to be run by &quot;white hats&quot; in its alert messages, and its components function with the primary goal of self-propagation. The communication and management between its components makes extensive use of asymmetric encryption and decryption algorithms, making it an extremely classic P2P botnet family. We have covered this botnet in our previous blog.</p>
<p>《<a href="__GHOST_URL__/hajime-status-report/">Is Hajime botnet dead?</a>》</p>
<p><strong>Geographical distribution</strong></p>
<p><img src="__GHOST_URL__/content/images/2022/08/hajime_world_map.png" alt="hajime_world_map" loading="lazy"></p>
<p><strong>Iran tops the list</strong></p>
<p>We normally don’t see Iran on our security event list, but with Hajime infection, Iran is leading the pack, which is pretty interesting. Please leave comments below if you have more insights.</p>
<p><strong>CPU distribution in Hajime</strong></p>
<p>Hajime is a P2P network built on file exchanging and each Hajime bot tries to find the latest version of .i.xxx and atk.xxx files (e.g. atk.arm7/.i.arm7) when it runs. This gives us an opportunity to evaluate the CPU distribution in the &quot;Hajime network&quot;. When the Hajime node asks us which nodes contain the corresponding files, we gets a DHT.search count. When a Hajime node asks us to download the corresponding file, we gets a uTP.Request count. Putting these two types of files and two types of counts together, we would have the following four pie charts:</p>
<p><img src="__GHOST_URL__/content/images/2022/08/hajime_cpu_count-2.png" alt="hajime_cpu_count-2" loading="lazy"></p>
<p>Based on the above pie charts, we can see that MIPS based bots are the majority in the Hajime network, far exceeding the sum of the other types of hosts, while MIPSEL has the fewest host nodes.</p>
<p>If we consider that Hajime had integrated a large number of vulnerabilities for propagation, this data can even reflect to some extent the distribution of each type of CPU in smart devices.</p>
<h2 id="mozi">Mozi</h2>
<p>Mozi started out as a P2P family performing DDoS attacks for profits, and later added a mining component. Its network topology is built on the basis of the DHT protocol. More information can be found in our previously published reports.</p>
<p>《<a href="__GHOST_URL__/mozi-another-botnet-using-dht/">Mozi, Another Botnet Using DHT</a>》</p>
<p>《<a href="__GHOST_URL__/the-mostly-dead-mozi-and-its-lingering-bots/">The Mostly Dead Mozi and Its’ Lingering Bots</a>》</p>
<p><strong>Geographical Distribution</strong></p>
<p><img src="__GHOST_URL__/content/images/2022/08/mozi_world_map.png" alt="mozi_world_map" loading="lazy"></p>
<h2 id="fritzfrog">FritzFrog</h2>
<p>FritzFrog is a mining P2P family which relies on SSH services to build P2P networks. It was first disclosed by akamai. More details can be found in the following report (interestingly, FritzFrog wallet address is related to Mozi).</p>
<p>《<a href="https://www.akamai.com/blog/security/fritzfrog-p2p">FritzFrog: P2P Botnet Hops Back on the Scene</a>》</p>
<p><strong>Geographical Distribution</strong></p>
<p><img src="__GHOST_URL__/content/images/2022/08/fritzfrog_world_map.png" alt="fritzfrog_world_map" loading="lazy"></p>
<p><strong>Account Passwords in FritzFrog</strong></p>
<p>Since FritzFrog's P2P is based on SSH implementation, the password of the infected nodes are reflected in the crawled data, the following are the top passwords.</p>
<p><img src="__GHOST_URL__/content/images/2022/10/fritzfrog_user_pass.png" alt="fritzfrog_user_pass" loading="lazy"></p>
<p>The No.1 weak password starts with <code>1</code>, can anyone take a guess what it is?</p>
<h2 id="panchan">Panchan</h2>
<p>Panchan is a mining P2P botnet developed in Go language, it also uses SSH weak passwords for propagation. Its code contains a lot of Japanese katakana, which suggests that Panchan's developers are fluent in Japanese. Another interesting point is that it implements an interactive console on the listening port, using the idea of protocol reuse, allowing administrators to perform some simple queries and management of the nodes from the network. More detailed information can be found in the following Akamai report.</p>
<p>《<a href="https://www.akamai.com/blog/security/new-p2p-botnet-panchan">Panchan’s Mining Rig: New Golang Peer-to-Peer Botnet Says “Hi!”</a>》</p>
<p><strong>Geographic Distribution</strong></p>
<p><img src="__GHOST_URL__/content/images/2022/08/panchan_world_map-1.png" alt="panchan_world_map-1" loading="lazy"></p>
<h1 id="conclusion">Conclusion</h1>
<p>Normally we end our blog with some conclusion, do we have one here? Not really, we just want to shout out to our readers again: if you have seen some interesting p2p botnet, leave a comment, shoot us an email(<strong>netlab[at]360.cn</strong>) or on  <a href="https://twitter.com/360Netlab"><strong>twitter</strong></a>.</p>
<!--kg-card-end: markdown-->
Origins


P2P networks are more scalable and robust than traditional C/S structures, and these advantages were recognized by the botnet authors early on and used in their botnets. In terms of time, Storm, which appeared in 2007, can be considered the progenitor of this area, when botnet threats were first known to the public. after Storm, there have been Karen, ZeroAccess, GameOver, Hijime, mozi and other kinds of P2P botnes, P2P botnets come and go, and some, for example, Mozi keep on going even though the author had been caught.


The early P2P botnets mainly targeted Windows machines, such as Storm, ZeroAccess and GameOver, which were infected with the Windows operating system. after Mirai appeared in 2016, Linux IoT devices, which exist in large numbers on the network and lack some basic security defense, started to become the target of many botnets. For example, Hijime, mozi, pink all target Linux devices.


Because of the "centerless" nature of P2P networks, it is somewhat difficult to assess their size using traditional means. To try to solve this problem, security researchers have invented P2P crawler technology, which can track a P2P botnet and obtain node IPs, download links and configuration information for scale assessment and targeted removal.


Our team(360 netlab) has been focusing on discovering and tracking active botnets for a long time, and P2P botnets are surely on our radar. For example, we first disclosed the mozi botnet in 2019. In order to gain better visibility, we built an industrial-level tracking system for P2P botnets, with the goal of covering major active P2P botnets, This blog article will briefly analyze the current status of the following 5 families based on the tracking data generated by this system.


(In addition to the 5 families mentioned in this article, readers are also welcomed to leave comments below about new|active families of interest, and we will look into them accordingly)



Overview of tracking Strategy


This section will briefly introduce the main tracking strategies used in our tracking system.



Tracking Goals


The main goal of the system is to record the IPs of all the p2p nodes, we “create” a node by simulating the communication protocol, so it can join the corresponding P2P network to participate in the data message exchange. Every time a message exchange is successfully completed, the IP of the other party is recorded, this goes on and on and finally the majority of the nodes from the target P2P network would be recorded.



Methods


The protocol design of each P2P family varies, but following are some common strategies, normally at least one of these would be selected as the tracking method.


Active Probe: This strategy is somewhat similar to a public network scanner in terms of working principle. It first feeds probe messages to the target node, then parses the received reply messages, and identifies the peer as a peer node when the returned message format matches the family characteristics. In practice, we will first delineate a probe range and then probe the nodes within this range (where the probe range may consist of a suspicious network segment or suspicious nodes generated from other policies).


Recent communications：Common P2P families maintain a "recent communications list" of recent peers in each node's memory. In some families, this list is also available to other nodes via specific commands, and would commonly be used as a seed list when the node “boots up”, so that they can quickly join the P2P network. In this case, we can discover more peer nodes by traversing this "recent communication list".


Node heartbeat: When a node maintains a "recent communication list", it will send heartbeat messages to the nodes on the list periodically to declare its online status. Based on this, we can add the "fake node" to the other node's active list to get the active status of the corresponding node at any time. In some cases, we also send heartbeat messages to ensure that we don’t get kicked out by the network.


Wait and see: "Hajime" and "Mozi", for example, use "Distributed Hash Table" to implement their P2P network structure. This technique is designed to speed up data lookup by adding a rule of information-to-node distance and prioritizing the information to be stored on those nodes that are closer. Based on this rule, we can forge a “we-are-more-closer” node then wait for the arrival of other nodes. When other nodes try to obtain the information of the corresponding family from the forged node, we can directly record the other IP as the tracking result.



How to read the Data



Tracking family selection basis


We consider the following two dimensions to screen the appropriate families for tracking to ensure the relative objectivity of the final results.


Based on size: When selecting families, the most priority indicator is that the size of the botnet has to be large, or once historically large enough, in this case "Hajime"/"Mozi"/ “pink" all stand out.


Recent Disclosures: The next choice is the newly emerged ones that have been active at lease for a little while, based on this, we have chosen "panchan" and "frizefrog" as they are newly discovered this year.



Size of the infected bot nodes


Depending on the type of the host device, the number of bot IPs does not necessarily reflect the true number of infected devices.


Bots are servers: In order to provide stable services, the public IPs of servers usually do not change, so the numbers are more accurate.


Bots are IoT devices: These devices are usually found in the residential network. We all know that the IP addresses of residents devices change frequently. This can lead to a large uncertainty in the mapping relationship between the public IP and the device. Multiple devices might share a common public IP (NAT scenario), and devices can switch to different IPs multiple times within a time window (dial-up Internet scenario).



Daily activity of each family


As a comparison, if we take the daily activity of each Monday since August as a sample to plot the medium- and long-term tracking graph, the following is shown.








We can clearly see the order of the family size:


Pink > Hajime > Mozi >> FritzFrog <> Panchan


We can see that the daily activity data of each family has not changed much over the three months period (see the discussion below for Pink's fluctuations in August)



Statistics by family



Pink


At one point, the Pink family had infected more than one million devices in China, it has some cleverly designed command and control protocols. For time sensitive instructions, the control commands are pushed to the bots through a centralized mechanism, On the other hand, if the instructions are not urgent, P2P would be used. For more information, please refer to our previous report.


《Pink, a botnet that competed with the vendor to control the massive infected devices》


Geographical distribution





As shown in the figure, Pink's scope of influence is mainly domestic IoT devices, and the following is its distribution in China.





Daily activity fluctuation


It is worth mentioning in particular that the daily activity data of the family has fluctuated greatly since July, first dropping by an order of magnitude in a week starting on July 12, reaching a daily activity of about 20,000, then returning to zero for about 10 days after August 20, and then returning to 20,000 in September. The fluctuation of daily activity can be seen in the following chart.





Now let’s take a look at daily activity data of July 12, July 26 and September 1. It is easy to tell that the number of daily activities in most provinces decreased significantly with time goes by.











So, it is very likely that starting from July, the major device vendor carried out a national wide clean up effort, resulting in a significant decrease in the number of infected devices.


The fluctuations in late August, on the other hand, are likely due to a national wide C2 blocking action in place.



Hajime


Hajime, which emerged in the same year as MIRAI, less than a few months apart, has been claimed to be run by "white hats" in its alert messages, and its components function with the primary goal of self-propagation. The communication and management between its components makes extensive use of asymmetric encryption and decryption algorithms, making it an extremely classic P2P botnet family. We have covered this botnet in our previous blog.


《Is Hajime botnet dead?》


Geographical distribution





Iran tops the list


We normally don’t see Iran on our security event list, but with Hajime infection, Iran is leading the pack, which is pretty interesting. Please leave comments below if you have more insights.


CPU distribution in Hajime


Hajime is a P2P network built on file exchanging and each Hajime bot tries to find the latest version of .i.xxx and atk.xxx files (e.g. atk.arm7/.i.arm7) when it runs. This gives us an opportunity to evaluate the CPU distribution in the "Hajime network". When the Hajime node asks us which nodes contain the corresponding files, we gets a DHT.search count. When a Hajime node asks us to download the corresponding file, we gets a uTP.Request count. Putting these two types of files and two types of counts together, we would have the following four pie charts:





Based on the above pie charts, we can see that MIPS based bots are the majority in the Hajime network, far exceeding the sum of the other types of hosts, while MIPSEL has the fewest host nodes.


If we consider that Hajime had integrated a large number of vulnerabilities for propagation, this data can even reflect to some extent the distribution of each type of CPU in smart devices.



Mozi


Mozi started out as a P2P family performing DDoS attacks for profits, and later added a mining component. Its network topology is built on the basis of the DHT protocol. More information can be found in our previously published reports.


《Mozi, Another Botnet Using DHT》


《The Mostly Dead Mozi and Its’ Lingering Bots》


Geographical Distribution






FritzFrog


FritzFrog is a mining P2P family which relies on SSH services to build P2P networks. It was first disclosed by akamai. More details can be found in the following report (interestingly, FritzFrog wallet address is related to Mozi).


《FritzFrog: P2P Botnet Hops Back on the Scene》


Geographical Distribution





Account Passwords in FritzFrog


Since FritzFrog's P2P is based on SSH implementation, the password of the infected nodes are reflected in the crawled data, the following are the top passwords.





The No.1 weak password starts with 1, can anyone take a guess what it is?



Panchan


Panchan is a mining P2P botnet developed in Go language, it also uses SSH weak passwords for propagation. Its code contains a lot of Japanese katakana, which suggests that Panchan's developers are fluent in Japanese. Another interesting point is that it implements an interactive console on the listening port, using the idea of protocol reuse, allowing administrators to perform some simple queries and management of the nodes from the network. More detailed information can be found in the following Akamai report.


《Panchan’s Mining Rig: New Golang Peer-to-Peer Botnet Says “Hi!”》


Geographic Distribution






Conclusion


Normally we end our blog with some conclusion, do we have one here? Not really, we just want to shout out to our readers again: if you have seen some interesting p2p botnet, leave a comment, shoot us an email(netlab[at]360.cn) or on twitter.

{"version":"0.3.1","atoms":[],"cards":[["markdown",{"markdown":"# Origins\n\nP2P networks are more scalable and robust than traditional C/S structures, and these advantages were recognized by the botnet authors early on and used in their botnets. In terms of time, [Storm](https://en.wikipedia.org/wiki/Storm_botnet), which appeared in 2007, can be considered the progenitor of this area, when botnet threats were first known to the public. after Storm, there have been Karen, [ZeroAccess](https://ijcttjournal.org/archives/ijctt-v12p112), GameOver, Hijime, mozi and other kinds of P2P botnes, P2P botnets come and go, and some, for example, Mozi keep on going even though the author had been  caught.\n\n\nThe early P2P botnets mainly targeted Windows machines, such as Storm, ZeroAccess and GameOver, which were infected with the Windows operating system. after Mirai appeared in 2016, Linux IoT devices, which exist in large numbers on the network and lack some basic security defense, started to become the target of many botnets. For example, Hijime, mozi, pink all target Linux devices.\n\nBecause of the \"centerless\" nature of P2P networks, it is somewhat difficult to assess their size using traditional means. To try to solve this problem, security researchers have invented P2P crawler technology, which can track a P2P botnet and obtain node IPs, download links and configuration information for scale assessment and targeted removal.\n\nOur team(360 netlab) has been focusing on discovering and tracking active botnets for a long time, and P2P botnets are surely on our radar. For example, we first disclosed the mozi botnet in 2019. In order to gain better visibility, we built an industrial-level tracking system for P2P botnets, with the goal of covering major active P2P botnets, This blog article will briefly analyze the current status of the following 5 families based on the tracking data generated by this system.\n\n(In addition to the 5 families mentioned in this article, readers are also welcomed to leave comments below about new|active families of interest, and we will look into them accordingly)\n\n# Overview of tracking Strategy\n\nThis section will briefly introduce the main tracking strategies used in our tracking system.\n\n## Tracking Goals\n\nThe main goal of the system is to record the IPs of all the p2p nodes, we “create” a node by simulating the communication protocol, so it can join the corresponding P2P network to participate in the data message exchange. Every time a message exchange is successfully completed, the IP of the other party is recorded, this goes on and on and finally the majority of the nodes from the target P2P network would be recorded.\n\n## Methods\n\nThe protocol design of each P2P family varies, but following are some common strategies, normally at least one of these would be selected as the tracking method.\n\n**Active Probe**: This strategy is somewhat similar to a public network scanner in terms of working principle. It first feeds probe messages to the target node, then parses the received reply messages, and identifies the peer as a peer node when the returned message format matches the family characteristics. In practice, we will first delineate a probe range and then probe the nodes within this range (where the probe range may consist of a suspicious network segment or suspicious nodes generated from other policies).\n\n\n**Recent communications**：Common P2P families maintain a \"recent communications list\" of recent peers in each node's memory. In some families, this list is also available to other nodes via specific commands, and would commonly be used as a seed list when the node “boots up”, so that they can quickly join the P2P network. In this case, we can discover more peer nodes by traversing this \"recent communication list\".\n\n**Node heartbeat**: When a node maintains a \"recent communication list\", it will send heartbeat messages to the nodes on the list periodically to declare its online status. Based on this, we can add the \"fake node\" to the other node's active list to get the active status of the corresponding node at any time. In some cases, we also send heartbeat messages to ensure that we don’t get kicked out by the network.\n\n**Wait and see**: \"Hajime\" and \"Mozi\", for example, use \"[Distributed Hash Table](https://en.bitcoinwiki.org/wiki/Kademlia)\" to implement their P2P network structure. This technique is designed to speed up data lookup by adding a rule of information-to-node distance and prioritizing the information to be stored on those nodes that are closer. Based on this rule, we can forge a “we-are-more-closer” node then wait for the arrival of other nodes. When other nodes try to obtain the information of the corresponding family from the forged node, we can directly record the other IP as the tracking result.\n\n# How to read the Data\n\n## Tracking family selection basis\n\nWe consider the following two dimensions to screen the appropriate families for tracking to ensure the relative objectivity of the final results.\n\n**Based on size**: When selecting families, the most priority indicator is that the size of the botnet has to be large, or once historically large enough, in this case \"Hajime\"/\"Mozi\"/ “pink\" all stand out. \n\n**Recent Disclosures**: The next choice is the newly emerged ones that have been active at lease for a little while, based on this, we have chosen \"panchan\" and \"frizefrog\" as they are newly discovered this year.\n\n## Size of the infected bot nodes\n\nDepending on the type of the host device, the number of bot IPs does not necessarily reflect the true number of infected devices.\n\n*Bots are servers*: In order to provide stable services, the public IPs of servers usually do not change, so the numbers are more accurate.\n\n*Bots are IoT devices*: These devices are usually found in the residential network. We all know that the IP addresses of residents devices change frequently. This can lead to a large uncertainty in the mapping relationship between the public IP and the device. Multiple devices might share a common public IP (NAT scenario), and devices can switch to different IPs multiple times within a time window (dial-up Internet scenario).\n\n\n# Daily activity of each family \n\nAs a comparison, if we take the daily activity of each Monday since August as a sample to plot the medium- and long-term tracking graph, the following is shown.\n\n![P2P_080910_HMP](__GHOST_URL__/content/images/2022/10/P2P_080910_HMP.png)\n\n![P2P_080910_Fri_Panchan](__GHOST_URL__/content/images/2022/10/P2P_080910_Fri_Panchan.png)\n\nWe can clearly see the order of the family size:\n\nPink > Hajime > Mozi >> FritzFrog <> Panchan\n\nWe can see that the daily activity data of each family has not changed much over the three months period (see the discussion below for Pink's fluctuations in August)\n\n# Statistics by family\n\n\n## Pink\n\nAt one point, the Pink family had infected more than one million devices in China, it has some cleverly designed command and control protocols. For time sensitive instructions, the control commands are pushed to the bots through a centralized mechanism, On the other hand, if the instructions are not urgent, P2P would be used. For more information, please refer to our previous report.\n\n\n《[Pink, a botnet that competed with the vendor to control the massive infected devices](__GHOST_URL__/pink-en/)》\n\n**Geographical distribution**\n\n![pink_world_map](__GHOST_URL__/content/images/2022/08/pink_world_map.png)\n\nAs shown in the figure, Pink's scope of influence is mainly domestic IoT devices, and the following is its distribution in China.\n\n![pink_china_map](__GHOST_URL__/content/images/2022/08/pink_china_map.png)\n\n\n**Daily activity fluctuation**\n\nIt is worth mentioning in particular that the daily activity data of the family has fluctuated greatly since July, first dropping by an order of magnitude in a week starting on July 12, reaching a daily activity of about 20,000, then returning to zero for about 10 days after August 20, and then returning to 20,000 in September. The fluctuation of daily activity can be seen in the following chart.\n\n![pink_tracker-1](__GHOST_URL__/content/images/2022/09/pink_tracker-1.png)\n\nNow let’s take a look at daily activity data of July 12, July 26 and September 1.  It is easy to tell that the number of daily activities in most provinces decreased significantly with time goes by.\n\n![pink_0712_china_map](__GHOST_URL__/content/images/2022/09/pink_0712_china_map.png)\n\n![pink_2022_07_26](__GHOST_URL__/content/images/2022/09/pink_2022_07_26.png)\n\n![pink_2022_09_01](__GHOST_URL__/content/images/2022/09/pink_2022_09_01.png)\n\n\nSo, it is very likely that starting from July, the major device vendor carried out a national wide clean up effort, resulting in a significant decrease in the number of infected devices. \n\nThe fluctuations in late August, on the other hand, are likely due to a national wide C2 blocking action in place.\n\n\n## Hajime\n\nHajime, which emerged in the same year as MIRAI, less than a few months apart, has been claimed to be run by \"white hats\" in its alert messages, and its components function with the primary goal of self-propagation. The communication and management between its components makes extensive use of asymmetric encryption and decryption algorithms, making it an extremely classic P2P botnet family. We have covered this botnet in our previous blog.\n\n\n《[Is Hajime botnet dead?](__GHOST_URL__/hajime-status-report/)》\n\n**Geographical distribution**\n\n![hajime_world_map](__GHOST_URL__/content/images/2022/08/hajime_world_map.png)\n\n**Iran tops the list**\n\nWe normally don’t see Iran on our security event list, but with Hajime infection, Iran is leading the pack, which is pretty interesting. Please leave comments below if you have more insights.\n\n**CPU distribution in Hajime**\n\nHajime is a P2P network built on file exchanging and each Hajime bot tries to find the latest version of .i.xxx and atk.xxx files (e.g. atk.arm7/.i.arm7) when it runs. This gives us an opportunity to evaluate the CPU distribution in the \"Hajime network\". When the Hajime node asks us which nodes contain the corresponding files, we gets a DHT.search count. When a Hajime node asks us to download the corresponding file, we gets a uTP.Request count. Putting these two types of files and two types of counts together, we would have the following four pie charts:\n\n![hajime_cpu_count-2](__GHOST_URL__/content/images/2022/08/hajime_cpu_count-2.png)\n\nBased on the above pie charts, we can see that MIPS based bots are the majority in the Hajime network, far exceeding the sum of the other types of hosts, while MIPSEL has the fewest host nodes.\n\nIf we consider that Hajime had integrated a large number of vulnerabilities for propagation, this data can even reflect to some extent the distribution of each type of CPU in smart devices.\n\n## Mozi\n\nMozi started out as a P2P family performing DDoS attacks for profits, and later added a mining component. Its network topology is built on the basis of the DHT protocol. More information can be found in our previously published reports.\n\n《[Mozi, Another Botnet Using DHT](__GHOST_URL__/mozi-another-botnet-using-dht/)》\n\n\n《[The Mostly Dead Mozi and Its’ Lingering Bots](__GHOST_URL__/the-mostly-dead-mozi-and-its-lingering-bots/)》\n\n**Geographical Distribution**\n\n![mozi_world_map](__GHOST_URL__/content/images/2022/08/mozi_world_map.png)\n\n## FritzFrog\n\nFritzFrog is a mining P2P family which relies on SSH services to build P2P networks. It was first disclosed by akamai. More details can be found in the following report (interestingly, FritzFrog wallet address is related to Mozi).\n\n《[FritzFrog: P2P Botnet Hops Back on the Scene](https://www.akamai.com/blog/security/fritzfrog-p2p)》\n\n**Geographical Distribution**\n\n![fritzfrog_world_map](__GHOST_URL__/content/images/2022/08/fritzfrog_world_map.png)\n\n\n**Account Passwords in FritzFrog**\n\n\nSince FritzFrog's P2P is based on SSH implementation, the password of the infected nodes are reflected in the crawled data, the following are the top passwords.\n\n\n![fritzfrog_user_pass](__GHOST_URL__/content/images/2022/10/fritzfrog_user_pass.png)\n\n\nThe No.1 weak password starts with `1`, can anyone take a guess what it is?\n\n## Panchan\n\nPanchan is a mining P2P botnet developed in Go language, it also uses SSH weak passwords for propagation. Its code contains a lot of Japanese katakana, which suggests that Panchan's developers are fluent in Japanese. Another interesting point is that it implements an interactive console on the listening port, using the idea of protocol reuse, allowing administrators to perform some simple queries and management of the nodes from the network. More detailed information can be found in the following Akamai report.\n\n\n《[Panchan’s Mining Rig: New Golang Peer-to-Peer Botnet Says “Hi!”](https://www.akamai.com/blog/security/new-p2p-botnet-panchan)》\n\n**Geographic Distribution**\n\n![panchan_world_map-1](__GHOST_URL__/content/images/2022/08/panchan_world_map-1.png) \n\n# Conclusion\n\nNormally we end our blog with some conclusion, do we have one here? Not really, we just want to shout out to our readers again: if you have seen some interesting p2p botnet, leave a comment, shoot us an email(**netlab[at]360.cn**) or on  [**twitter**](https://twitter.com/360Netlab)."}]],"markups":[],"sections":[[10,0],[1,"p",[]]],"ghostVersion":"3.0"}