%3CLINGO-SUB%20id%3D%22lingo-sub-1645968%22%20slang%3D%22en-US%22%3ETeamTNT%20activity%20targets%20Weave%20Scope%20deployments%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1645968%22%20slang%3D%22en-US%22%3E%3CP%3EYossi%20Weizman%2C%20Security%20Researcher%2C%20Azure%20Security%20Center%3CBR%20%2F%3ERoss%20Bevington%2C%20Principal%20Software%20Engineer%2C%20Microsoft%20Threat%20Intelligence%20Center%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20cybercrime%20group%20TeamTNT%20has%20been%20tracked%20by%20various%20research%20groups%20for%20a%20while%20now%2C%20with%20several%20articles%20that%20were%20written%20about%20their%20activity%20that%20is%20focused%20on%20Docker%20workloads.%20In%20May%2C%20TrendMicro%20research%20team%20%3CA%20href%3D%22https%3A%2F%2Fwww.trendmicro.com%2Fvinfo%2Fhk-en%2Fsecurity%2Fnews%2Fvirtualization-and-cloud%2Fcoinminer-ddos-bot-attack-docker-daemon-ports%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Edescribed%3C%2FA%3E%20the%20group%E2%80%99s%20attempts%20to%20spread%20cryptocurrency%20miners%20via%20exposed%20Docker%20API%20servers.%20In%20August%2C%20Aqua%20Security%20released%20%3CA%20href%3D%22https%3A%2F%2Fblog.aquasec.com%2Fcontainer-security-tnt-container-attack%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ean%20analysis%3C%2FA%3E%20of%20several%20images%20that%20are%20stored%20under%20TeamTNT%E2%80%99s%20Dockerhub%20account%3A%20%3CEM%3Ehildeteamtnt%3C%2FEM%3E.%20In%20this%20blog%20we%20will%20share%20new%20details%20about%20this%20group%20and%20elaborate%20about%20another%2C%20an%20unknown%2C%20access%20vector%20that%20the%20group%20uses%20in%20addition%20to%20exposed%20Docker%20API%20servers.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAzure%20Security%20Center%20leverages%20data%20that%20is%20collected%20by%20Microsoft%20Threat%20Intelligence%20Center%E2%80%99s%20sensor%20network.%20In%20mid-August%2C%20several%20deployments%20of%20the%20image%20%3CSTRONG%3Ehildeteamtnt%2Fpause-amd64%3A3.4%20%3C%2FSTRONG%3Ewere%20observed%20in%20our%20sensor%20network.%20This%20repository%20hasn%E2%80%99t%20been%20seen%20in%20previous%20known%20attacks%20of%20this%20group.%20Another%20image%20from%20that%20repository%3CSTRONG%3E%2C%20pause-amd64%3A3.3%2C%20%3C%2FSTRONG%3Ewas%20seen%20as%20well.%20In%20this%20blog%20post%2C%20we%E2%80%99ll%20focus%20on%20the%20first%20image%2C%20pause-amd64%3A3.4%2C%20which%20has%20more%20functionality.%20Microsoft's%20sensor%20network%20exposes%20an%20open%20Docker%20API%20server%20and%20tracks%20the%20connection%20to%20this%20service.%20The%20attackers%20tried%20to%20deploy%20their%20images%20via%20this%20service%2C%20which%20is%20consistent%20with%20the%20known%20behavior%20of%20TeamTNT%20group%2C%20that%20spread%20their%20malware%20in%20this%20method.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20image%20has%20been%20deployed%20also%20on%20several%20Kubernetes%20clusters.%20Azure%20Kubernetes%20Service%20(AKS)%20is%20a%20managed%20Kubernetes%20service%20that%20allows%20customers%20to%20easily%20deploy%20a%20Kubernetes%20cluster%20in%20Azure.%20Azure%20Security%20Center%20monitors%20the%20behavior%20of%20the%20AKS%20management%20layer%20as%20well%20as%20the%20behavior%20of%20the%20containers%20themselves%20to%20find%20malicious%20activity.%20%26nbsp%3BAKS%20clusters%2C%20as%20managed%20services%2C%20should%20not%20expose%20Docker%20API%20externally.%20The%20fact%20that%20several%20clusters%20were%20infected%20by%20this%20image%20might%20imply%20that%20there%20is%20additional%20access%20vector%20that%20is%20used%20by%20the%20group%20for%20spreading%20their%20malware.%20And%20indeed%2C%20we%20discovered%20an%20additional%20access%20vector%20that%20is%20used%20by%20this%20group%20which%20we%20will%20describe%20later.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20image%20%3CSTRONG%3Epause-amd64%3A3.4%20%3C%2FSTRONG%3Ehas%20a%20similar%20functionality%20to%20other%20images%20that%20are%20used%20by%20this%20group%20and%20is%20focused%20on%20running%20cryptocurrency%20mining%20and%20spreading%20the%20malware%20to%20other%20machines.%3C%2FP%3E%0A%3CP%3EThe%20entry%20point%20of%20the%20image%20is%20%3CEM%3E%2Froot%2Fpause%3C%2FEM%3E%20which%20is%20a%20shell%20script.%3C%2FP%3E%0A%3CP%3EThe%20script%20starts%20with%20downloading%20the%20main%20payload%3A%20Coin%20miner%20(packed%20with%20UPX)%20that%20is%20downloaded%20from%3A%20%3CEM%3Ehxxp%5B%3A%2F%2F%5D85.214.149.236%3A443%2Fsugarcrm%2Fthemes%2Fdefault%2Fimages%2Fdefault.jpg.%3C%2FEM%3E%20This%20server%2C%20located%20in%20Germany%2C%20contains%20large%20number%20binaries%20and%20malicious%20scripts%20that%20are%20used%20by%20this%20group.%20Some%20of%20them%20were%20observed%20in%20previous%20campaigns%20of%20this%20group%20and%20were%20analyzed%20before.%3C%2FP%3E%0A%3CP%3EThe%20miner%20is%20saved%20on%20the%20host%20as%20%3CEM%3E%2Fusr%2Fsbin%2Fdocker-update%3C%2FEM%3E%20and%20executed%20after%20allowing%20its%20execution%20and%20changing%20its%20attributes%20to%20immutable%3A%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditoryoweiz_4%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20id%3D%22tinyMceEditoryoweiz_8%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20712px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F217088iBF4C0A91EB4B55C0%2Fimage-dimensions%2F712x162%3Fv%3D1.0%22%20width%3D%22712%22%20height%3D%22162%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20attackers%20use%20a%20service%20called%20iplogger.org%20which%20allows%20them%20to%20track%20the%20number%20of%20infected%20hosts%20and%20get%20their%20details%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20624px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F217093i83950520FCE49DBE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20script%20enters%20a%20loop%2C%20in%20which%20in%20every%20iteration%20it%20invokes%20the%20function%20pwn()%20five%20times%3B%20each%20invocation%20differs%20in%20the%20second%20parameter%2C%20which%20is%20a%20destination%20port%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20624px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F217090iED79EA224E34E822%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20function%20itself%2C%20which%20a%20very%20similar%20version%20of%20it%20also%20seen%20on%20previous%20malware%20of%20the%20group%20as%20described%20by%20%3CA%20href%3D%22https%3A%2F%2Fwww.trendmicro.com%2Fvinfo%2Fhk-en%2Fsecurity%2Fnews%2Fvirtualization-and-cloud%2Fcoinminer-ddos-bot-attack-docker-daemon-ports%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ETrendMicro%3C%2FA%3E%2C%20%26nbsp%3Bretrieves%20an%20IP%20range%20from%20the%20server%20(first%20parameter)%20which%20returns%20a%20different%20range%20in%20every%20request.%20The%20function%20scans%20that%20range%20for%20open%20Docker%20API%20endpoints%20with%20the%20open-source%20tool%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Frobertdavidgraham%2Fmasscan%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Emasscan%3C%2FA%3E.%20The%20scanned%20port%20is%20passed%20as%20a%20parameter%20to%20the%20function.%20The%20scanned%20ports%20are%202375%2C%202376%2C%202377%2C%204243%20and%204244.%20On%20each%20exposed%20endpoint%20that%20is%20found%2C%20the%20script%20deploys%20the%20same%20image%20(pause-amd64%3A3.4)%20using%20the%20exposed%20TCP%20socket.%20In%20addition%2C%20the%20script%20attempts%20to%20kill%20competitor%20images%20using%20%3CEM%3Edocker%20rm%3C%2FEM%3E%20commands.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditoryoweiz_7%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20728px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F217086iD18EDE3CE0014F0A%2Fimage-dimensions%2F728x238%3Fv%3D1.0%22%20width%3D%22728%22%20height%3D%22238%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20details%20above%20refer%20to%20the%20image%20%3CEM%3Epause-amd%3A3.4%3C%2FEM%3E.%20The%20image%20%3CEM%3Epause-amd%3A3.3%2C%20%3C%2FEM%3Ethat%20was%20also%20seen%20in%20the%20honeypots%2C%20is%20very%20similar%20and%20contains%20the%20same%20reconnaissance%20and%20spreading%20phase.%20However%2C%20it%20does%20not%20include%20the%20execution%20of%20the%20miner%20itself.%20This%20image%20contains%20strings%20in%20German%2C%20which%20might%2C%20like%20the%20IP%20address%20of%20the%20payload%20server%2C%20point%20to%20the%20origin%20of%20the%20group.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20written%20above%2C%20that%20image%20was%20also%20observed%20on%20several%20AKS%20clusters%2C%20which%20are%20managed%20Kubernetes%20clusters.%20In%20such%20a%20scenario%2C%20it%20is%20less%20likely%20that%20Docker%20API%20service%20will%20be%20exposed%20to%20the%20Internet%2C%20as%20the%20AKS%20nodes%20are%20configured%20with%20the%20proper%20configuration%20of%20the%20Docker%20server.%20Therefore%2C%20we%20could%20assume%20that%20the%20attackers%20had%20a%20different%20access%20vector%20in%20those%20incidents.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20we%20looked%20for%20the%20common%20deployments%20of%20the%20various%20Kubernetes%20clusters%20that%20were%20infected%20by%20this%20image%2C%20we%20noticed%20that%20all%20of%20them%20have%20an%20open%20Weave%20Scope%20service.%20%3CA%20href%3D%22https%3A%2F%2Fwww.weave.works%2Foss%2Fscope%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EWeave%20Scope%3C%2FA%3E%20is%20a%20popular%20visualization%20and%20monitoring%20framework%20for%20containerized%20environments.%20Among%20other%20features%2C%20Weave%20Scope%20shows%20the%20running%20processes%20and%20the%20network%20connections%20of%20the%20various%20containers.%20In%20addition%2C%20Weave%20Scope%20allows%20users%20to%20run%20shell%20on%20the%20pods%20or%20nodes%20in%20the%20cluster%20(as%20root).%20Since%20Weave%20Scope%20does%20not%20use%20any%20authentication%20by%20default%2C%20exposure%20of%20this%20service%20to%20the%20Internet%20poses%20a%20severe%20security%20risk.%20And%20still%2C%20we%20see%20cluster%20administrators%20who%20enable%20public%20access%20to%20this%20interface%2C%20as%20well%20as%20other%20similar%20services.%20Attackers%2C%20including%20this%20group%2C%20take%20advantage%20of%20this%20misconfiguration%20and%20use%20the%20public%20access%20to%20compromise%20Kubernetes%20clusters.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20is%20not%20the%20first%20time%20that%20we%20detect%20a%20campaign%20that%20targets%20exposed%20sensitive%20interfaces%20to%20the%20Internet.%20In%20June%2C%20%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fsecurity%2Fblog%2F2020%2F06%2F10%2Fmisconfigured-kubeflow-workloads-are-a-security-risk%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ewe%20revealed%20a%20large%20scale%3C%2FA%3E%20attack%20that%20exploited%20exposed%20Kubeflow%20dashboard.%20In%20both%20cases%2C%20a%20high%20impact%20service%2C%20that%20allows%20eventually%20code%20execution%20on%20the%20containers%20or%20underlying%20nodes%20is%20openly%20exposed%20to%20the%20Internet.%20Misconfigured%20services%20seem%20to%20be%20among%20the%20most%20popular%20and%20dangerous%20access%20vectors%20when%20it%20comes%20to%20attacks%20against%20Kubernetes%20clusters.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EHow%20Azure%20Security%20Center%20protects%20customers%3F%3C%2FU%3E%3C%2FSTRONG%3E%3CU%3E%3C%2FU%3E%3C%2FP%3E%0A%3CP%3EAzure%20Security%20Center%20(ASC)%20detects%20this%20attack%2C%20as%20well%20as%20similar%20attacks%2C%20both%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsecurity-center%2Falerts-reference%23alerts-akscluster%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EKubernetes%20management%20layer%3C%2FA%3E%20and%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsecurity-center%2Falerts-reference%23alerts-containerhost%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Enode-level%3C%2FA%3E%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CU%3EManagement%20Layer%20protection%3C%2FU%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EASC%20automatically%20detects%20sensitive%20services%20that%20are%20exposed%20to%20the%20Internet.%20In%20this%20incident%2C%20ASC%20detected%20the%20exposed%20Weave%20Scope%20service.%20Detecting%20exposure%20of%20such%20services%20immediately%20when%20they%20occur%20is%20crucial%20to%20prevent%20their%20exploitation.%3C%2FLI%3E%0A%3CLI%3EASC%20detects%20deployments%20of%20malicious%20containers%20in%20AKS%20clusters.%20The%20detection%20covers%20the%20images%20that%20were%20used%20in%20this%20attack.%20ASC%20uses%20the%20data%20from%20Microsoft%20Threat%20Intelligence%20Center%E2%80%99s%20sensor%20network%20to%20continuously%20expand%20its%20coverage%20and%20detect%20the%20recent%20attacks%20in%20the%20wild.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CU%3ENode%20Level%20protection%3C%2FU%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EASC%20detects%20Docker%20API%20services%20that%20are%20openly%20accessible%20to%20the%20Internet.%3C%2FLI%3E%0A%3CLI%3EASC%20detects%20malicious%20behavior%20on%20the%20nodes%2C%20including%20cryptocurrency%20mining%20activity.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CU%3ERecommendations%3C%2FU%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EAzure%20Policy%20for%20Kubernetes%20can%20be%20used%20to%20restrict%20and%20audit%20sensitive%20actions%20in%20the%20cluster%20such%20as%20deploying%20images%20from%20public%20repositories%2C%20deployment%20of%20privileged%20containers%20etc.%20For%20more%20information%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fgovernance%2Fpolicy%2Fconcepts%2Fpolicy-for-kubernetes%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Esee%20the%20documentation%3C%2FA%3E.%20Integration%20with%20Azure%20Security%20Center%20will%20be%20available%20soon.%20Policies%20such%20as%20the%20following%20can%20prevent%20similar%20incidents%3A%20%E2%80%9C%3CEM%3EPrivileged%20containers%20should%20be%20avoided%3C%2FEM%3E%E2%80%9D%20and%20%E2%80%9C%3CEM%3EContainer%20images%20should%20be%20deployed%20from%20trusted%20registries%20only%3C%2FEM%3E%E2%80%9D%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EIoCs%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3Ehxxp%3A%2F%2F85%5B.%5D214%5B.%5D149%5B.%5D236%3A443%2Fsugarcrm%2Fthemes%2Fdefault%2Fimages%2Fdefault.jpg%3CSTRONG%3E%3CU%3E%3CBR%20%2F%3E%3C%2FU%3E%3C%2FSTRONG%3Ehxxp%3A%2F%2Frhuancarlos%5B.%5Dinforgeneses%5B.%5Dinf%5B.%5Dbr%2F%2520%2520%2520.%2520%2520%2520.%2520%2520%2520.%2Findex.php%3CSTRONG%3E%3CU%3E%3CBR%20%2F%3E%3C%2FU%3E%3C%2FSTRONG%3Ehildeteamtnt%2Fpause-amd64%3A3.4%3CBR%20%2F%3Ehildeteamtnt%2Fpause-amd64%3A3.3%3CBR%20%2F%3Esha256%3Ac88b9f32c143ee78b215b106320dbe79e28d39603353b0b9af2c806bcb9eb7b6%3CBR%20%2F%3Esha256%3A340d9af58a3b3bedaae040ce9640dd3a9a8c30ddde2c85fb7aa28d2bff2d663e%3CBR%20%2F%3Esha256%3A139f393594aabb20543543bd7d3192422b886f58e04a910637b41f14d0cad375%3CBR%20%2F%3Esha256%3A68ad2df23712767361d17a55ee13a3b482bee5a07ea3f3741c057db24b36bfce%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CU%3EUpdate%20(September%26nbsp%3B10%3CSUP%3Eth%3C%2FSUP%3E%202020)%3A%3C%2FU%3E%3C%2FP%3E%0A%3CP%3EFollowing%20the%20attack%2C%20Weaveworks%20has%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.weave.works%2Fblog%2Fpreventing-malicious-use-of-weave-scope%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ereleased%20a%20blog%20post%3C%2FA%3E%20about%20how%20to%20secure%20Weave%20Scope%20deployments%20and%20avoid%20this%20and%20similar%20attacks%20that%20use%20Weave%20Scope.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1645968%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20cybercrime%20group%20TeamTNT%20has%20been%20tracked%20by%20various%20research%20groups%20for%20a%20while%20now%2C%20with%20several%20articles%20that%20were%20written%20about%20their%20activity%20that%20is%20focused%20on%20Docker%20workloads.%20In%20this%20blog%20we%20will%20share%20new%20details%20about%20this%20group%20and%20elaborate%20about%20another%2C%20an%20unknown%2C%20access%20vector%20that%20the%20group%20uses%20in%20addition%20to%20exposed%20Docker%20API%20servers.%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

