The new developments Of the FBot
<!--kg-card-begin: markdown--><p>Update 2019.12.04: Recently we have received quite a few requests of comment about this blog. We feel it necessary to list following facts here:</p>
<ol>
<li>Kenneth Crurrin Schuchman, with nicknames &quot;Nexus&quot; or &quot;Nexus-Zeta&quot;, a 21 years old young man, has pleaded guilty on 2019.09.03 to the United States District Court for the District of Alaska. The Factual Basis in the Plea Agreement show that Schuchman and his co-conspirators has infected massive devices to create a series of botnets, including Satori, Okiru, Masuta, Tsunami and Fbot, and to make money through them.</li>
<li>The vulnerability listed in this blog, is not inside Hisilicon Soc Chipset or product. Through later analyze and communication with the security community, we are sure it is located in one downstream vendor. To protect our end users, we will not disclose the vulnerability detail, the attack payload, or the name of the vendor.</li>
<li>Huawei PSIRT took a responsible action for this event.</li>
</ol>
<p>Readers, please kindly keep in mind that the string Hisilicon listed in this blog or buried in the malware sample is derived from the misunderstanding of Schuchman and his co-conspirators. Actually, the whole IoT supply chain is so complex for every single pacificator, that only by a throughout cooperation from the industry and the security community can we make it safer.</p>
<p>Update 2019.02.21: we have captured the key exploit at around 11am 2/21 (GMT+8), it appears that some vendor have weak security implementation of DVRIP protocol, and attacker has spot the weakness and sets up telnet backdoor and inject Fbot botnet on the related victims.</p>
<!--kg-card-end: markdown--><h3 id="background-introduction">Background introduction</h3><p>Beginning on February 16, 2019, 360Netlab has discovered that a large number of HiSilicon DVR/NVR Soc devices have been exploited by attackers to load an updated Fbot botnet program. Fbot was originally discovered and disclosed by 360Netlab [<a href="__GHOST_URL__/threat-alert-a-new-worm-fbot-cleaning-adbminer-is-using-a-blockchain-based-dns-en/">1]</a> , it has been active and is constantly being upgraded. The Fbot we captured this time is a variant targeting HiSilicon DVR/NVR Soc device. (Please bear in mind that IoT product has a long market chain and thing can go wrong at every possible downstream or upstream manufacturere, we list HiSilicon DVR/NVR Soc here as that is what is being shown on the bots themself, the root problem might be a specific OEM application running on top of the HiSilicon. Without a working exploit, this is a question yet to be answered.)</p><h3 id="fbot-infection-target">Fbot infection target</h3><p>By probing the IP banner information of the infected devices, we get a list of infected device models and all banner messages suggest that the bots have HiSilicon DVR/NVR Soc device family CPU running . We see a few different camera brands as a number of camera manufacturers oem HiSilicon DVR/NVR Soc device.</p><p>All together, we have 24528 infected IPs</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="__GHOST_URL__/content/images/2019/02/fbot.png" class="kg-image" alt="fbot" loading="lazy"><figcaption>Figure 1: Infected camera IP country/region distribution</figcaption></figure><p>The following is a country breakdown of infected camera IPs</p><pre><code>VN 6760
TW 2110
TH 1459
BR 1276
TR 1137
IN 942
IR 892
RU 862
ID 609
RO 579
MY 553
IT 489
CO 363
EG 362
LK 360
US 328
AR 310
MX 293
FR 255
PK 237
UY 185
PL 184
GB 184
VE 183
CL 177
MA 176
UA 166
BG 147
GR 142
HU 141
SG 130
IL 123
DE 109
BD 106
ES 103</code></pre><p>The following is a list of infected camera's CPU models</p><pre><code>   8262 bigfish
   3534 hi3520d
    383 godarm
    302 godnet
     78 hi3535
      8 Hisilicon Hi3536DV100 (Flattened Device Tree)
