roaming mantis: an anatomy of a dns hijacking campaign€¦ · timeline (2019) april 2019 june 2019...

Post on 26-Sep-2020

3 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Roaming Mantis:A Melting Pot of Android Bots

Suguru IshimaruGReAT APACKaspersky Lab

Manabu NisekiNTT-CERT

NTT SC Labs

Hiroaki OgawaProfessional Service

McAfee

2

Contents

1. Introduction

2. What’s Roaming Mantis

• MoqHao

• FakeSpy

• FakeCop

• FunkyBot

3. Conclusions

Botconf 2019

$ whoamiIntroduction of ourselves

Who Are We?

Manabu Niseki

(NTT-CERT)

Suguru Ishimaru

(Kaspersky)

Hiroaki Ogawa

(McAfee)

You can download our slides in HITCON CMT 2019

$ man roamingmantisWhat is Roaming Mantis

Phishing site

Web mining

Malicious APKMultilingual

8Botconf 2019

What is Roaming Mantis?

• Cyber criminal campaign

• DNS changer + SMiShing

• Targeted multi platform and

multiple language

9Botconf 2019

What is Roaming Mantis?

A melting pot of Android bots:

• MoqHao

• FakeSpy

• FunkyBot

• FakeCop

$ file moqhao.apk

Named by McAfeeAppeared since 2017

11Botconf 2019

Distribution channels• DNS changer (rogue DNS)

• SMiShing

Targeting brands• Facebook

• Google Chrome

• Sagawa Express (JP)

• Yamato Transport (TW)

• CJ Logistics (KR)

• DHL Express (SG)

MoqHao: Distributions

DNS changer SMiShing

MoqHao: Distribution channels: Rogue DNS

12Botconf 2019

• Attacking routers to use rogue DNS servers.• iOS: will be navigated to an Apple phishing website.

• Android: will be infected with MoqHao.

MoqHao: Compromised routers

13Botconf 2019

MoqHao: Distribution channels: SMiShing

14

SMiShing impersonating logistics firms:

• Sagawa Express (Japan)

• Yamato Transport (Taiwan)

• DHL Express (Singapore)

• CL Logistics (Korea)

Botconf 2019

16Botconf 2019

MoqHao: Packer mechanism

MoqHao contains encrypted payload executed by loader module:

Loader module

Encrypted payload

Payload is MoqHao(.dex)

4bytes skip + zlib dec + base64 dec

17Botconf 2019

MoqHao: Communications to C2

Base64_urlsafe + DES + a hardcoded key(iv is same) “Ab5d1Q32”

1.171.162.250:28844

SNS accounts and strings

18Botconf 2019

MoqHao: Backdoor malicious features

1. sendSms2. setWifi3. gcont4. lock5. bc6. setForward7. getForward8. hasPkg9. setRingerMode10. setRecEnable

11. reqState12. showHome13. getnpki14. http15. onRecordAction16. call17. get_apps18. show_fs_float_window19. Ping20. getPhoneState

20th backdoor commands 4,000+ stolen info

• IP• Language• ID (email)• Password• Name• Address• Credit card info• Tow factor auth• Bank info• Secret question• Etc…

MoqHao payload module is a backdoor.

$ file fakespy.apk

Named by TrendMicroAppeared since 2017

21Botconf 2019

Distribution channels• SMiShing

Targeting brands• Sagawa Express (JP)

• Japan Post (JP)

• Yamato Transport (JP)

• Nippon Express (JP)

• NTT Docomo (JP)

• Logen (KR)

• Die Post (CH)

• LuLu (UAE)

• Pos Malaysia(MY)

FakeSpy: Distributions

New targets?

Botconf 2019 22

FakeSpy: Packer mechanism

Loader module2 (JNI)

Encrypted payload

Payload is FakeSpy(.jar)

AES + a hardcoded key base64dec(“H8chGVmHxKRdjVSO14Mvgg==”)

Loader module1

23Botconf 2019

FakeSpy: Communications to C2 and malicious features

http://jppost-bpa[.]top/

Ascii to HEX + DES +a hardcoded key “TEST”

Stealing infoSMS spamming

https://twitter.com/sekadetahttps://twitter.com/sekadeta

25Botconf 2019

FakeSpy: Check device and targeting countries

Anti-sandbox

Country calling code is

+82 = South Korea

+86 = China

26Botconf 2019

FakeSpy: Simplified Chinese

$ file fakecop.apk

Named by KasperskyAppeared since 2019

29Botconf 2019

Distribution channels• Rogue DNS

Targeting brands• Korean National Police Agency

(KR)

• S-GUARD (KR)

• NTT Docomo (JP)

FakeCop: Distributions

FakeCop: Distributions