Yossi Weizman, Security Researcher, Azure Security Center
Ross Bevington, Principal Software Engineer, Microsoft Threat Intelligence Center

 

The cybercrime group TeamTNT has been tracked by various research groups for a while now, with several articles that were written about their activity that is focused on Docker workloads. In May, TrendMicro research team described the group’s attempts to spread cryptocurrency miners via exposed Docker API servers. In August, Aqua Security released an analysis of several images that are stored under TeamTNT’s Dockerhub account: hildeteamtnt. In this blog we will share new details about this group and elaborate about another, an unknown, access vector that the group uses in addition to exposed Docker API servers.

 

Azure Security Center leverages data that is collected by Microsoft Threat Intelligence Center’s sensor network. In mid-August, several deployments of the image hildeteamtnt/pause-amd64:3.4 were observed in our sensor network. This repository hasn’t been seen in previous known attacks of this group. Another image from that repository, pause-amd64:3.3, was seen as well. In this blog post, we’ll focus on the first image, pause-amd64:3.4, which has more functionality. Microsoft's sensor network exposes an open Docker API server and tracks the connection to this service. The attackers tried to deploy their images via this service, which is consistent with the known behavior of TeamTNT group, that spread their malware in this method.

 

This image has been deployed also on several Kubernetes clusters. Azure Kubernetes Service (AKS) is a managed Kubernetes service that allows customers to easily deploy a Kubernetes cluster in Azure. Azure Security Center monitors the behavior of the AKS management layer as well as the behavior of the containers themselves to find malicious activity.  AKS clusters, as managed services, should not expose Docker API externally. The fact that several clusters were infected by this image might imply that there is additional access vector that is used by the group for spreading their malware. And indeed, we discovered an additional access vector that is used by this group which we will describe later.

 