</code></pre><h3 id="fbot-infection-process">Fbot infection process</h3><p>The Fbot infection is a multiple steps process, and we successfully captured Fbot samples and some Paylods through our Anglerfish honeypot and some Fuzz Testing tricks. We have not yet captured the key Exploit Payload though and would be interested if anyone has more detail on that. </p><p>The following is overall infection process.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="__GHOST_URL__/content/images/2019/02/fbot_http_scan-3.png" class="kg-image" alt loading="lazy"><figcaption>Figure 2: Infection process</figcaption></figure><p>First, the device that is infected with Fbot scans  TCP: 80, 81, 88, 8000, 8080 ports by issuing basic HTTP requests. When a target device returns the matching characteristics, Fbot will report the IP and port to its Reporter (185.61. 138.13:6565).</p><p>After that, Fbot Loader (185.61.138.13) logs in to the target device web port through the device default password “admin/empty password”. If the target device responses, Fbot Loader uses the device default password “admin/tlJwpbo6” to log in to the dvrip port. (TCP: 34567).</p><p>Since our Anglerfish honeypot has not emulated the dvrip protocol yet, we have no visibility on how the exploit works, is it by normal dvr protocol or some new exploit?  We have no answer at this point.</p><h3 id="fuzz-fbot-loader">Fuzz Fbot Loader</h3><p>Nevertheless, we still successfully bypassed the Fbot Loader's Exploit logic by performing Fuzz Testing on the dvrip protocol to see the rest actions of this botnet. It appears that the Fbot Loader then populates the Fbot downloader to our TCP: 9000 port via the Shell command. With this, we got the Fbot Downloader sample, and then through the Downloader sample we got the Fbot download URL.</p><pre><code>http://185.61.138.13:8080/fbot.arm5.u
http://185.61.138.13:8080/fbot.arm7.u
</code></pre><h2 id="sample-analysis">Sample analysis</h2><h3 id="downloader">Downloader</h3><p>MD5：3b7f5be1c1ed582042f783ffcb23b754<br>This sample is delivered on the 9000 port through command line (echo -ne XXXXXX &gt; downloader). It has only one mission, to download the Fbot and execute it through the HTTP protocol. The figure below shows the a snip of the sample. You can see the relevant code to download Fbot:</p><figure class="kg-card kg-image-card"><img src="__GHOST_URL__/content/images/2019/02/image001.png" class="kg-image" alt="image001" loading="lazy"></figure><h3 id="fbot-arm5-u">fbot.arm5.u</h3><p>The fbot sample, MD5:  43A7D9956720B86330D4985C773E76C1</p><h4 id="encryption">Encryption</h4><p>Two different layers of encryption and decryption codes are used in the sample to protect the static resources in the sample from being analyzed.</p><p>The first part uses a single-byte XOR algorithm (exclusive OR 0x31), the relevant code is shown below (Python 2.7):</p><figure class="kg-card kg-image-card"><img src="__GHOST_URL__/content/images/2019/02/image003.png" class="kg-image" alt="image003" loading="lazy"></figure><p>After the above code is run, we get two code tables, which are ciphertext table/clear text table. By replacing the characters with the above two code tables, the static strings in the sample can be decrypted. The relevant code is shown below (Python):</p><figure class="kg-card kg-image-card"><img src="__GHOST_URL__/content/images/2019/02/image004.png" class="kg-image" alt="image004" loading="lazy"></figure><p>After the first line of output is truncated, the Fbot's C2 address (xabolfpzbz.ukrainianhorseriding.com) can be obtained.</p><p>Then you can see some instructions (PING/PONG/LOLNOGTFO) and resource control related strings.</p><p>It is worth noting that the last two lines of strings are the strings related to the ongoing scan event. Where "GET / HTTP/1.0" is used for scanning, and "uc-httpd 1.0.0" is the target feature. With the support of MIRAI-SYN-SCAN, once a qualified target is found, the target address information (IP:PORT) will be reported to the core Loader (185.61.138.13:6565). The relevant code and protocol format are as follows: </p><figure class="kg-card kg-image-card"><img src="__GHOST_URL__/content/images/2019/02/image006.png" class="kg-image" alt="image006" loading="lazy"></figure><h4 id="ddos-attacks">DDOS attacks</h4><p>There are five attack vectors of this Fbot varaint, all of which are DDOS related. The relevant initialization code is as follows:</p><figure class="kg-card kg-image-card"><img src="__GHOST_URL__/content/images/2019/02/image008.png" class="kg-image" alt="image008" loading="lazy"></figure><h3 id="summary">Summary</h3><p>Relevant security and law enforcement agencies are welcomed to contact netlab[at]360.cn for a list of infected IP addresses.</p><h4 id="contact-us">Contact Us</h4><p>Relevant security and law enforcement agencies are welcomed to contact netlab[at]360.cn for a list of infected IP addresses.</p><p>Readers can reach us on our <a href="https://twitter.com/360Netlab"><strong>twitter</strong></a>, WeChat <strong>360Netlab</strong> or email to netlab at 360 dot cn.</p><h3 id="ioc-list">IoC list</h3><pre><code>C2:
xabolfpzbz.ukrainianhorseriding.com:6592

