Assessing BYOD with the Smarthpone Pentest Framework - - PowerPoint PPT Presentation

assessing byod with the smarthpone pentest framework
SMART_READER_LITE
LIVE PREVIEW

Assessing BYOD with the Smarthpone Pentest Framework - - PowerPoint PPT Presentation

Assessing BYOD with the Smarthpone Pentest Framework Georgia Weidman BYOD Is Not New Contractor Laptop Rogue Access Point Gaming Console Tradi>onal Vulnerability Scanning


slide-1
SLIDE 1

Assessing ¡BYOD ¡with ¡the ¡ Smarthpone ¡Pentest ¡Framework ¡

Georgia ¡Weidman ¡

slide-2
SLIDE 2
slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6

BYOD ¡Is ¡Not ¡New ¡

Contractor Laptop Rogue Access Point Gaming Console

slide-7
SLIDE 7
slide-8
SLIDE 8

Tradi>onal ¡Vulnerability ¡Scanning ¡

slide-9
SLIDE 9

The ¡iPhone ¡in ¡Ques>on ¡Is… ¡

Jailbroken ¡ ¡ Has ¡SSH ¡installed ¡ ¡ Has ¡a ¡default ¡password ¡ ¡ Is ¡not ¡subject ¡to ¡any ¡MDM ¡restric>ons ¡

slide-10
SLIDE 10

The ¡Ques>on ¡

¡ ¡ ¡ What ¡can ¡we ¡do ¡to ¡assess ¡the ¡threat ¡BYOD ¡ Mobile ¡devices ¡add ¡to ¡the ¡enterprise? ¡

slide-11
SLIDE 11

Smartphones ¡in ¡the ¡workplace ¡

l Access ¡your ¡data ¡

¡

l Store ¡company ¡emails ¡

¡

l Connect ¡to ¡VPNs ¡

¡

l Generate ¡1 ¡>me ¡passwords ¡

slide-12
SLIDE 12

Threats ¡against ¡smartphones: ¡Apps ¡

l Malicious ¡apps ¡steal ¡your ¡data, ¡remotely ¡

control ¡your ¡phone, ¡etc. ¡ ¡

l Happens ¡on ¡all ¡plaQorms. ¡Some ¡easier ¡than ¡

  • thers. ¡

¡

l If ¡your ¡employees ¡have ¡a ¡malicious ¡angry ¡

birds ¡add-­‑on ¡what ¡is ¡it ¡doing ¡with ¡your ¡data? ¡ ¡

slide-13
SLIDE 13

Threats ¡against ¡smartphones: ¡soUware ¡ bugs ¡

l Browsers ¡have ¡bugs ¡

¡

l Apps ¡have ¡bugs ¡

¡

l Kernels ¡have ¡bugs ¡

¡

l Malicious ¡apps, ¡webpages, ¡etc. ¡can ¡exploit ¡

these ¡and ¡gain ¡access ¡to ¡data ¡

slide-14
SLIDE 14

Threats ¡against ¡smartphones: ¡social ¡ engineering ¡ ¡

l Users ¡can ¡be ¡tricked ¡into ¡opening ¡malicious ¡

links ¡ ¡

l Downloading ¡malicious ¡apps ¡

¡ ¡

slide-15
SLIDE 15

Threats ¡against ¡smartphones: ¡ jailbreaking ¡

l Smartphones ¡can ¡be ¡jailbroken ¡

¡

l Giving ¡a ¡program ¡expressed ¡permission ¡to ¡

exploit ¡your ¡phone ¡ ¡

l Once ¡it ¡is ¡exploited, ¡what ¡else ¡does ¡the ¡

jailbreaking ¡program ¡do? ¡

slide-16
SLIDE 16

Remote ¡Vulnerability ¡Example ¡

Jailbroken ¡iPhones ¡all ¡have ¡the ¡same ¡default ¡ SSH ¡password ¡ ¡ How ¡many ¡jailbroken ¡iPhones ¡have ¡the ¡default ¡ SSH ¡password ¡(anyone ¡can ¡log ¡in ¡as ¡root)? ¡ ¡

slide-17
SLIDE 17

Client ¡Side ¡Vulnerability ¡Example ¡

Smartphone ¡browsers, ¡etc. ¡are ¡subject ¡to ¡ vulnerabili>es ¡ ¡ ¡ If ¡your ¡users ¡surf ¡to ¡a ¡malicious ¡page ¡their ¡ browsers ¡may ¡be ¡exploited ¡ ¡ Are ¡the ¡smartphone ¡browsers ¡in ¡your ¡

  • rganiza>on ¡vulnerable ¡to ¡browser ¡exploits? ¡