The image pause-amd64:3.4 has a similar functionality to other images that are used by this group and is focused on running cryptocurrency mining and spreading the malware to other machines.

The entry point of the image is /root/pause which is a shell script.

The script starts with downloading the main payload: Coin miner (packed with UPX) that is downloaded from: hxxp[://]85.214.149.236:443/sugarcrm/themes/default/images/default.jpg. This server, located in Germany, contains large number binaries and malicious scripts that are used by this group. Some of them were observed in previous campaigns of this group and were analyzed before.

The miner is saved on the host as /usr/sbin/docker-update and executed after allowing its execution and changing its attributes to immutable:

 
 

image.png

 

The attackers use a service called iplogger.org which allows them to track the number of infected hosts and get their details:

image.png

 

The script enters a loop, in which in every iteration it invokes the function pwn() five times; each invocation differs in the second parameter, which is a destination port:

image.png

 

The function itself, which a very similar version of it also seen on previous malware of the group as described by TrendMicro,  retrieves an IP range from the server (first parameter) which returns a different range in every request. The function scans that range for open Docker API endpoints with the open-source tool masscan. The scanned port is passed as a parameter to the function. The scanned ports are 2375, 2376, 2377, 4243 and 4244. On each exposed endpoint that is found, the script deploys the same image (pause-amd64:3.4) using the exposed TCP socket. In addition, the script attempts to kill competitor images using docker rm commands.

 

image.png

 

The details above refer to the image pause-amd:3.4. The image pause-amd:3.3, that was also seen in the honeypots, is very similar and contains the same reconnaissance and spreading phase. However, it does not include the execution of the miner itself. This image contains strings in German, which might, like the IP address of the payload server, point to the origin of the group.

 

As written above, that image was also observed on several AKS clusters, which are managed Kubernetes clusters. In such a scenario, it is less likely that Docker API service will be exposed to the Internet, as the AKS nodes are configured with the proper configuration of the Docker server. Therefore, we could assume that the attackers had a different access vector in those incidents.

 

When we looked for the common deployments of the various Kubernetes clusters that were infected by this image, we noticed that all of them have an open Weave Scope service. Weave Scope is a popular visualization and monitoring framework for containerized environments. Among other features, Weave Scope shows the running processes and the network connections of the various containers. In addition, Weave Scope allows users to run shell on the pods or nodes in the cluster (as root). Since Weave Scope does not use any authentication by default, exposure of this service to the Internet poses a severe security risk. And still, we see cluster administrators who enable public access to this interface, as well as other similar services. Attackers, including this group, take advantage of this misconfiguration and use the public access to compromise Kubernetes clusters.

 

This is not the first time that we detect a campaign that targets exposed sensitive interfaces to the Internet. In June, we revealed a large scale attack that exploited exposed Kubeflow dashboard. In both cases, a high impact service, that allows eventually code execution on the containers or underlying nodes is openly exposed to the Internet. Misconfigured services seem to be among the most popular and dangerous access vectors when it comes to attacks against Kubernetes clusters.

 

How Azure Security Center protects customers?

Azure Security Center (ASC) detects this attack, as well as similar attacks, both in the Kubernetes management layer and in the node-level:

 

Management Layer protection

  1. ASC automatically detects sensitive services that are exposed to the Internet. In this incident, ASC detected the exposed Weave Scope service. Detecting exposure of such services immediately when they occur is crucial to prevent their exploitation.
  2. ASC detects deployments of malicious containers in AKS clusters. The detection covers the images that were used in this attack. ASC uses the data from Microsoft Threat Intelligence Center’s sensor network to continuously expand its coverage and detect the recent attacks in the wild.

Node Level protection

  1. ASC detects Docker API services that are openly accessible to the Internet.
  2. ASC detects malicious behavior on the nodes, including cryptocurrency mining activity.

Recommendations

  1. Azure Policy for Kubernetes can be used to restrict and audit sensitive actions in the cluster such as deploying images from public repositories, deployment of privileged containers etc. For more information see the documentation. Integration with Azure Security Center will be available soon. Policies such as the following can prevent similar incidents: “Privileged containers should be avoided” and “Container images should be deployed from trusted registries only

 

 

IoCs

hxxp://85[.]214[.]149[.]236:443/sugarcrm/themes/default/images/default.jpg
hxxp://rhuancarlos[.]inforgeneses[.]inf[.]br/%20%20%20.%20%20%20.%20%20%20./index.php
hildeteamtnt/pause-amd64:3.4
hildeteamtnt/pause-amd64:3.3
sha256:c88b9f32c143ee78b215b106320dbe79e28d39603353b0b9af2c806bcb9eb7b6
sha256:340d9af58a3b3bedaae040ce9640dd3a9a8c30ddde2c85fb7aa28d2bff2d663e
sha256:139f393594aabb20543543bd7d3192422b886f58e04a910637b41f14d0cad375
sha256:68ad2df23712767361d17a55ee13a3b482bee5a07ea3f3741c057db24b36bfce

 

Update (September 10th 2020):

Following the attack, Weaveworks has released a blog post about how to secure Weave Scope deployments and avoid this and similar attacks that use Weave Scope.