reporter ip:
185.61.138.13:6565

loader ip:
185.61.138.13

url:
http://185.61.138.13:8080/fbot.arm5.u
http://185.61.138.13:8080/fbot.arm7.u

md5:
9827375cd2e8ee9e3acc870e4b4c6097  downloader
3b7f5be1c1ed582042f783ffcb23b754  downloader
43a7d9956720b86330d4985c773e76c1  fbot.arm5.u

</code></pre><h3 id="asn-top-20">ASN Top 20</h3><pre><code>"geoip.number.raw: Descending","geoip.asn.raw: Descending","Unique count of ip.raw"
AS45899,"VNPT Corp",2590
AS7552,"Viettel Group",3600
AS3462,"Data Communication Business Group",1270
AS18403,"The Corporation for Financing &amp; Promoting Technology",996
AS9121,"Turk Telekom",777
AS17552,"True Internet Co.,Ltd.",676
AS24086,"Viettel Corporation",531
AS4788,"TM Net, Internet Service Provider",428
AS17974,"PT Telekomunikasi Indonesia",376
AS45758,"Triple T Internet/Triple T Broadband",479
AS23969,"TOT Public Company Limited",325
AS18881,"TELEFÔNICA BRASIL S.A",319
AS8452,"TE-AS",259
AS9829,"National Internet Backbone",178
AS12880,"Information Technology Company (ITC)",277
AS8708,"RCS &amp; RDS",270
AS8151,"Uninet S.A. de C.V.",282
AS9329,"Sri Lanka Telecom Internet",334
AS7738,"Telemar Norte Leste S.A.",183
AS3269,"Telecom Italia",209
</code></pre>
Update 2019.12.04: Recently we have received quite a few requests of comment about this blog. We feel it necessary to list following facts here:


 1. Kenneth Crurrin Schuchman, with nicknames "Nexus" or "Nexus-Zeta", a 21 years old young man, has pleaded guilty on 2019.09.03 to the United States District Court for the District of Alaska. The Factual Basis in the Plea Agreement show that Schuchman and his co-conspirators has infected massive devices to create a series of botnets, including Satori, Okiru, Masuta, Tsunami and Fbot, and to make money through them.
 2. The vulnerability listed in this blog, is not inside Hisilicon Soc Chipset or product. Through later analyze and communication with the security community, we are sure it is located in one downstream vendor. To protect our end users, we will not disclose the vulnerability detail, the attack payload, or the name of the vendor.
 3. Huawei PSIRT took a responsible action for this event.


Readers, please kindly keep in mind that the string Hisilicon listed in this blog or buried in the malware sample is derived from the misunderstanding of Schuchman and his co-conspirators. Actually, the whole IoT supply chain is so complex for every single pacificator, that only by a throughout cooperation from the industry and the security community can we make it safer.


Update 2019.02.21: we have captured the key exploit at around 11am 2/21 (GMT+8), it appears that some vendor have weak security implementation of DVRIP protocol, and attacker has spot the weakness and sets up telnet backdoor and inject Fbot botnet on the related victims.



Background introduction

Beginning on February 16, 2019, 360Netlab has discovered that a large number of HiSilicon DVR/NVR Soc devices have been exploited by attackers to load an updated Fbot botnet program. Fbot was originally discovered and disclosed by 360Netlab [1] , it has been active and is constantly being upgraded. The Fbot we captured this time is a variant targeting HiSilicon DVR/NVR Soc device. (Please bear in mind that IoT product has a long market chain and thing can go wrong at every possible downstream or upstream manufacturere, we list HiSilicon DVR/NVR Soc here as that is what is being shown on the bots themself, the root problem might be a specific OEM application running on top of the HiSilicon. Without a working exploit, this is a question yet to be answered.)


Fbot infection target

By probing the IP banner information of the infected devices, we get a list of infected device models and all banner messages suggest that the bots have HiSilicon DVR/NVR Soc device family CPU running . We see a few different camera brands as a number of camera manufacturers oem HiSilicon DVR/NVR Soc device.

All together, we have 24528 infected IPs

The following is a country breakdown of infected camera IPs

