29
Why AppSec Matters? Aldo Salas [email protected]

Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas [email protected] Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

WhyAppSec Matters?

[email protected]

Page 2: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Agenda

• Intro.• CurrentstatusofAppSec intheindustry.• Casestudy.• WhyOWASPmatters.

Page 3: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Aboutme

• 10+yearsofexperienceinAppSec.• CurrentlyworkingforFortune500Company.• Independentresearcherinfreetime(bugbounty).

• ChapterLeaderforAguascalientes.• Favoritevulnerability:SQLInjection.• ProudU.A.A.alumnus.

Page 4: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

I’mnotheretoscareyou…

• OrmaybeIam

Page 5: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Anotherweek,anotherhack

Andthelistgoeson:http://www.itgovernance.co.uk/blog/list-of-data-breaches-and-cyber-attacks-in-march-2016/

Page 6: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Wearenotdoingagreatjob

Page 7: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Real-lifecasestudy

Page 8: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Background• Thirdpartyusedtocollectfestivalsandnew-hiresinformation.• Thefollowingemailwassenttoartists/managers/assistants:

• Firstthoughton“public_key”:Maybeit’sanauthenticationtoken,notidealbutstillprovidessomelevelofauthentication.

Page 9: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Phase 1:Discovery

Page 10: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Publickeyparameter:

• Removingpublic_key =UnauthenticatedAccessToData

Page 11: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

AnalyzingURL:

• Changing IDinURL=InsecureDirectObjectReference(Stillunauthenticated)

Page 12: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Analyzingpage:

Page 13: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Analyzingpage:

• FilesarestoredinAWSS3• Fileisalwaysrenamedtooriginal.ext• Unauthenticatedaccesstouploadedfilesaswell.• Bruteforcing offilesispossiblebutnotreallyneeded.

Page 14: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Summarysofar:• Unauthenticatedaccesstoartistprofile.

• AccesstoANYprofileispossibleusingInsecureDirectObject

References.

• UnrestrictedFileUploadispossible.

• UnauthenticatedAccesstouploadedfilesispossible.

Page 15: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Reminder:thisisasinglepage.

Page 16: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Phase2:Automation

Page 17: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Automatingdataretrievaltodemonstraterisk

• InitialResults:• Morethan80thousandrecordsfound.

• Notes:• Morethan170thousandrequestsweresent.• Morethan6GBsweredownloaded.• Iwasneverstoppednorevendetected.

Page 18: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Phase3:Parsingdata

Page 19: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Parsingdata:• NumberOfDirectURLsToDownloadFilesobtained:

Page 20: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Parsingdata:• ArtistsPIIincludingemailsandphones

Page 21: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Parsingdata:• Andmuch,muchmore:

Page 22: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Possibleoutcomesifexploitedbyattackers:

• Headlinesinthenews:• “HUNDRESOFTHOUSANDSARTISTSDETAILSLEAKEDBYCOMPANY”

• “WANTTAYLORSWIFT’SNUMBER?WE’VEGOTIT”

• Attackerssellingorleakingartistsinformation(stalkers,curiouspeople,etc.)

• Fraudandpotentiallegalconsequences(SSNsinvolved).• Phishingcampaignsagainstretrievedemails.• Etc.,etc.,etc.

Page 23: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Whatcould’vebeendonebetter:• Preventunauthenticatedaccesstothepage.

• Onceauthenticationhasbeenimplemented,performauthorizationchecks.

• Validateatserver-sidetheuploadedfiles.

• Alsoaddauthenticationcheckstothefiles.

• LoggingandIPS/IDSconfigurationtodetectunusualactivity.

Page 24: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Toolsusedfordiscoveryandexploit:

• Pythonprogramminglanguagetocodesmalldownloadscript.

• StandardUnixtoolstoparsedata(find,cat,cut,grep,sort,sed,ls,wget).

Page 25: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Questions?

Page 26: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

WhyOWASPMatters?

• Allthevulnerabilitiesshowninthispresentationcould’vebeenavoidedbyfollowingOWASPrecommendations.

Page 27: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

OWASPTOP10misses:

• A1– Injection• A2– BrokenAuthenticationandSessionManagement

• A4– InsecureDirectObjectReferences

https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project

Page 28: Why AppSec Matters? - OWASPWhy AppSec Matters? Aldo Salas aldo.salas@owasp.org Agenda • Intro. • Current status of AppSecin the industry. • Case study. • Why OWASP matters

Questions?