版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
iSECPartnersFinalReport
CryptoCatiOS
Page2of35
©2014,iSECPartners,Inc.
PreparedbyiSECPartners,Inc.forOpenTechnologyFund.Portionsofthisdocumentandthetemplatesusedin
itsproductionarethepropertyofiSECPartners,Inc.andcannotbecopiedwithoutpermission.
Whileprecautionshavebeentakeninthepreparationofthisdocument,iSECPartners,Inc,thepublisher,andthe
author(s)assumenoresponsibilityforerrors,omissions,orfordamagesresultingfromtheuseoftheinformation
containedherein.UseofiSECPartnersservicesdoesnotguaranteethesecurityofasystem,orthatcomputerintrusionswillnotoccur.
February7,2014
OpenTechnologyFund
Version1.1
iSECPartnersFinalReport
CryptoCatiOS
Page3of35
0.9
2014-02-07
Documentreadyforreadout
1.1
2014-03-14
ClarificationsregardingiOSapplicationnotbeingdistributedinAppStore
duringtesting
February7,2014
OpenTechnologyFund
Version1.1
1.0 2014-02-07 Bumpto1.0followingreadout
DocumentChangeLog
Version Date Change
iSECPartnersFinalReport
CryptoCatiOS
Page4of35
TableofContents
1
ExecutiveSummary........................................................
5
1.1
iSECRiskSummary...........................................................
6
1.2
ProjectSummary.............................................................
7
1.3
FindingsSummary............................................................
8
1.4
RecommendationsSummary...................................................
9
2
EngagementStructure.....................................................
11
2.1
InternalandExternalTeams...................................................
11
3
DetailedFindings..........................................................
12
3.1
Classifications................................................................
12
3.2
Vulnerabilities...............................................................
14
3.3
DetailedVulnerabilityList—iOSClient.........................................
15
3.4
DetailedVulnerabilityList—OtherComponents.................................
26
Appendices....................................................................
32
A
XMPPStartTLSstripping..................................................
32
A.1 Screenshot...................................................................
32
A.2Pythonscript................................................................
32
B
InvisibleChatRoomMember..............................................
34
February7,2014
OpenTechnologyFund
Version1.1
iSECPartnersFinalReport
CryptoCatiOS
Page5of35
1
ExecutiveSummary
ApplicationName
CryptoCat
ApplicationType
iOSapplication
Platform
iOS
Dates
January27,2014–February7,2014
ConsultantsEngaged
3
TotalEngagementEffort
3personweeks
EngagementType
ApplicationPenetrationTest
TestingMethodology
WhiteBox
TotalHighseverityissues
6
TotalMediumseverityissues
6
TotalLowseverityissues
3
TotalInformationalseverityissues
2
Totalvulnerabilitiesidentified:
17
Seesection3.1onpage12fordescriptionsoftheseclassifications.
CategoryBreakdown:
AccessControlsAuditingandLoggingAuthenticationConfigurationCryptography
DataExposureDataValidationDenialofServiceErrorReportingPatching
SessionManagement
Timing
0
0
3
2
1
8
0
1
0
2
0
0
February7,2014
OpenTechnologyFund
Version1.1
VulnerabilitySummary
EngagementSummary
ApplicationSummary
iSECPartnersFinalReport
CryptoCatiOS
Page6of35
1.1
iSECRiskSummary
TheiSECPartnersRiskSummarychartevaluatesdiscoveredvulnerabilitiesaccordingtoestimateduser
risk.Theimpactofthevulnerabilityincreasestowardsthebottomofthechart.Thesophisticationrequiredforanattackertofindandexploittheflawdecreasestowardstheleftofthechart.Thecloser
avulnerabilityistothechartorigin,thegreatertherisktotheuser.
iOSclient-Publickeydataloggedlocally
iOSclient-Autocorrectionleaksinformationtodisk
iOSclient-Crashestriggeredbymalformedmulti-partymessages
iOSclient-HMACvalidationtimingattack
iOSclient-InformationleakingfromiOSscreenshots
WeakSSL/TLSversionsandciphersuitessupportedbyXMPPservice
Browserclients-ChatroomeavesdroppingusingaregularXMPPclient
iOSclient-Lackofreturnvaluecheckingforsensitivefunctioncalls
CryptoCatchatroomslogencryptedmessagesandcanbemadepersistent
Browserclients-MisleadingsecurityUIforSMPidentitychecking
iOSclient-Privatemessagesareloggedinplaintext
iOSclient-Privatekeystoredinplaintextonlocalstorage
iOSclient-XMPPconnectionvulnerabletoStartTLSstripping
CryptoCatOTRimplementationvulnerabletoman-in-the-middleattacks
CryptoCat’ssecuritymodelreliesonunrealisticuserrequirements
Simple
AttackSophistication
Difficult
February7,2014
OpenTechnologyFund
Version1.1
High
UserRisk
Low
iSECPartnersFinalReport
CryptoCatiOS
Page7of35
1.2
ProjectSummary
TheOpenTechnologyFund(OTF)engagediSECPartnerstoperformasource-codeassistedsecurity
reviewoftheCryptoCatiOSapplication.AtotalofthreeconsultantsworkedontheprojectbetweenJanuary27thandFebruary7th,2014foratotalofthreeperson-weeksofwork.Thissecurityanalysis
wasstructuredas``besteffort''withinthegiventimeframe.
ThegoalofthisengagementwastoreviewtheCryptoCatiOSapplicationwithafocusonmisuse
ofcommoniOSAPIs,flawsinimplementationofcryptographicprotocols,andremotelyexploitablevulnerabilitiesthatcouldimpacttheconfidentialityorintegrityofCryptoCatchatsessions.
TheiSECteamperformedthetestingoftheiOSclientusingboththeiOSsimulatorandphysical
iDevices.iSECalsousedCryptoCatbrowserclientsandathird-partyXMPP/OTRclient1toreviewcross-platforminteractionswithinaCryptoCatchatroom.
Itemsthatwereoutofscopeforthisengagementinclude:
Areviewofthemulti-partycryptographicprotocol.
TheCryptoCatbrowser,desktopandAndroidclients.
Addendum(3/15/14):TheiOSapplicationwasin-developmentcodethatattimeoftestingwasavailable
onlyinapre-productionformonGitHubandnotdistributedviatheAppStore.TheCryptoCatteamhadtimetoreviewthevulnerabilitiespriortopublicationintheAppStoreandclaimstohaveaddressedthem;however,iSEChasnotvalidatedanyfixesandcannotmakeanyclaimstothecurrentstatusofany
vulnerabilities.
Whilenotinscopefortheengagement,iSECalsoidentifiedvulnerabilitiesthatpertaintothereleased
anddeployedbrowserextensionandserverconfiguration.TheseissueswerefoundwhiletestingtheiOSclient'sintegrationwithotherCryptoCatcomponents.
1iSECusedtheAdiumchatclient-https://adium.im/
February7,2014
OpenTechnologyFund
Version1.1
iSECPartnersFinalReport
CryptoCatiOS
Page8of35
1.3
FindingsSummary
CryptoCat'sgoalofprovidingamessagingsystemthatisbotheasy-to-useandsecureisimportantand
challenging.TheissuesidentifiedinthisreportdemonstrateseveralinstancesinwhichthedesignandimplementationofCryptoCatfailtomeetthisgoal.Infact,duetovulnerabilitiesidentified,thepracticalsecurityofCryptoCatonallplatforms,attimeofreview,iscurrentlyequivalenttoastandard
XMPPclientwithoutOTRandfallsshortofthesecurityprovidedbyanXMPPclientwithOTR.
CryptoCatDesignFlaws
ThemostseriousproblemsaffectingCryptoCataredesignissuesthatdiminishthesecurityofall
CryptoCatcommunications.
CryptoCat'sOTRimplementationonallplatformsallowsachatpeertochangetheirOTRkeyduring
achatsessionwithoutusernotification.Anattackerperformingaman-in-the-middleattackagainsttheclient'sXMPPorHTTPSstreamcaninjecttheirownOTRkeyinthediscussionafterauserhasauthenticatedtheirpeer'sOTRfingerprint.Thispermitstheattackertodecryptallmessagesthatfollow,andnouserwouldhavereasontosuspectthecompromise.Groupmulti-partydiscussionsdo
notseemtosufferfromthesamevulnerability.
Anotherissueisthatthesecurityofusers'communicationsreliessolelyonmanualverificationofpeers'
keyfingerprintsthroughasecurechannel.Furthermore,CryptoCatclientsgeneratenewencryptionkeysoneverychatsession,placingtheburdenofrepeatedauthenticationtasksonusers.iSECbelievesthisisnotapracticalsecuritymodel-requiringuserstoestablishsecurechannelsinordertoverifyeachindividualchatsessionnegatesthepromiseofCryptoCat.Afterall,thereisnoneedforCryptoCat
ifonemustfirstcommunicatesecurelyinordertouseitwithconfidence.
iOS-SpecificVulnerabilities
AsthefocusofthisengagementwastheCryptoCatiOSclient,theiSECteamspentmostofitstime
reviewingthisapplicationanddiscoveredseveralvulnerabilities.
TheiOSclient'sXMPPimplementationallowsanattackertoforcetheclienttocommunicateover
plaintextXMPPinsteadofSSL/TLS,resultinginallXMPPtrafficbeingvulnerabletoman-in-the-
middleattacks.ExploitingthisflawtogetherwithCryptoCat'svulnerableOTRimplementationallowsanattackertodecryptallOTRmessagessentorreceivedbytheiOSApp.
TheiSECteamalsoidentifiedmultipleinstancesofsensitivedatabeingleakedbytheiOSAppto
thedevice'slogsorfilesystem,includingOTRmessagesandtheuser'sprivatekey;suchfilescanbe
retrievedbyanattackerwithphysicalaccesstothedevice.
IssuesAffectingOtherComponents
iSECdiscoveredissuesaffectingotherCryptoCatcomponentsincludingthebrowserextensionsand
CryptoCat'sXMPPserver.Theseissues,foundwhiletestingtheiOSclientitsintegrationwiththeotherCryptoCatcomponents,allowanattackertocollectencryptedlogsofgroupmessagesexchanged
withinaCryptoCatchatroomusingvarioustechniques.
February7,2014
OpenTechnologyFund
Version1.1
iSECPartnersFinalReport
CryptoCatiOS
Page9of35
1.4
RecommendationsSummary
Thissummaryprovideshigh-levelrecommendationsdesignedtoaddressthemostpressingissues
affectingCryptoCat.IndividualrecommendationsdescribedinSection3.3onpage15ofthisreportshouldbereviewedandimplementedinordertoaddresseveryvulnerabilitydescribedinthisreport.
CryptoCatfacesseveralchallengesifitistoprovideatrulysecuremessagingplatform.Implementation
flawsarerelativelyeasytofix,butaddressinglimitationsinthedesignofCryptoCatrequiresignificant
changestoitscryptographicprotocols.Thelargestchallengeiscreatingauserexperiencethatisbothsimpleandsecure-agoalsodauntingfewdevelopersfullyembraceit.
ShortTerm
Shorttermrecommendationsaremeanttoberelativelyeasilyexecutedactions,suchasconfiguration
changesorfiledeletionsthatresolvesecurityvulnerabilities.Thesemayalsoincludemoredifficult
actionsthatshouldbetakenimmediatelytoresolvehigh-riskvulnerabilities.Thisareaisasummaryofshorttermrecommendations;additionalrecommendationscanbefoundinthevulnerabilitiessection.
EnforcetheusageofStartTLSforallXMPPconnectionsoniOS.TheCryptoCatiOSapplication
shouldterminateanyXMPPconnectiontoaserverdoesnotadvertisesupportforStartTLS.
PreventinformationleakageoniOS.TheCryptoCatiOSapplicationleakssensitivedatasuchasthe
user'sprivatekeythroughvariousmechanismsincludingdebuglogsandapplicationbackgrounding.Topreventthisdatafrombeingexposed,recommendationsdescribedinthisdocumentshouldbeimplemented.
Provideuserswithinstructionsonhowtocheckfingerprints.UponinstallingaCryptoCatclient,
usersshouldbepromptedwithguidelinesonhowtoproperlychecktheirpeers'fingerprintsinorder
toestablishasecurechatsession.
OnlyacceptasingleOTRkeyexchangepercontact.Topreventman-in-the-middleattacks,Cryp-
toCatclientsshouldrejectOTRkeyexchangestriggeredafterthepeeralreadysuppliedtheirOTRpublickeyduringachatsession.
HardentheXMPPserver'sconfiguration.Disablechatroomhistoryloggingandpersistentrooms;
improvetheserver'sSSL/TLSconfigurationbydisablingweakcryptographicciphers.
February7,2014
OpenTechnologyFund
Version1.1
iSECPartnersFinalReport
CryptoCatiOS
Page10of35
LongTerm
Longtermrecommendationsaremorecomplexandsystematicchangesthatshouldbetakentosecure
thesystem.Thesemayincludesignificantchangestothearchitectureorcodeandmaytherefore
requirein-depthplanning,complextesting,significantdevelopmenttime,orchangestotheuser
experiencethatrequireretraining.
ReviewtheCryptoCatAndroidapplication.Issuesdescribedinthisdocumentandaffectingthe
iOSclientshouldbeverifiedontheAndroidclient.
Re-architecttheCryptoCatclientstouselong-livedcryptographickeysandaTrustonFirstUse
securitymodel.ConsiderrelyingonasecuritymodelsimilartothatusedbySSH.Specifically,storetheuser'scryptographickeysandtheircontacts'nicknameandfingerprintspairsintheclient.Notifytheuserwhentheyneedtomakeatrustdecisiononfirstuseanddisplayanerrortotheuserifapeer's
fingerprintchanges.
February7,2014
OpenTechnologyFund
Version1.1
iSECPartnersFinalReport
CryptoCatiOS
Page11of35
2
EngagementStructure
2.1
InternalandExternalTeams
TheiSECteamhasthefollowingprimarymembers:
•
AlbanDiquet—SecurityEngineer
alban@
•
DavidThiel—SecurityEngineer
david@
•
ScottStender—SecurityEngineer
scott@
•
AaronGrattafiori—AccountManager
aaron@
•
TomRitter—AccountManager
tritter@
TheOpenTechnologyFundteamhasthefollowingprimarymembers:
DanMeredith—OpenTechnologyFund
meredithd@
TheCryptoCatteamhasthefollowingprimarymembers:
•
NadimKobeissi—CryptoCatProject
nadim@crypto.cat
February7,2014
OpenTechnologyFund
Version1.1
iSECPartnersFinalReport
CryptoCatiOS
Page12of35
3
DetailedFindings
3.1
Classifications
Thefollowingsectiondescribestheclasses,severities,andexploitationdifficultyratingassignedto
eachidentifiedissuebyiSEC.
AccessControls
Relatedtoauthorizationofusers,andassessmentofrights
Authentication
Relatedtotheidentificationofusers
Cryptography
Relatedtomathematicalprotectionsfordata
DataValidation
Relatedtoimproperrelianceonthestructureorvaluesofdata
ErrorReporting
Relatedtothereportingoferrorconditionsinasecurefashion
SessionManagement
Relatedtotheidentificationofauthenticatedusers
Theissuedoesnotposeanimmediaterisk,butisrelevanttosecu-
ritybestpracticesorDefenseinDepth
Informational
Theriskisrelativelysmall,orisnotariskthecustomerhasindicated
isimportant
Low
Largenumbersofusers,verybadforclient'sreputationorserious
legalimplications.
High
February7,2014
OpenTechnologyFund
Version1.1
Individualuser'sinformationisatrisk,exploitationwouldbebad
Medium forclient'sreputation,ofmoderatefinancialimpact,possiblelegalimplicationsforclient
Undetermined Theextentoftheriskwasnotdeterminedduringthisengagement
SeverityCategories
Severity Description
Timing Relatedtotheraceconditions,locking,ororderofoperations
Patching Relatedtokeepingsoftwareuptodate
DenialofService Relatedtocausingsystemfailure
DataExposure Relatedtounintendedexposureofsensitiveinformation
Configuration Relatedtosecurityconfigurationsofservers,devices,orsoftware
AuditingandLogging Relatedtoauditingofactions,orloggingofproblems
VulnerabilityClasses
Class Description
iSECPartnersFinalReport
CryptoCatiOS
Page13of35
Undetermined
Thedifficultyofexploitwasnotdeterminedduringthisengagement
Attackersmustwriteanexploit,orneedanindepthknowledgeof
acomplexsystem
Medium
February7,2014
OpenTechnologyFund
Version1.1
Theattackermusthaveprivilegedinsideraccesstothesystem,may
High needtoknowextremelycomplextechnicaldetailsormustdiscoverotherweaknessesinordertoexploitthisissue
Commonlyexploited,publictoolsexistorcanbescriptedthatex-
Low
ploitthisflaw
DifficultyLevels
Difficulty Description
iSECPartnersFinalReport
CryptoCatiOS
Page14of35
3.2
Vulnerabilities
ThefollowingtableisasummaryofiSEC'sidentifiedvulnerabilities.Subsequentpagesofthisreport
detaileachofthevulnerabilities,alongwithshortandlongtermremediationadvice.
CryptoCatiOS
Addendum(3/15/14):TheiOSapplicationwasin-developmentcodethatattimeoftestingwasavailable
onlyinapre-productionformonGitHubandnotdistributedviatheAppStore.TheCryptoCatteamhadtimetoreviewthevulnerabilitiespriortopublicationintheAppStoreandclaimstohaveaddressedthem;however,iSEChasnotvalidatedanyfixesandcannotmakeanyclaimstothecurrentstatusofany
vulnerabilities.
1.XMPPconnectionvulnerabletoStartTLSstripping
DataExposure
High
2.Privatemessagesareloggedinplaintext
DataExposure
High
3.Privatekeystoredinplaintextonlocalstorage
DataExposure
High
4.InformationleakingfromiOSscreenshots
DataExposure
Medium
5.Lackofreturnvaluecheckingforsensitivefunctioncalls
Configuration
Medium
6.HMACvalidationtimingattack
Cryptography
Medium
7.Crashestriggeredbymalformedmulti-partymessages
DenialofService
Low
8.Publickeydataloggedlocally
DataExposure
Low
9.Autocorrectionleaksinformationtodisk
DataExposure
Low
10.PrecompiledOpenSSLbinariesin
TBMultipartyProtocolManager
Patching
Informational
11.Outdatedcurve25519-donnaimplementation
Patching
Informational
OtherCryptoCatComponents
12.CryptoCat'ssecuritymodelreliesonunrealisticuser
requirements
Authentication
High
13.CryptoCatOTRimplementationvulnerableto
man-in-the-middleattacks
Authentication
High
14.Browserclients—MisleadingsecurityUIforSMP
identitychecking
Authentication
High
15.CryptoCatchatroomslogencryptedmessagesand
canbemadepersistent
DataExposure
Medium
16.Browserclients—Chatroomeavesdroppingusinga
regularXMPPclient
DataExposure
Medium
17.WeakSSL/TLSversionsandciphersuitessupported
byXMPPservice
Configuration
Medium
February7,2014
OpenTechnologyFund
Version1.1
Vulnerability Class Severity
Vulnerability Class Severity
iSECPartnersFinalReport
CryptoCatiOS(Pre-Distribution)
Page15of35
3.3
DetailedVulnerabilityList—iOSClient
FINDINGID:iSEC-RFACC0114-5
TARGETS:TheCryptoCatiOSapplication,astestedbetweenJan27andFeb7.
DESCRIPTION:WhenconnectingtotheXMPPserveratcrypto.cat:5222,theiOSclientdoesnotre-
quireStartTLStobeusedtoencrypttheXMPPstreamusingSSL/TLS.
Specifically,duringtheinitialXMPPhandshake,theserveradvertisesforStartTLSwithinitslistof
supportedJabberfeaturesandtheiOSclientperformsaStartTLShandshakewiththeserver.Sub-sequentXMPPtrafficisthenencryptedusingSSL/TLS.However,iftheserverdoesnotadvertisesupportforStartTLS,theiOSclientwillcontinuecommunicatingwiththeserveroverplaintextXMPP.Consequently,anattackeronthenetworkcanmodifytheinitialXMPPhandshaketoremoveStartTLSfromtheserver'sadvertisedfeatures,inordertopreventtheiOSclientfromswitchingtoSSL/TLS.DoingsowillresultintheclientsendingsubsequentXMPPmessagessuchasencryptedmulti-partymessagesinplaintext,therebydisclosingthemtotheattacker.
Additionally,whiletheserveratcrypto.cat:5222requiresclientstouseStartTLSandwillcloseany
XMPPstreamthatdoesnotswitchtoSSL/TLS,anattackercouldstillperformtheman-in-the-middleattackdescribedabove;afterpreventingtheclientfromusingStartTLS,theattacker'sscriptcouldperformtheStartTLShandshakewiththeserverandforwardtheclient'sunencryptedtraffictotheserveroverSSL/TLS.
Asaproofofconcept,aPythonscripttoperformthefullattackisavailableinAppendixAonpage32.
EXPLOITSCENARIO:AnattackercompromisedthepublicWiFiaccesspointatapopularcoffeeshop.
ACryptoCatuserconnectstheiriOSdevicetotheaccesspointtogetInternetconnectivityandthenlaunchestheCryptoCatapplicationtojoinachatroom.TheattackerusesascripttostripStartTLSandimpersonatetheXMPPservertothevictim'sCryptoCatclient,inordertoman-in-the-middletheXMPPtraffic.Theattackerthenperformsaman-in-the-middleattackagainstthemulti-partyprotocolkeyexchangebyswappingthevictim'spublickeywiththeattacker'spublickeys.Thechatparticipantsforgettovalidatethefingerprintsusingasidechannelandstartchatting,therebyallowingtheattackertodecryptallmessagesexchanged.
SHORTTERMSOLUTION:ModifythecodewithintheiOSclientresponsibleforXMPPconnections
inordertohaveitenforcetheusageofStartTLSforallconnections.TheclientshouldterminateanyXMPPconnectiontoaserverdoesnotadvertisesupportforStartTLS.
LONGTERMSOLUTION:ForXMPPconnectionstothedefaultCryptoCatXMPPserverhostedat
crypto.cat:5222,implementcertificatepinningwithintheiOSclienttovalidatetheserver'sSSLcertifi-cateduringtheStartTLShandshake.Thiscanbeachievedbyembeddingtheserver'sSSLcertificateintheiOSclientandcomparingitagainsttheSSLcertificatesentbytheserveruponconnection.
February7,2014
OpenTechnologyFund
Version1.1
1.XMPPconnectionvulnerabletoStartTLSstripping
Class:DataExposure Severity:High Difficulty:Medium
iSECPartnersFinalReport
CryptoCatiOS(Pre-Distribution)
Page16of35
FINDINGID:iSEC-RFACC0114-1
TARGETS:TheencodeMessagemethodinTBOTRManager.m,astestedbetweenJan27andFeb7.
DESCRIPTION:TheiOSapplicationlogstheencryptedandunencryptedcontentsofdirectmessages,
alongwiththeusernamesofthosesendingthem,totheAppleSystemLog.Thiscanexposetheinformationtoamaliciousthird-partyapplicationoraphysicalattacker.
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
Listing1:TBOTRManager/TBOTRManager.m
2014-01-2813:19:48.664Cryptocat[27655:70b]!!!executingthecompletionblock,(1)pending
2014-01-2813:19:48.664Cryptocat[27655:70b]--willencodemessagefromtestisec4@conference.crypto.cat/fakedavidtotestisec4@conference.crypto.cat/simu
2014-01-28
2014-01-28
2014-01-28
2014-01-28
13:19:48.665Cryptocat[27655:70b]policy_cb
13:19:48.665Cryptocat[27655:70b]convert_data_cb
13:19:48.665Cryptocat[27655:70b]--orgmessage:Ihopenobodyreadsmysecretmessage!13:19:48.666Cryptocat[27655:70b]--encryptedmessage:
?OTR:AAMD/Wku/
Ks2Ls0AAAAAAQAAAAEAAADAhfttytd4iXxc7BRfacEajOMLLNEssNstEaj7g9vMVYCVzKvpcfS9K9Ub8kaggIsXBTZ9fhZHQ3tgWOsQOjtotoCGRrpo
/ByZGSiEfye0NGrLwAsVesV0AYPAr8JtzoB5xXanVU6FHyQ+qAVUKSsHhy70+X9iGgBZU+KUqrlFLwVN73mcRp9q4HIy+huiNEXnCgJBHnXRhWpFVc7cOglioz+Z8InpAvQGZqzOQ/jJcGP5zaL8l1gUgvPcuexJGF+5AAAAAAAAAAIAAAAn3SMntmZaPzlKFs5+kkpz2skCy5gpq6vNkfr6Fvdi1qSowaicEYKKUpphJfte+DsNax/rwlF1JRP4FaYAAAAA.
EXPLOITSCENARIO:AmaliciousapplicationonadevicerunningiOS6directlyreadsusermessages
outoftheAppleSystemLog,constitutingabreachofconfidentiality.OniOS7,asimilarattackispossiblebutcurrentlywouldrequirephysicalpossessionofthedeviceorthatthedevicebejailbroken.
SHORTTERMSOLUTION:UseadefinetoenableNSLogstatementsfordevelopmentanddebugging,
anddisablethesebeforeshippingthesoftware.ThiscanbedonebyputtingthefollowingcodeintotheappropriatePREFIX_HEADER(*.pch)file:
LONGTERMSOLUTION:Considerusingbreakpointactions2todologging;thesecanbemoreconve-nientinsomecircumstances,anddonotresultindatabeingwrittentothesystemlogwhendeployed.
2
/questions/558568/how-do-i-debug-with-nsloginside-of-the-iphone-
simulator
February7,2014
OpenTechnologyFund
Version1.1
#ifdefDEBUG
# defineNSLog(...)NSLog(VA_ARGS)#else
# defineNSLog(...)#endif
NSString*newMessage=@"";if(newMessageC){
newMessage=[NSStringstringWithUTF8String:newMessageC];
}
otrl_message_free(newMessageC);
NSLog(@"--orgmessage:%@",message);
NSLog(@"--encryptedmessage:%@",newMessage);
completionBlock(newMessage);
}];
2.Privatemessagesareloggedinplaintext
Class:DataExposure Severity:High Difficulty:Medium
iSECPartnersFinalReport
CryptoCatiOS(Pre-Distribution)
Page17of35
FINDINGID:iSEC-RFACC0114-2
TARGETS:TheCryptoCatiOSapplication,astestedbetweenJan27andFeb7.
DESCRIPTION:UponreceivingarequestforgenerationofanOTRprivatekey,theapplicationcalcu-
latesthekeyandwritesittothelocalfilesysteminplaintext.Thisallowsforrecoveryofthekeyfromthedeviceitself,aswellasfromdevicebackupsonthedesktopandfromApple'siCloudservice(asallcontentsoftheDocumentsfolderaresyncedtoiCloud).
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
Listing2:TBOTRManager/TBOTRManager.m
Listing3:Logsfromtheapplicationupongeneratingtheprivatekey
13:11:07.168Cryptocat[27655:1303]!!!willgeneratetheprivatekeyonbgthread13:11:10.698Cryptocat[27655:1303]!!!privatekeycalculated
13:11:10.699Cryptocat[27655:70b]!!!privatekeypath:/Users/dthiel/Library/Application
2014-01-28
2014-01-28
2014-01-28
Support
/iPhone
Simulator/7.0/Applications/300D6DAB-9120-4C14-8C3B-7B53352B4743/Documents/private-key
2014-01-2813:11:10.700Cryptocat[27655:70b]!!!finishingtheprivatekeygenerationonmainthread
EXPLOITSCENARIO:AgovernmentcompelsAppletodisclosesomeorallCryptoCatprivatekeys
storedontheiriCloudservice,usingthesekeystodecryptpastcommunications.Alternatively,lawenforcementforensicallyanalyzesthedeviceitselftoextractthekey.
SHORTTERMSOLUTION:StorethisprivatekeyintheKeychain,withaccessibilityattributesthatpre-
vent
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 二零二五版申通快递快递运输服务协议范本3篇
- 二零二五年度宠物领养服务合同标准范本2篇
- 纺织行业纺织培训
- 二零二五版国际货运代理业投资监管细则3篇
- 酒店管理的管理技能
- 二零二五年度物流仓储行业搬运工劳务派遣服务协议3篇
- 二零二五年度个人与企业个人间文化艺术交流活动合同规范3篇
- 二零二五年度跨境电商品牌授权区域代理销售委托代销合同3篇
- 二零二五年度个人教育培训贷款合同模板2篇
- 二零二五年度入学新生教育法律协议书(全面创新发展)3篇
- 致命性大出血急救专家共识
- 住院成人高血糖患者血糖监测医护协议处方共识
- DL-T5816-2020分布式电化学储能系统接入配电网设计规范
- 2024年4月自考00832英语词汇学试题
- 竞赛试卷(试题)-2023-2024学年六年级下册数学人教版
- 《电力用直流电源系统蓄电池组远程充放电技术规范》
- T-ACEF 095-2023 挥发性有机物泄漏检测红外成像仪(OGI)技术要求及监测规范
- 骨科手术的术后饮食和营养指导
- 旅游定制师入行培训方案
- 2024年中国南方航空股份有限公司招聘笔试参考题库含答案解析
- 六年级上册数学应用题100题
评论
0/150
提交评论