VN 6760
TW 2110
TH 1459
BR 1276
TR 1137
IN 942
IR 892
RU 862
ID 609
RO 579
MY 553
IT 489
CO 363
EG 362
LK 360
US 328
AR 310
MX 293
FR 255
PK 237
UY 185
PL 184
GB 184
VE 183
CL 177
MA 176
UA 166
BG 147
GR 142
HU 141
SG 130
IL 123
DE 109
BD 106
ES 103

The following is a list of infected camera's CPU models

   8262 bigfish
   3534 hi3520d
    383 godarm
    302 godnet
     78 hi3535
      8 Hisilicon Hi3536DV100 (Flattened Device Tree)



Fbot infection process

The Fbot infection is a multiple steps process, and we successfully captured Fbot samples and some Paylods through our Anglerfish honeypot and some Fuzz Testing tricks. We have not yet captured the key Exploit Payload though and would be interested if anyone has more detail on that.

The following is overall infection process.

First, the device that is infected with Fbot scans  TCP: 80, 81, 88, 8000, 8080 ports by issuing basic HTTP requests. When a target device returns the matching characteristics, Fbot will report the IP and port to its Reporter (185.61. 138.13:6565).

After that, Fbot Loader (185.61.138.13) logs in to the target device web port through the device default password “admin/empty password”. If the target device responses, Fbot Loader uses the device default password “admin/tlJwpbo6” to log in to the dvrip port. (TCP: 34567).

Since our Anglerfish honeypot has not emulated the dvrip protocol yet, we have no visibility on how the exploit works, is it by normal dvr protocol or some new exploit?  We have no answer at this point.


Fuzz Fbot Loader

Nevertheless, we still successfully bypassed the Fbot Loader's Exploit logic by performing Fuzz Testing on the dvrip protocol to see the rest actions of this botnet. It appears that the Fbot Loader then populates the Fbot downloader to our TCP: 9000 port via the Shell command. With this, we got the Fbot Downloader sample, and then through the Downloader sample we got the Fbot download URL.

http://185.61.138.13:8080/fbot.arm5.u
http://185.61.138.13:8080/fbot.arm7.u



Sample analysis


Downloader

MD5：3b7f5be1c1ed582042f783ffcb23b754
This sample is delivered on the 9000 port through command line (echo -ne XXXXXX > downloader). It has only one mission, to download the Fbot and execute it through the HTTP protocol. The figure below shows the a snip of the sample. You can see the relevant code to download Fbot:


fbot.arm5.u

The fbot sample, MD5:  43A7D9956720B86330D4985C773E76C1

Encryption

Two different layers of encryption and decryption codes are used in the sample to protect the static resources in the sample from being analyzed.

The first part uses a single-byte XOR algorithm (exclusive OR 0x31), the relevant code is shown below (Python 2.7):

After the above code is run, we get two code tables, which are ciphertext table/clear text table. By replacing the characters with the above two code tables, the static strings in the sample can be decrypted. The relevant code is shown below (Python):

After the first line of output is truncated, the Fbot's C2 address (xabolfpzbz.ukrainianhorseriding.com) can be obtained.

Then you can see some instructions (PING/PONG/LOLNOGTFO) and resource control related strings.

It is worth noting that the last two lines of strings are the strings related to the ongoing scan event. Where "GET / HTTP/1.0" is used for scanning, and "uc-httpd 1.0.0" is the target feature. With the support of MIRAI-SYN-SCAN, once a qualified target is found, the target address information (IP:PORT) will be reported to the core Loader (185.61.138.13:6565). The relevant code and protocol format are as follows:

DDOS attacks

There are five attack vectors of this Fbot varaint, all of which are DDOS related. The relevant initialization code is as follows:


Summary

Relevant security and law enforcement agencies are welcomed to contact netlab[at]360.cn for a list of infected IP addresses.

Contact Us

Relevant security and law enforcement agencies are welcomed to contact netlab[at]360.cn for a list of infected IP addresses.

Readers can reach us on our twitter, WeChat 360Netlab or email to netlab at 360 dot cn.


IoC list

C2:
xabolfpzbz.ukrainianhorseriding.com:6592

reporter ip:
185.61.138.13:6565

loader ip:
185.61.138.13

url:
http://185.61.138.13:8080/fbot.arm5.u
http://185.61.138.13:8080/fbot.arm7.u

md5:
9827375cd2e8ee9e3acc870e4b4c6097  downloader
3b7f5be1c1ed582042f783ffcb23b754  downloader
43a7d9956720b86330d4985c773e76c1  fbot.arm5.u