30

• In April 2019, Roaming Mantis landing pages started navigating (Japanese?) victims to Google Play store.

• “com.jptest.tools2019” is a FakeCop malware.• According to McAfee, this malware was immediately removed from the Google

Play store.Source: https://securingtomorrow.mcafee.com/other-blogs/mcafee-labs/moqhao-related-android-spyware-targeting-japan-and-korea-found-on-google-play/

Botconf 2019 31

FakeCop: Packer mechanism

Jiagu packer

Payload is FakeCop (.dex)

32Botconf 2019

FakeCop: Communications to C2 and stealing info

Steals device info and SMS

A hardcoded C2 in config

33Botconf 2019

FakeCop: Device and locale check

Check device info as Anti-debug and anti-analysis

Country calling code is +81 = Japan

34Botconf 2019

FakeCop: Simplified Chinese

$ file funkybot.apk

Named by FortinetAppeared since 2019

37Botconf 2019

Distribution channels• SMiShing

Targeting brands• Sagawa Express (JP)

FunkyBot: Distributions

38Botconf 2019

FunkyBot: Packer mechanism

payloadType = 0 payloadType = 1

¥assets¥${conf}

if enc_byte != 0x00 || enc_byte != 0x51:

enc_byt XOR 0x51

classes.dex stored encrypted data ¥assets¥${encrypted_data}

dex num size

Payload of FunkyBot

Legitimate dex?

39Botconf 2019

FunkyBot: Communications to C2

45.32.29[.]33:11257

Base64+ DES + a hardcoded key“d2a57dc1”

Botconf 2019 40

FunkyBot: Stealer and SMS spamming

Steals contacts and emails SMS spamming

41Botconf 2019

FunkyBot: Simplified Chinese

$ yara roaming_mantisComparing relationship of each bot

44Botconf 2019

Timeline (2017 – 2018)

Aug

2017Feb

2018

Sep

2018

Dec

2017

Aug

2018

Oct

2018Google Chrome

(#MoqHao)

Sagawa Express (#FakeSpy)

Facebook (#MoqHao)

DNS changer attacks are

started.

DNS changer attacks are

stopped.

45Botconf 2019

Timeline (2019)

April

2019June

2019

Aug

2019

May

2019

July

2019

Sep

2019

Japan Post (#FakeSpy)

NTT Docomo (#FakeCop)

NTT Docomo (#MoqHao)

NTT Docomo (#FakeSpy)

Nippon Express (#FakeSpy)

Yamato Transport (#FakeSpy)

Lulu Hypermarket (#FakeSpy)

Korean National Police (#FakeCop)

DNS changer attacks are started again.

Yamato Transport (#MoqHao)

Sagawa Express (#FunkyBot)

DHL Express (#MoqHao)

POS Malaysia(#FakeSpy)

CJ Logistics (#MoqHao)

Logen (#FakeSpy)

Die Post (#FakeSpy)

S-GUARD (#FakeCop)

46Botconf 2019

Geography

Relationships

MoqHao FakeSpyFake app

SNS as a first C2

FakeCopInfrastructure

FunkyBot

SMiShing

DNS changer

48

$touch moneyMoney laundering technique

Money laundering

49

• Abusing carrier billing payment to buy iTunes gift cards.

“Please accept to the agreement to complete the carrier billing payment”

Recruiting a money launderer

50

“If you have an iPhone, there is a job.Get rewards by purchasing online game items!”

$ shutdown –h nowConclusions

Conclusions

52Botconf 2019

THE ROAMING MANTIS

Many bots

Rapidly improving

Strong financial motivation

Spreading beyond the East Asia

MaaS is behind?

55HITCON CMT 2019

References1. https://blog.trendmicro.com/trendlabs-

security-intelligence/a-look-into-the-connection-between-xloader-and-fakespy-and-their-possible-ties-with-the-yanbian-gang/

2. https://securelist.com/roaming-mantis-uses-dns-hijacking-to-infect-android-smartphones/85178/

3. https://securelist.com/roaming-mantis-dabbles-in-mining-and-phishing-multilingually/85607/

4. https://securelist.com/roaming-mantis-part-3/88071/

5. https://securelist.com/roaming-mantis-part-iv/90332/

6. https://securingtomorrow.mcafee.com/other-blogs/mcafee-labs/moqhao-related-android-spyware-targeting-japan-and-korea-found-on-google-play/

7. https://www.fortinet.com/blog/threat-research/funkybot-malware-targets-japan.html

Suguru IshimaruGReAT APACKaspersky Lab

Let’s Talk?Manabu NisekiNTT-CERT

NTT SC Labs

Hiroaki OgawaProfessional Service

McAfee

top related