csw2017 chuanda ding_state of windows application security

28
State of Windows Application Security: Shared Libraries

Upload: cansecwest

Post on 21-Mar-2017

82 views

Category:

Internet


3 download

TRANSCRIPT

Page 1: CSW2017 chuanda ding_state of windows application security

StateofWindowsApplicationSecurity:SharedLibraries

Page 2: CSW2017 chuanda ding_state of windows application security

Aboutthespeaker

• Previouslyasoftwaredeveloper• Chromiumbasedbrowserwithsecurityfeatures

• JoinedTencent in2014• Securityresearcher• XuanwuLabresearchesrealworldsecurityproblems

• CanSecWest 2016speaker• QCon 2016speaker

Page 3: CSW2017 chuanda ding_state of windows application security

Previously…

• AtCanSecWest 2016• 55%ofpopularAV’scanbeexploitedtoescapebrowsersandbox• Reportedandfixed…hopefully

Page 4: CSW2017 chuanda ding_state of windows application security

BrowserSandboxes… Whatisitfor?

• Itcontainsthedamageofthecodeexecutionexploits• Makeitmuchharderforexploitstogainhigherprivileges

Page 5: CSW2017 chuanda ding_state of windows application security

SandboxWhitelist:ElevationPolicy

BrowserRenderer

BrowserBroker ElevationPolicyMedium

IntegrityLevelProcess

SecurityBoundary

LowIntegrityLevelProcess

Page 6: CSW2017 chuanda ding_state of windows application security

Example: PandaInternetSecurity

\Pandasecuritytb\dtuser.exe

• ElevationpolicywithsilentMediumIL• Runarbitrarycommand

dtuser.exe runappasadmin calc.exe

• Copyarbitraryfiledtuser.exe copyfile <origin> <target>

Page 7: CSW2017 chuanda ding_state of windows application security

Howtodetectitautomatically?

Page 8: CSW2017 chuanda ding_state of windows application security

ProjectA'Tuin

• Automatedinstallation• Detectinsecurecharacteristicsandbehaviors• Providesearchableresults

Crawl Install TriggerBehavior Log

ClusterOfflineComputation

FrontendInterface

Page 9: CSW2017 chuanda ding_state of windows application security

ProjectA'Tuin

Page 10: CSW2017 chuanda ding_state of windows application security

Example:PandaInternetSecurity

Page 11: CSW2017 chuanda ding_state of windows application security

DiversityisInstallers’Strength

Page 12: CSW2017 chuanda ding_state of windows application security

Automated installation

• Searchesalltoplevelwindowscreatedbytheinstaller• Inallscreenareacoveredbyrecordedwindows,findpolygonsthathasthelargestareaandhighestcontrastratio• Simulateinputtoscreenareainsidethepolygon• Successrate95%+,specialcasetherest

Page 13: CSW2017 chuanda ding_state of windows application security

Whatelsedid wefound?

Page 14: CSW2017 chuanda ding_state of windows application security

TypicalWindowsApplication

MainCode SharedLibraries

MFC/Qt OpenSSL

Image/Video/Audio

Decoders

NetworkLibraries WebKit …

Page 15: CSW2017 chuanda ding_state of windows application security

TheOpenSSLLandscape

Page 16: CSW2017 chuanda ding_state of windows application security

TheOpenSSLLandscape:Heartbleed

Page 17: CSW2017 chuanda ding_state of windows application security

TheOpenSSLLandscape:CVSS>=9

Page 18: CSW2017 chuanda ding_state of windows application security

Doesyourapplicationhaveanembeddedwebbrowser?

Mostlikely.

Page 19: CSW2017 chuanda ding_state of windows application security

ChromiumEmbeddedFramework

• “CEFisaBSD-licensedopensourceprojectfoundedbyMarshallGreenblattin2008andbasedonthe GoogleChromium project”• “CEFfocusesonfacilitatingembeddedbrowserusecasesinthird-partyapplications”• “Therearecurrentlyover100million installedinstancesofCEFaroundtheworldembeddedinproductsfromawiderangeofcompaniesandindustries”

Page 20: CSW2017 chuanda ding_state of windows application security

TheCEFLandscape

Page 21: CSW2017 chuanda ding_state of windows application security

QtWebKit

Page 22: CSW2017 chuanda ding_state of windows application security

Howcanwefindunknown sharedlibraries?

• Brainstorming?• OpenSSL,zlib,Qt,whatelse?• Manylibrariesaredevelopedin-houseandusedinsideonecompany• Libraryissuemayshareamongmultiplesoftware• Outdatedparsing/rendering/decodinglibrariesalmostalwaysindicatesecurityissues

Page 23: CSW2017 chuanda ding_state of windows application security

Howcan wefindunknownsharedlibraries?

• Installeverysoftware• ExtractallPEfiles• Useadisassemblertoextractfunctioninformation• IDAPython

• Recordandcomparefunctionsignaturesacrossdifferentsoftware

Page 24: CSW2017 chuanda ding_state of windows application security

TheResult

Page 25: CSW2017 chuanda ding_state of windows application security

Recap

• Asystemthatcanautomaticallydetectpossiblesecurityissues• ManyapplicationsstillhaveoldOpenSSLlibrariesthatareaffectedbyoldvulnerabilities• Anewwaytoautomaticallydetectsharedlibrariesusedinapplications• Detectedover4000sharedlibrariesinoursample,manyofthemunknown

Page 26: CSW2017 chuanda ding_state of windows application security

Futureworks

• Morebehavior detection• Gomobile• Cross-platformclusteringofresults

Page 27: CSW2017 chuanda ding_state of windows application security

Acomprehensivereportaboutsharedlibrarysecuritywillbereleasedpubliclylaterthisyear.

Andthesystemmaybeopentopublicinthefuture.

Page 28: CSW2017 chuanda ding_state of windows application security

Thanks.Chuanda Ding

Tencent XuanwuLabxlab.tencent.com