slide-18
SLIDE 18

Social ¡Engineering ¡Vulnerability ¡ Example ¡

SMS ¡is ¡the ¡new ¡email ¡for ¡spam/phishing ¡a_acks ¡ ¡ “Open ¡this ¡website” ¡“Download ¡this ¡app” ¡ ¡ ¡ Will ¡your ¡users ¡click ¡on ¡links ¡in ¡text ¡messages? ¡ ¡ Will ¡they ¡download ¡apps ¡from ¡3rd ¡par>es? ¡

slide-19
SLIDE 19

Local ¡Vulnerability ¡Example ¡

Smartphones ¡have ¡kernel ¡vulnerabili>es ¡ ¡ Used ¡my ¡jailbreaks ¡and ¡malicious ¡apps ¡ ¡ Are ¡the ¡smartphones ¡in ¡your ¡organiza>on ¡ subject ¡to ¡local ¡privilege ¡escala>on ¡ vulnerabili>es? ¡

slide-20
SLIDE 20

Post ¡exploita>on ¡

Command ¡shell ¡ App ¡based ¡agent ¡

Payloads: ¡informa>on ¡gathering ¡

local ¡privilege ¡escala>on ¡ remote ¡control ¡ ¡ ¡

slide-21
SLIDE 21

The ¡Ques>on ¡

A ¡client ¡wants ¡to ¡know ¡if ¡the ¡environment ¡is ¡ secure ¡ ¡ I ¡as ¡a ¡pentester ¡am ¡charged ¡with ¡finding ¡out ¡ ¡ There ¡are ¡smartphones ¡in ¡the ¡environment ¡ ¡ How ¡to ¡I ¡assess ¡the ¡threat ¡of ¡these ¡ smartphones? ¡

slide-22
SLIDE 22

Smartphone ¡Pentest ¡Framework ¡

Wri_en ¡in ¡Perl ¡ ¡ Post ¡exploita>on ¡in ¡the ¡languages ¡of ¡the ¡devices ¡ ¡ Supported ¡in ¡Linux ¡ ¡ Included ¡in ¡Backtrack ¡5 ¡R3 ¡ ¡ ¡

slide-23
SLIDE 23

What ¡you ¡can ¡test ¡for ¡

Remote ¡vulnerabili>es ¡ ¡ Client ¡side ¡vulnerabili>es ¡ ¡ Social ¡engineering ¡ ¡ Local ¡vulnerabili>es ¡ ¡

slide-24
SLIDE 24

Requirements ¡

Uses ¡Perl ¡Expect, ¡Perl ¡SerialPort, ¡and ¡Perl ¡DB ¡ connectors ¡ ¡ Stores ¡data ¡in ¡a ¡MYSQL ¡or ¡Postgress ¡database ¡ ¡ Serves ¡malicious ¡pages ¡and ¡payloads ¡via ¡web ¡server ¡ ¡ Uses ¡Android ¡SDK ¡to ¡custom ¡build ¡agents ¡

slide-25
SLIDE 25

Gegng ¡SPF ¡

Open ¡source ¡ ¡ ¡ On ¡github ¡ ¡ ¡ git ¡clone ¡h_ps://github.com/georgiaw/ Smartphone-­‑Pentest-­‑Framework.git ¡

slide-26
SLIDE 26

Installa>on ¡

B>nstall ¡script ¡will ¡install ¡all ¡Perl ¡dependencies ¡ ¡ ¡ Downloads ¡and ¡installs ¡Android ¡SDK ¡if ¡not ¡ already ¡present ¡ ¡ Sets ¡up ¡database ¡

slide-27
SLIDE 27

Config ¡File ¡

<SPF ¡folder>/frameworkconsole/config ¡ ¡ Tells ¡SPF ¡what ¡database ¡to ¡use, ¡etc. ¡ ¡ ¡

slide-28
SLIDE 28
slide-29
SLIDE 29

Star>ng ¡SPF ¡

¡ <SPF ¡directory>/frameworkconsole/ framework.pl ¡ ¡ ¡

slide-30
SLIDE 30

Star>ng ¡SPF ¡

./framework.pl ¡ ¡ ¡

slide-31
SLIDE 31

Mobile ¡Modems ¡

To ¡send ¡mobile ¡a_acks ¡SPF ¡allows ¡you ¡to ¡use ¡the ¡ mobile ¡modems ¡you ¡already ¡own ¡ ¡ Smartphone ¡based ¡app ¡ ¡ USB ¡modem ¡a_ached ¡to ¡SPF ¡machine ¡

slide-32
SLIDE 32

