{"id":2754,"date":"2018-03-13T09:19:15","date_gmt":"2018-03-13T12:19:15","guid":{"rendered":"https:\/\/www.nachodelatorre.com.ar\/mosconi\/?p=2754"},"modified":"2018-03-13T09:19:15","modified_gmt":"2018-03-13T12:19:15","slug":"omg-convierte-dispositivos-iot-en-servidores-proxy","status":"publish","type":"post","link":"https:\/\/www.fie.undef.edu.ar\/ceptm\/?p=2754","title":{"rendered":"OMG convierte dispositivos IoT en servidores proxy"},"content":{"rendered":"<p>Una nueva variante de Mirai ha sido descubierta por investigadores de Fortinet. Bautizada como OMG, la funcionalidad que la define es la capacidad de utilizar los dispositivos IoT infectados como servidores proxy.<!--more--><\/p>\n<div class=\"cmp cmp-text aem-GridColumn aem-GridColumn--default--12\">\n<p>In preparation for our talk entitled \u201cIoT: Battle of Bots\u201d at the\u00a0<a href=\"https:\/\/www.rootedcon.com\/speakers\">RootedCon<\/a>\u00a0Security conference that will be held in Madrid, Spain this March 2018, the FortiGuard Labs team encountered yet another new Mirai variant.<\/p>\n<p>Since the release of the source code of the Mirai botnet, FortiGuard Labs has seen a number of variations and adaptations written by multiple authors entering the IoT threat landscape. These modified Mirai-based bots differ by adding new techniques, in addition to the original telnet brute force login, including the use of\u00a0<a href=\"https:\/\/blog.fortinet.com\/2017\/12\/12\/rise-of-one-more-mirai-worm-variant\">exploits<\/a>\u00a0and the targeting of more\u00a0<a href=\"https:\/\/blog.fortinet.com\/2018\/01\/25\/iot-botnet-more-targets-in-okirus-cross-hairs\">architectures<\/a>. We have also observed that the motivation for many of the modifications to Mirai is to earn more money. Mirai was originally designed for DDoS attack, but later modifications were used to target vulnerable\u00a0<a href=\"https:\/\/blog.fortinet.com\/2018\/02\/02\/satori-adds-known-exploit-chain-to-slave-wireless-ip-cameras\">ETH mining rigs<\/a>\u00a0to mine cryptocurrency. In this article we will discuss about how a Mirai-based bot called OMG turns an IoT device into a proxy server.<\/p>\n<p>In October 2016, an\u00a0<a href=\"https:\/\/krebsonsecurity.com\/2016\/10\/iot-devices-as-proxies-for-cybercrime\/\">article<\/a>\u00a0was published by Brian Krebs about how cybercriminals earn money by converting IoT devices into proxy servers.\u00a0 Cybercriminals use proxies to add anonymity when doing various dirty work such as cyber theft, hacking into a system, etc. One way to earn money with proxy servers is to sell the access to these servers to other cybercriminals. This is what we think the motivation is behind this latest Mirai-based bot.<\/p>\n<p>In this article, we will also take a look at its similarities compared to the original Mirai.<\/p>\n<\/div>\n<div class=\"cmp cmp-title aem-GridColumn aem-GridColumn--default--12\">\n<h3>Mirai vs OMG<\/h3>\n<\/div>\n<div class=\"cmp cmp-text aem-GridColumn aem-GridColumn--default--12\">\n<p>We begin by taking a look at the configuration table of OMG. The table, originally encrypted, was decrypted using 0xdeadbeef as the cipher key seed, using the same procedure adopted for the original Mirai. The first thing we noticed are the strings\u00a0<i>\/bin\/busybox OOMGA<\/i>\u00a0and\u00a0<i>OOMGA: applet<\/i>\u00a0<i>not found<\/i>. The name Mirai was given to the Mirai bot because of the strings\u00a0<i>\/bin\/busybox MIRAI<\/i>\u00a0and\u00a0<i>MIRAI: applet<\/i>\u00a0<i>not found,\u00a0<\/i>which are commands to determine if it has successfully brute-forced its way into the targeted IoT device. These strings are similar with other variations such as Satori\/Okiru, Masuta, etc.<\/p>\n<p>For this reason, we decided to name this variant OMG.<\/p>\n<p>This variant also adds and removes some configurations that can be found in the original Mirai code. Two notable additions are the two strings that are used to add a firewall rule to allow traffic on two random ports, which we will discuss in the latter part of the article.<\/p>\n<\/div>\n<div class=\"cmp cmp-image aem-GridColumn aem-GridColumn--default--12\"><img class=\"\" src=\"https:\/\/www.fortinet.com\/content\/fortinet-blog\/us\/en\/threat-research\/omg--mirai-based-bot-turns-iot-devices-into-proxy-servers\/_jcr_content\/root\/responsivegrid\/image_100117124.img.png\" alt=\"\" \/><span class=\"cmp-image--title\">Fig 1. Configuration table of OMG<\/span><\/div>\n<div class=\"cmp cmp-text aem-GridColumn aem-GridColumn--default--12\">\n<p>It looks like OMG keeps Mirai\u2019s original modules, including the attack, killer, and scanner modules. This means that it can also do what the original Mirai could, i.e. kill processes (related to telnet, ssh, http by checking open ports, and other processes related to other bots), telnet brute-force login to spread, and DOS attack.<\/p>\n<\/div>\n<div class=\"cmp cmp-image aem-GridColumn aem-GridColumn--default--12\"><img class=\"\" src=\"https:\/\/www.fortinet.com\/content\/fortinet-blog\/us\/en\/threat-research\/omg--mirai-based-bot-turns-iot-devices-into-proxy-servers\/_jcr_content\/root\/responsivegrid\/image_580877082.img.png\" alt=\"\" \/><span class=\"cmp-image--title\">Fig 2. Mirai\u2019s main modules<\/span><\/div>\n<div class=\"cmp cmp-text aem-GridColumn aem-GridColumn--default--12\">\n<p>After initializing the modules, OMG proceeds to connect to the command and control (CnC) server. The configuration table below contains the CnC server string,\u00a0<i>ccnew.mm.my,\u00a0<\/i>which resolves to 188.138.125.235.<\/p>\n<\/div>\n<div class=\"cmp cmp-image aem-GridColumn aem-GridColumn--default--12\"><img class=\"\" src=\"https:\/\/www.fortinet.com\/content\/fortinet-blog\/us\/en\/threat-research\/omg--mirai-based-bot-turns-iot-devices-into-proxy-servers\/_jcr_content\/root\/responsivegrid\/image_1852561122.img.png\" alt=\"\" \/><span class=\"cmp-image--title\">Fig 3. CnC domain resolution<\/span><\/div>\n<div class=\"cmp cmp-text aem-GridColumn aem-GridColumn--default--12\">\n<p>The CnC port, also included in the configuration table, is 50023.<\/p>\n<\/div>\n<div class=\"cmp cmp-image aem-GridColumn aem-GridColumn--default--12\"><img class=\"\" src=\"https:\/\/www.fortinet.com\/content\/fortinet-blog\/us\/en\/threat-research\/omg--mirai-based-bot-turns-iot-devices-into-proxy-servers\/_jcr_content\/root\/responsivegrid\/image_1636789518.img.png\" alt=\"\" \/><span class=\"cmp-image--title\">Fig 4. CnC port 50023<\/span><\/div>\n<div class=\"cmp cmp-text aem-GridColumn aem-GridColumn--default--12\">\n<p>Unfortunately, the CnC server was not responding when we did our analysis, so much of our findings are based on static analysis.<\/p>\n<p>When connected, OMG sends a defined data message (0x00000000) to the CnC to identify itself as a new bot.<\/p>\n<\/div>\n<div class=\"cmp cmp-image aem-GridColumn aem-GridColumn--default--12\"><img class=\"\" src=\"https:\/\/www.fortinet.com\/content\/fortinet-blog\/us\/en\/threat-research\/omg--mirai-based-bot-turns-iot-devices-into-proxy-servers\/_jcr_content\/root\/responsivegrid\/image_1041220377.img.png\" alt=\"\" \/><span class=\"cmp-image--title\">Fig 5. Data sent identifies it as new bot<\/span><\/div>\n<div class=\"cmp cmp-text aem-GridColumn aem-GridColumn--default--12\">\n<p>Based on the code, the bot receives a 5-byte long data string from the server, with the first byte being the command on how the IoT device will be used. Expected values are:\u00a0<b>0<\/b>\u00a0to be used as a proxy server,\u00a0<b>1<\/b>\u00a0for attack, and\u00a0<b>&gt;1<\/b>\u00a0to terminate the connection.<\/p>\n<\/div>\n<div class=\"cmp cmp-image aem-GridColumn aem-GridColumn--default--12\"><img class=\"\" src=\"https:\/\/www.fortinet.com\/content\/fortinet-blog\/us\/en\/threat-research\/omg--mirai-based-bot-turns-iot-devices-into-proxy-servers\/_jcr_content\/root\/responsivegrid\/image_1226102507.img.png\" alt=\"\" \/><span class=\"cmp-image--title\">Fig 6. Expected option from CnC server<\/span><\/div>\n<div class=\"cmp cmp-title aem-GridColumn aem-GridColumn--default--12\">\n<h3>OMG using 3proxy<\/h3>\n<\/div>\n<div class=\"cmp cmp-text aem-GridColumn aem-GridColumn--default--12\">\n<p>This variant of Mirai uses 3proxy, an open source software, to serve as its proxy server. The set up begins by generating two random ports that will be used for the\u00a0<i>http_proxy_port<\/i>\u00a0and\u00a0<i>socks_proxy_port<\/i>. Once the ports are generated, they are reported to the CnC.<\/p>\n<\/div>\n<div class=\"cmp cmp-image aem-GridColumn aem-GridColumn--default--12\"><img class=\"\" src=\"https:\/\/www.fortinet.com\/content\/fortinet-blog\/us\/en\/threat-research\/omg--mirai-based-bot-turns-iot-devices-into-proxy-servers\/_jcr_content\/root\/responsivegrid\/image_176244147.img.png\" alt=\"\" \/><span class=\"cmp-image--title\">Fig 7. Proxy setup<\/span><\/div>\n<div class=\"cmp cmp-text aem-GridColumn aem-GridColumn--default--12\">\n<p>For the proxy to work properly, a firewall rule must be added to allow traffic on the generated ports. As mentioned earlier, two strings containing the command for adding and removing a firewall rule to enable this were added to the configuration table .<\/p>\n<\/div>\n<div class=\"code-snippet aem-GridColumn aem-GridColumn--default--12\">\n<pre class=\"language-clike code-toolbar\"><code class=\" language-clike\">TABLE_IPTABLES1 <span class=\"token operator\">-<\/span><span class=\"token operator\">&gt;<\/span> used to INSERT a firewall rule<span class=\"token punctuation\">.<\/span>\niptables <span class=\"token operator\">-<\/span>I INPUT <span class=\"token operator\">-<\/span>p tcp <span class=\"token operator\">--<\/span>dport <span class=\"token operator\">%<\/span>d <span class=\"token operator\">-<\/span>j ACCEPT<span class=\"token punctuation\">;<\/span>\niptables <span class=\"token operator\">-<\/span>I OUTPUT <span class=\"token operator\">-<\/span>p tcp <span class=\"token operator\">--<\/span>sport <span class=\"token operator\">%<\/span>d <span class=\"token operator\">-<\/span>j ACCEPT<span class=\"token punctuation\">;<\/span>\niptables <span class=\"token operator\">-<\/span>I PREROUTING <span class=\"token operator\">-<\/span>t nat <span class=\"token operator\">-<\/span>p tcp <span class=\"token operator\">--<\/span>dport <span class=\"token operator\">%<\/span>d <span class=\"token operator\">-<\/span>j ACCEPT<span class=\"token punctuation\">;<\/span>\niptables <span class=\"token operator\">-<\/span>I POSTROUTING <span class=\"token operator\">-<\/span>t nat <span class=\"token operator\">-<\/span>p tcp <span class=\"token operator\">--<\/span>sport <span class=\"token operator\">%<\/span>d <span class=\"token operator\">-<\/span>j ACCEPT\n \nTABLE_IPTABLES2 <span class=\"token operator\">-<\/span><span class=\"token operator\">&gt;<\/span> used to DELETE a firewall rule<span class=\"token punctuation\">.<\/span>\niptables <span class=\"token operator\">-<\/span>D INPUT <span class=\"token operator\">-<\/span>p tcp <span class=\"token operator\">--<\/span>dport <span class=\"token operator\">%<\/span>d <span class=\"token operator\">-<\/span>j ACCEPT<span class=\"token punctuation\">;<\/span>\niptables <span class=\"token operator\">-<\/span>D OUTPUT <span class=\"token operator\">-<\/span>p tcp <span class=\"token operator\">--<\/span>sport <span class=\"token operator\">%<\/span>d <span class=\"token operator\">-<\/span>j ACCEPT<span class=\"token punctuation\">;<\/span>\niptables <span class=\"token operator\">-<\/span>D PREROUTING <span class=\"token operator\">-<\/span>t nat <span class=\"token operator\">-<\/span>p tcp <span class=\"token operator\">--<\/span>dport <span class=\"token operator\">%<\/span>d <span class=\"token operator\">-<\/span>j ACCEPT<span class=\"token punctuation\">;<\/span>\niptables <span class=\"token operator\">-<\/span>D POSTROUTING <span class=\"token operator\">-<\/span>t nat <span class=\"token operator\">-<\/span>p tcp <span class=\"token operator\">--<\/span>sport <span class=\"token operator\">%<\/span>d <span class=\"token operator\">-<\/span>j ACCEPT\n\n<\/code><\/pre>\n<div class=\"toolbar\">\n<div class=\"toolbar-item\"><a>Copy<\/a><\/div>\n<\/div>\n<\/div>\n<div class=\"cmp cmp-image aem-GridColumn aem-GridColumn--default--12\"><img class=\"\" src=\"https:\/\/www.fortinet.com\/content\/fortinet-blog\/us\/en\/threat-research\/omg--mirai-based-bot-turns-iot-devices-into-proxy-servers\/_jcr_content\/root\/responsivegrid\/image_787876606.img.png\" alt=\"\" \/><span class=\"cmp-image--title\">Fig 8. Firewall enable\/disable function<\/span><\/div>\n<div class=\"cmp cmp-text aem-GridColumn aem-GridColumn--default--12\">\n<p>After enabling the firewall rule to allow traffic to pass through the randomly generated HTTP and SOCKS ports, it sets up 3proxy with predefined configuration embedded in its code.<\/p>\n<\/div>\n<div class=\"cmp cmp-image aem-GridColumn aem-GridColumn--default--12\"><img class=\"\" src=\"https:\/\/www.fortinet.com\/content\/fortinet-blog\/us\/en\/threat-research\/omg--mirai-based-bot-turns-iot-devices-into-proxy-servers\/_jcr_content\/root\/responsivegrid\/image_751955053.img.png\" alt=\"\" \/><span class=\"cmp-image--title\">Fig 9. Proxy configuration<\/span><\/div>\n<div class=\"cmp cmp-text aem-GridColumn aem-GridColumn--default--12\">\n<p>As the server was not alive during analysis, we are assuming that the author sells access to the IoT proxy server, providing them access credentials.<\/p>\n<\/div>\n<div class=\"cmp cmp-title aem-GridColumn aem-GridColumn--default--12\">\n<h3>Conclusion<\/h3>\n<\/div>\n<div class=\"cmp cmp-text aem-GridColumn aem-GridColumn--default--12\">\n<p>This is the first time we have seen a modified Mirai capable of DDOS attacks as well as setting up proxy servers on vulnerable IoT devices. With this development, we believe that more and more Mirai-based bots are going to emerge with new ways of monetization.<\/p>\n<p>As always, FortiGuard Labs will continue monitoring Mirai and its derivatives and share interesting insights from our research.<\/p>\n<p><i>Thank you for additional insights from our colleague Artem Semenchenko<\/i><\/p>\n<p>-= FortiGuard Lion Team =-<\/p>\n<p>IOC<\/p>\n<p>All samples detected as Linux\/Mirai.A!tr<\/p>\n<p><a id=\"OLE_LINK8\" name=\"OLE_LINK8\"><\/a><a id=\"OLE_LINK7\" name=\"OLE_LINK7\"><\/a>9110c043a7a6526d527b675b4c50319c3c5f5c60f98ce8426c66a0a103867e4e<\/p>\n<p>a5efdfdf601542770e29022f3646d4393f4de8529b1576fe4e31b4f332f5cd78<\/p>\n<p><a id=\"OLE_LINK2\" name=\"OLE_LINK2\"><\/a>d3ed96829df1c240d1a58ea6d6690121a7e684303b115ca8b9ecf92009a8b26a<\/p>\n<p><a id=\"OLE_LINK10\" name=\"OLE_LINK10\"><\/a><a id=\"OLE_LINK9\" name=\"OLE_LINK9\"><\/a>eabda003179c8499d47509cd30e1d3517e7ef6028ceb347a2f4be47083029bc6<\/p>\n<p>9b2fe793ed900e95a72731b31305ed92f88c2ec95f4b04598d58bd9606f8a01d<\/p>\n<p><a id=\"OLE_LINK16\" name=\"OLE_LINK16\"><\/a><a id=\"OLE_LINK15\" name=\"OLE_LINK15\"><\/a><a id=\"OLE_LINK14\" name=\"OLE_LINK14\"><\/a><a id=\"OLE_LINK13\" name=\"OLE_LINK13\"><\/a><a id=\"OLE_LINK12\" name=\"OLE_LINK12\"><\/a><a id=\"OLE_LINK11\" name=\"OLE_LINK11\"><\/a>2804f6cb611dc54775145b1bb0a51a19404c0b3618b12e41b7ea8deaeb9e357f<\/p>\n<p>CC<\/p>\n<p><a id=\"OLE_LINK1\" name=\"OLE_LINK1\"><\/a>54.234.123.22<\/p>\n<p>ccnew.mm.my<\/p>\n<p>rpnew.mm.my<\/p>\n<\/div>\n<p><strong>Fuente:<\/strong>\u00a0<em><a href=\"https:\/\/www.fortinet.com\/blog\/threat-research\/omg--mirai-based-bot-turns-iot-devices-into-proxy-servers.html\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.fortinet.com<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Una nueva variante de Mirai ha sido descubierta por investigadores de Fortinet. Bautizada como OMG, la funcionalidad que la define es la capacidad de utilizar&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[23,29],"tags":[],"_links":{"self":[{"href":"https:\/\/www.fie.undef.edu.ar\/ceptm\/index.php?rest_route=\/wp\/v2\/posts\/2754"}],"collection":[{"href":"https:\/\/www.fie.undef.edu.ar\/ceptm\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fie.undef.edu.ar\/ceptm\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fie.undef.edu.ar\/ceptm\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fie.undef.edu.ar\/ceptm\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2754"}],"version-history":[{"count":0,"href":"https:\/\/www.fie.undef.edu.ar\/ceptm\/index.php?rest_route=\/wp\/v2\/posts\/2754\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.fie.undef.edu.ar\/ceptm\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fie.undef.edu.ar\/ceptm\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fie.undef.edu.ar\/ceptm\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}