Nicolas Grégoire Agarri - FR On Twitter. Bio Is Online
Nicolas Grégoire Agarri - FR On Twitter. Bio Is Online
Nicolas Grégoire Agarri - FR On Twitter. Bio Is Online
Me
● Nicolas Grégoire
● Agarri_FR on Twitter
● Bio is online:
http://insomnihack.ch/conferences/
Content
● No assembly code, no client-side stuff
● Hacker thinking
● So many FAILS
● And of course a few WINS
● Plenty of quotes
● Some precise facts:
– Timeline
– Money
Targets
Oracle in 2002
Oracle in 2014
Oracle CEO
Larry Ellison
Oracle CSO
Mary Ann Davidson
● Features
– Access to 3rd-party data (craiglist.search, ...)
– Access to public Yahoo data (local.search, ...)
– Access to Yahoo services (ymail.messages, ...)
– Processing (xml, xslt, feednormalizer, …)
– Near-arbitrary HTTP requests (uri.data, xmlpost, ...)
XXE everywhere
● Tables “xslt” (x2) and “feednormalizer” (x1)
● Open Data table definition (x1)
● Reachable from:
– Yahoo Pipes
– YQL console
– REST interface
Dumb anti-SSRF blacklist
● Forbidden:
– Local and multicast IP addresses
– Non HTTP ports
● Basic:
– http://cwe.mitre.org/data/definitions/918.html
● Advanced:
– http://www.slideshare.net/d0znpp/ssrf-attacks-
and-sockets-smorgasbord-of-vulnerabilities
– http://raz0r.name/other/zeronights-hackquest-
erssma-task-writeup/
– http://www.youtube.com/watch?v=eHSNT8vWLfc
– https://github.com/pwntester/RSA_RESTing
Timeline
● FEATURE_SECURE_PROCESSING=TRUE
● Do everything in <xalan:script>
– Define functions and call them
– Or use the “src” attribute (if outbound access)
● Bug bounty
– Started in October 2013
– http://prezi.com/bugbounty/
Two editors
● Parameters
– Numerous cookies
– One single POST parameter
– Name = “b64%5Fzipped%5Fxml%5Fcontent”
● “PULL” extension
– Used when an existing presentation is opened
– Similar to previous one, but read-only
Burp magic
Burp magic
● Setup a white-list
– Only URL matching “http://” are authorized
● RFC 3927
● Describes the 169.254/16 network
● Links
– http://docs.aws.amazon.com/AWSEC2/latest/UserGuide
/AESDG-chapter-instancedata.html
– http://docs.openstack.org/admin-guide-
cloud/content/section_metadata-service.html
169.254.169.254
/etc/chef/client.rb
chef_server_url "https://api.opscode.com/organizations/prezi"
validation_client_name "prezi-validator"
etc/chef/validation.pem
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEA09U/TBxe[...]iRLSo6sJTJm6RCk6qZqRxM7UCbBw=
-----END RSA PRIVATE KEY-----
/etc/chef/encrypted_data_bag_secret
gqrnkG+M/t/1/3KhCzRNEiMBL[...]IohHq2lil/P8fS21aZJkXYmHyKdMJ2qo=
Chef?
● According to Wikipedia
– “Chef is a configuration management tool [...] used to streamline the task
of configuring & maintaining a company's servers [...] can integrate with
cloud-based platforms such as Rackspace and Amazon EC2 to
automatically provision and configure new machines.”
– http://en.wikipedia.org/wiki/Chef_(software)
I earned $9149
And it was fun!
Conclusion
● Oracle
– Very fragile XML parser (did I spoke about XSLT?)
– Do not patch their own production systems
● Yahoo
– Difficulties to reproduce bugs (but money is OK)
– May be pwned because of the anti-SSRF bypass
● Xalan-J
– Hard to convince, many thanks to oCERT + ASF Sec Team
● Prezi
– Awesome security team (look for their blog posts)
– I'll try to challenge them again!
Insomni'hack 2014 21/03/2014