A_aching ¡SPF ¡to ¡a ¡USB ¡mobile ¡modem ¡

Sakis3g ¡script ¡sets ¡up ¡modem ¡in ¡Linux ¡ ¡ root@bt:~/Desktop# ¡./sakis3g ¡switchonly ¡ Modem ¡switched ¡to ¡1c9e:9603. ¡ ¡ ¡

slide-33
SLIDE 33

A_aching ¡SPF ¡to ¡a ¡USB ¡mobile ¡modem ¡

spf>4 ¡ ¡ ¡ Choose ¡a ¡type ¡of ¡modem ¡to ¡a_ach ¡to: ¡ ¡1.) ¡Search ¡for ¡a_ached ¡modem ¡ ¡2.) ¡A_ach ¡to ¡a ¡smartphone ¡based ¡app ¡ spf>1 ¡ USB ¡Modem ¡Found ¡ ATZ ¡ OK ¡ Spf> ¡

slide-34
SLIDE 34

A_aching ¡SPF ¡to ¡a ¡USB ¡mobile ¡modem ¡

Searches ¡for ¡an ¡a_ached ¡modem ¡ ¡ Confirms ¡it ¡can ¡communicate ¡with ¡the ¡modem ¡ via ¡AT ¡commands ¡ ¡ Adds ¡modem ¡to ¡SPF ¡database ¡

slide-35
SLIDE 35
slide-36
SLIDE 36
slide-37
SLIDE 37
slide-38
SLIDE 38

A_aching ¡SPF ¡to ¡a ¡Phone ¡mobile ¡ modem ¡

App ¡for ¡Android ¡1.6 ¡and ¡above ¡ ¡ So ¡even ¡burner ¡phones ¡will ¡work ¡fine ¡ ¡ App ¡hooks ¡up ¡to ¡SPF ¡and ¡allows ¡it ¡to ¡use ¡the ¡ modem ¡ ¡ ¡

slide-39
SLIDE 39
slide-40
SLIDE 40

A_aching ¡SPF ¡to ¡a ¡Phone ¡mobile ¡ modem ¡

Tell ¡SPF ¡the ¡phone ¡number ¡of ¡the ¡phone ¡we ¡will ¡ use ¡(for ¡the ¡database) ¡ ¡ Tell ¡SPF ¡the ¡control ¡key ¡(terrible ¡crypto. ¡I ¡should ¡ really ¡fix ¡this) ¡ ¡ Tell ¡SPF ¡the ¡path ¡on ¡the ¡webserver ¡we ¡want ¡to ¡ use ¡

slide-41
SLIDE 41
slide-42
SLIDE 42

A_aching ¡SPF ¡to ¡a ¡Phone ¡mobile ¡ modem ¡

Install ¡the ¡app ¡on ¡your ¡tes>ng ¡phone ¡ ¡ Apk ¡and ¡source ¡are ¡in ¡the ¡ FrameworkAndroidApp ¡folder ¡in ¡the ¡git ¡repo ¡ ¡ Tell ¡the ¡app ¡the ¡IP ¡address ¡to ¡connect ¡to, ¡the ¡ same ¡key ¡and ¡path ¡ ¡

slide-43
SLIDE 43
slide-44
SLIDE 44
slide-45
SLIDE 45

Post ¡Exploita>on ¡Agents ¡

Android ¡permission ¡model ¡based ¡agent ¡ ¡ Android ¡roo>ng ¡agent ¡ ¡ Android ¡network ¡agent ¡for ¡insider ¡threat ¡ ¡

slide-46
SLIDE 46

Building ¡Agents ¡on ¡the ¡Fly ¡

Choose ¡a ¡template ¡(you ¡can ¡import ¡your ¡own) ¡ ¡ Give ¡SPF ¡the ¡informa>on ¡ ¡Mobile ¡modem ¡number ¡for ¡control ¡ ¡Key ¡ ¡ ¡Web ¡server ¡path ¡

slide-47
SLIDE 47
slide-48
SLIDE 48
slide-49
SLIDE 49
slide-50
SLIDE 50
slide-51
SLIDE 51
slide-52
SLIDE 52

Building ¡Custom ¡Agents ¡

Some ¡templates ¡included ¡in ¡SPF ¡ ¡ Can ¡backdoor ¡any ¡app ¡you ¡have ¡source ¡code ¡for ¡ with ¡SPF ¡agent ¡func>onality ¡ ¡

slide-53
SLIDE 53

Network ¡A_ack ¡Example ¡

