Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Vulnérabilités liées au téléversement de fichiers par Philippe Arteau

Vulnérabilités liées au téléversement de fichiers par Philippe Arteau

PRÉSENTATEUR PRINCIPAL: Philippe Arteau

WEBCAST: http://www.youtube.com/watch?v=mo10to3JNBY

RÉSUMÉ: Le téléversement de fichiers fait partie intégrante des applications web modernes. Qu'il s'agisse d'images ou de documents, plusieurs risques guettent l'acceptation de fichiers provenant d'un utilisateur. Les attaques les plus communes seront présentées allant de simples "webshells" à des problèmes de configuration plus poussés liés au "same orgin policy".

BIO: Philippe est conseiller en sécurité applicative pour le Groupe Technologies Desjardins. Au quotidien, il s'occupe d'effectuer des tests d'intrusions et des revues de code pour des applications utilisées par Desjardins. Il a découvert des vulnérabilités importantes dans plusieurs logiciels populaires comme Google Chrome, DropBox, ESAPI et Jira.

OWASP Montréal

November 07, 2013
Tweet

More Decks by OWASP Montréal

Other Decks in Programming

Transcript

  1. Agenda • Who am I? • The Basics ◦ Web

    Shell ◦ Path traversal • Advanced tricks ◦ Content-Type weakness ◦ SWF ◦ XXE
  2. Who am I ? • Security Advisor at Desjardins •

    Bug hunter ◦ Google Chromium, Dropbox, JIRA, ESAPI, PayPal... • Open-Source developper ◦ Find Security Bugs (Findbugs security extension) ◦ Javascript Scanner for ZAP Proxy
  3. Web Shell Consist in the upload of a malicious script

    file. Once uploaded, the script can be reach remotely to execute command, read file and more.
  4. Path traversal • Vulnerabilities occurs when a path is build

    using user input that is not properly sanitize. Example : upload/$USER$/$FILE$ upload/test/../../2_shell.php Ref: WASC-33: Path Traversal
  5. Content-Type • Content-type allow should be whitelisted • Content Sniffing

    ◦ X-Content-Type-Options (IE specific) Ref: Browser Security Handbook Secure Content Sniffing for Web Browsers
  6. Fishing attack Can we trust this URL? • domain *.dropbox.com

    • ssl certificate • no apparent XSS
  7. XML • Parsing XML is dangerous if advanced feature such

    as Entities are activate ◦ XML eXternal Entities (XXE) ◦ XML Entities Expension (XEE) Ref: WS-Attacks.org: XML Generic Entity Expansion
  8. XXE Example of XXE loading the content of a local

    file (server-side). <!DOCTYPE root [<!ENTITY xxe SYSTEM "file:///var/server/path/secret.txt">]> <root> <data>CONTENT---&xxe;---</data> </root>
  9. Protections • Store files in a directory that is not

    publicly exposed • Don’t use original filename as destination • Validate extension • Validate final path • Validate file content • Domain separation • Make no assumption about the content