ASN Top 20

"geoip.number.raw: Descending","geoip.asn.raw: Descending","Unique count of ip.raw"
AS45899,"VNPT Corp",2590
AS7552,"Viettel Group",3600
AS3462,"Data Communication Business Group",1270
AS18403,"The Corporation for Financing & Promoting Technology",996
AS9121,"Turk Telekom",777
AS17552,"True Internet Co.,Ltd.",676
AS24086,"Viettel Corporation",531
AS4788,"TM Net, Internet Service Provider",428
AS17974,"PT Telekomunikasi Indonesia",376
AS45758,"Triple T Internet/Triple T Broadband",479
AS23969,"TOT Public Company Limited",325
AS18881,"TELEFÔNICA BRASIL S.A",319
AS8452,"TE-AS",259
AS9829,"National Internet Backbone",178
AS12880,"Information Technology Company (ITC)",277
AS8708,"RCS & RDS",270
AS8151,"Uninet S.A. de C.V.",282
AS9329,"Sri Lanka Telecom Internet",334
AS7738,"Telemar Norte Leste S.A.",183
AS3269,"Telecom Italia",209

{"version":"0.3.1","atoms":[["soft-return","",{}]],"cards":[["markdown",{"markdown":"Update 2019.12.04: Recently we have received quite a few requests of comment about this blog. We feel it necessary to list following facts here:\n\n1.\tKenneth Crurrin Schuchman, with nicknames \"Nexus\" or \"Nexus-Zeta\", a 21 years old young man, has pleaded guilty on 2019.09.03 to the United States District Court for the District of Alaska. The Factual Basis in the Plea Agreement show that Schuchman and his co-conspirators has infected massive devices to create a series of botnets, including Satori, Okiru, Masuta, Tsunami and Fbot, and to make money through them.\n2.\tThe vulnerability listed in this blog, is not inside Hisilicon Soc Chipset or product. Through later analyze and communication with the security community, we are sure it is located in one downstream vendor. To protect our end users, we will not disclose the vulnerability detail, the attack payload, or the name of the vendor.\n3.\tHuawei PSIRT took a responsible action for this event.\n \nReaders, please kindly keep in mind that the string Hisilicon listed in this blog or buried in the malware sample is derived from the misunderstanding of Schuchman and his co-conspirators. Actually, the whole IoT supply chain is so complex for every single pacificator, that only by a throughout cooperation from the industry and the security community can we make it safer. \n\n\nUpdate 2019.02.21: we have captured the key exploit at around 11am 2/21 (GMT+8), it appears that some vendor have weak security implementation of DVRIP protocol, and attacker has spot the weakness and sets up telnet backdoor and inject Fbot botnet on the related victims."}],["image",{"src":"__GHOST_URL__/content/images/2019/02/fbot.png","alt":"fbot","title":"","caption":"Figure 1: Infected camera IP country/region distribution"}],["code",{"code":"VN 6760\nTW 2110\nTH 1459\nBR 1276\nTR 1137\nIN 942\nIR 892\nRU 862\nID 609\nRO 579\nMY 553\nIT 489\nCO 363\nEG 362\nLK 360\nUS 328\nAR 310\nMX 293\nFR 255\nPK 237\nUY 185\nPL 184\nGB 184\nVE 183\nCL 177\nMA 176\nUA 166\nBG 147\nGR 142\nHU 141\nSG 130\nIL 123\nDE 109\nBD 106\nES 103"}],["code",{"code":"   8262 bigfish\n   3534 hi3520d\n    383 godarm\n    302 godnet\n     78 hi3535\n      8 Hisilicon Hi3536DV100 (Flattened Device Tree)\n"}],["image",{"src":"__GHOST_URL__/content/images/2019/02/fbot_http_scan-3.png","caption":"Figure 2: Infection process"}],["code",{"code":"http://185.61.138.13:8080/fbot.arm5.u\nhttp://185.61.138.13:8080/fbot.arm7.u\n"}],["image",{"src":"__GHOST_URL__/content/images/2019/02/image001.png","alt":"image001","title":""}],["image",{"src":"__GHOST_URL__/content/images/2019/02/image003.png","alt":"image003","title":""}],["image",{"src":"__GHOST_URL__/content/images/2019/02/image004.png","alt":"image004","title":""}],["image",{"src":"__GHOST_URL__/content/images/2019/02/image006.png","alt":"image006","title":""}],["image",{"src":"__GHOST_URL__/content/images/2019/02/image008.png","alt":"image008","title":""}],["code",{"code":"C2:\nxabolfpzbz.ukrainianhorseriding.com:6592\n\nreporter ip:\n185.61.138.13:6565\n\nloader ip:\n185.61.138.13\n\nurl:\nhttp://185.61.138.13:8080/fbot.arm5.u\nhttp://185.61.138.13:8080/fbot.arm7.u\n\nmd5:\n9827375cd2e8ee9e3acc870e4b4c6097  downloader\n3b7f5be1c1ed582042f783ffcb23b754  downloader\n43a7d9956720b86330d4985c773e76c1  fbot.arm5.u\n\n"}],["code",{"code":"\"geoip.number.raw: Descending\",\"geoip.asn.raw: Descending\",\"Unique count of ip.raw\"\nAS45899,\"VNPT Corp\",2590\nAS7552,\"Viettel Group\",3600\nAS3462,\"Data Communication Business Group\",1270\nAS18403,\"The Corporation for Financing & Promoting Technology\",996\nAS9121,\"Turk Telekom\",777\nAS17552,\"True Internet Co.,Ltd.\",676\nAS24086,\"Viettel Corporation\",531\nAS4788,\"TM Net, Internet Service Provider\",428\nAS17974,\"PT Telekomunikasi Indonesia\",376\nAS45758,\"Triple T Internet/Triple T Broadband\",479\nAS23969,\"TOT Public Company Limited\",325\nAS18881,\"TELEFÔNICA BRASIL S.A\",319\nAS8452,\"TE-AS\",259\nAS9829,\"National Internet Backbone\",178\nAS12880,\"Information Technology Company (ITC)\",277\nAS8708,\"RCS & RDS\",270\nAS8151,\"Uninet S.A. de C.V.\",282\nAS9329,\"Sri Lanka Telecom Internet\",334\nAS7738,\"Telemar Norte Leste S.A.\",183\nAS3269,\"Telecom Italia\",209\n"}]],"markups":[["a",["href","__GHOST_URL__/threat-alert-a-new-worm-fbot-cleaning-adbminer-is-using-a-blockchain-based-dns-en/"]],["a",["href","https://twitter.com/360Netlab"]],["strong"]],"sections":[[10,0],[1,"h3",[[0,[],0,"Background introduction"]]],[1,"p",[[0,[],0,"Beginning on February 16, 2019, 360Netlab has discovered that a large number of HiSilicon DVR/NVR Soc devices have been exploited by attackers to load an updated Fbot botnet program. Fbot was originally discovered and disclosed by 360Netlab ["],[0,[0],1,"1]"],[0,[],0," , it has been active and is constantly being upgraded. The Fbot we captured this time is a variant targeting HiSilicon DVR/NVR Soc device. (Please bear in mind that IoT product has a long market chain and thing can go wrong at every possible downstream or upstream manufacturere, we list HiSilicon DVR/NVR Soc here as that is what is being shown on the bots themself, the root problem might be a specific OEM application running on top of the HiSilicon. Without a working exploit, this is a question yet to be answered.)"]]],[1,"h3",[[0,[],0,"Fbot infection target"]]],[1,"p",[[0,[],0,"By probing the IP banner information of the infected devices, we get a list of infected device models and all banner messages suggest that the bots have HiSilicon DVR/NVR Soc device family CPU running . We see a few different camera brands as a number of camera manufacturers oem HiSilicon DVR/NVR Soc device."]]],[1,"p",[[0,[],0,"All together, we have 24528 infected IPs"]]],[10,1],[1,"p",[[0,[],0,"The following is a country breakdown of infected camera IPs"]]],[10,2],[1,"p",[[0,[],0,"The following is a list of infected camera's CPU models"]]],[10,3],[1,"h3",[[0,[],0,"Fbot infection process"]]],[1,"p",[[0,[],0,"The Fbot infection is a multiple steps process, and we successfully captured Fbot samples and some Paylods through our Anglerfish honeypot and some Fuzz Testing tricks. We have not yet captured the key Exploit Payload though and would be interested if anyone has more detail on that. "]]],[1,"p",[[0,[],0,"The following is overall infection process."]]],[10,4],[1,"p",[[0,[],0,"First, the device that is infected with Fbot scans  TCP: 80, 81, 88, 8000, 8080 ports by issuing basic HTTP requests. When a target device returns the matching characteristics, Fbot will report the IP and port to its Reporter (185.61. 138.13:6565)."]]],[1,"p",[[0,[],0,"After that, Fbot Loader (185.61.138.13) logs in to the target device web port through the device default password “admin/empty password”. If the target device responses, Fbot Loader uses the device default password “admin/tlJwpbo6” to log in to the dvrip port. (TCP: 34567)."]]],[1,"p",[[0,[],0,"Since our Anglerfish honeypot has not emulated the dvrip protocol yet, we have no visibility on how the exploit works, is it by normal dvr protocol or some new exploit?  We have no answer at this point."]]],[1,"h3",[[0,[],0,"Fuzz Fbot Loader"]]],[1,"p",[[0,[],0,"Nevertheless, we still successfully bypassed the Fbot Loader's Exploit logic by performing Fuzz Testing on the dvrip protocol to see the rest actions of this botnet. It appears that the Fbot Loader then populates the Fbot downloader to our TCP: 9000 port via the Shell command. With this, we got the Fbot Downloader sample, and then through the Downloader sample we got the Fbot download URL."]]],[10,5],[1,"h2",[[0,[],0,"Sample analysis"]]],[1,"h3",[[0,[],0,"Downloader"]]],[1,"p",[[0,[],0,"MD5：3b7f5be1c1ed582042f783ffcb23b754"],[1,[],0,0],[0,[],0,"This sample is delivered on the 9000 port through command line (echo -ne XXXXXX > downloader). It has only one mission, to download the Fbot and execute it through the HTTP protocol. The figure below shows the a snip of the sample. You can see the relevant code to download Fbot:"]]],[10,6],[1,"h3",[[0,[],0,"fbot.arm5.u"]]],[1,"p",[[0,[],0,"The fbot sample, MD5:  43A7D9956720B86330D4985C773E76C1"]]],[1,"h4",[[0,[],0,"Encryption"]]],[1,"p",[[0,[],0,"Two different layers of encryption and decryption codes are used in the sample to protect the static resources in the sample from being analyzed."]]],[1,"p",[[0,[],0,"The first part uses a single-byte XOR algorithm (exclusive OR 0x31), the relevant code is shown below (Python 2.7):"]]],[10,7],[1,"p",[[0,[],0,"After the above code is run, we get two code tables, which are ciphertext table/clear text table. By replacing the characters with the above two code tables, the static strings in the sample can be decrypted. The relevant code is shown below (Python):"]]],[10,8],[1,"p",[[0,[],0,"After the first line of output is truncated, the Fbot's C2 address (xabolfpzbz.ukrainianhorseriding.com) can be obtained."]]],[1,"p",[[0,[],0,"Then you can see some instructions (PING/PONG/LOLNOGTFO) and resource control related strings."]]],[1,"p",[[0,[],0,"It is worth noting that the last two lines of strings are the strings related to the ongoing scan event. Where \"GET / HTTP/1.0\" is used for scanning, and \"uc-httpd 1.0.0\" is the target feature. With the support of MIRAI-SYN-SCAN, once a qualified target is found, the target address information (IP:PORT) will be reported to the core Loader (185.61.138.13:6565). The relevant code and protocol format are as follows: "]]],[10,9],[1,"h4",[[0,[],0,"DDOS attacks"]]],[1,"p",[[0,[],0,"There are five attack vectors of this Fbot varaint, all of which are DDOS related. The relevant initialization code is as follows:"]]],[10,10],[1,"h3",[[0,[],0,"Summary"]]],[1,"p",[[0,[],0,"Relevant security and law enforcement agencies are welcomed to contact netlab[at]360.cn for a list of infected IP addresses."]]],[1,"h4",[[0,[],0,"Contact Us"]]],[1,"p",[[0,[],0,"Relevant security and law enforcement agencies are welcomed to contact netlab[at]360.cn for a list of infected IP addresses."]]],[1,"p",[[0,[],0,"Readers can reach us on our "],[0,[1,2],2,"twitter"],[0,[],0,", WeChat "],[0,[2],1,"360Netlab"],[0,[],0," or email to netlab at 360 dot cn."]]],[1,"h3",[[0,[],0,"IoC list"]]],[10,11],[1,"h3",[[0,[],0,"ASN Top 20"]]],[10,12]],"ghostVersion":"3.0"}