Test ¡for ¡default ¡SSH ¡password ¡on ¡jailbroken ¡ iPhone ¡ ¡ Log ¡in ¡and ¡drop ¡whatever ¡you ¡want ¡ ¡ Post ¡exploita>on ¡agent, ¡Meterpreter ¡

slide-54
SLIDE 54
slide-55
SLIDE 55
slide-56
SLIDE 56
slide-57
SLIDE 57
slide-58
SLIDE 58

Client ¡Side ¡Example ¡

Browser ¡vulnerability ¡ ¡ ¡ Get ¡users ¡to ¡browse ¡to ¡my ¡page ¡ ¡ ¡ Get ¡shell ¡

slide-59
SLIDE 59
slide-60
SLIDE 60
slide-61
SLIDE 61
slide-62
SLIDE 62
slide-63
SLIDE 63
slide-64
SLIDE 64
slide-65
SLIDE 65
slide-66
SLIDE 66

Client ¡Side ¡A_ack ¡#2 ¡

USSD ¡vulnerability ¡in ¡some ¡Android ¡phones ¡ made ¡big ¡news ¡ ¡ Test ¡your ¡enterprise’s ¡phones ¡with ¡SPF ¡ ¡ Safe ¡(IMEI) ¡and ¡Dangerous ¡(wipe ¡phone) ¡checks ¡

slide-67
SLIDE 67
slide-68
SLIDE 68
slide-69
SLIDE 69
slide-70
SLIDE 70
slide-71
SLIDE 71
slide-72
SLIDE 72

Social ¡Engineering ¡Example ¡

Lure ¡users ¡to ¡malicious ¡websites ¡etc ¡ ¡ SMS ¡is ¡an ¡a_ack ¡vector ¡that ¡is ¡star>ng ¡to ¡be ¡ seen ¡in ¡the ¡wild ¡ ¡ Test ¡if ¡your ¡users ¡will ¡browse ¡to ¡website ¡or ¡even ¡ download ¡apps ¡using ¡SMS ¡

slide-73
SLIDE 73

Social ¡Engineering ¡Vulnerability ¡ Example ¡

SMS ¡is ¡the ¡new ¡email ¡for ¡spam/phishing ¡a_acks ¡ ¡ “Open ¡this ¡website” ¡“Download ¡this ¡app” ¡ ¡ ¡ Will ¡your ¡users ¡click ¡on ¡links ¡in ¡text ¡messages? ¡ ¡ Will ¡they ¡download ¡apps ¡from ¡3rd ¡par>es? ¡

slide-74
SLIDE 74
slide-75
SLIDE 75
slide-76
SLIDE 76
slide-77
SLIDE 77
slide-78
SLIDE 78
slide-79
SLIDE 79

Agent ¡looks ¡like ¡the ¡normal ¡app ¡ ¡ ¡ With ¡hidden ¡func>onality ¡ ¡ Remotely ¡control, ¡gather ¡informa>on, ¡privilege ¡ escela>on ¡ ¡

slide-80
SLIDE 80

Interact ¡with ¡SPF ¡agents ¡

A_ach ¡SPF ¡to ¡deployed ¡agents ¡and ¡send ¡them ¡ commands ¡ ¡ Permission ¡apps ¡and ¡root ¡apps ¡

slide-81
SLIDE 81
slide-82
SLIDE 82
slide-83
SLIDE 83
slide-84
SLIDE 84
slide-85
SLIDE 85
slide-86
SLIDE 86
slide-87
SLIDE 87

Local ¡Vulnerability ¡Example ¡

Smartphones ¡have ¡kernel ¡vulnerabili>es ¡ ¡ Used ¡my ¡jailbreaks ¡and ¡malicious ¡apps ¡ ¡ Use ¡a ¡roo>ng ¡agent ¡to ¡try ¡to ¡install ¡as ¡root ¡or ¡ use ¡with ¡a ¡permission ¡agent ¡

slide-88
SLIDE 88
slide-89
SLIDE 89
slide-90
SLIDE 90

SPF ¡App ¡

Used ¡to ¡a_ach ¡SPF ¡to ¡mobile ¡modem ¡ ¡ Can ¡also ¡perform ¡SPF ¡modem ¡based ¡ func>onality ¡straight ¡from ¡your ¡phone ¡

slide-91
SLIDE 91
slide-92
SLIDE 92
slide-93
SLIDE 93
slide-94
SLIDE 94
slide-95
SLIDE 95

Contact ¡Informa>on ¡

¡ ¡ ¡ Georgia ¡Weidman ¡ Founder ¡and ¡CEO, ¡Bulb ¡Security ¡LLC ¡ georgia@bulbsecurity.com ¡ @georgiaweidman ¡ ¡