SlideShare une entreprise Scribd logo
1  sur  48
Télécharger pour lire hors ligne
DEF CON 2010

               Kuon Ding, Wayne Huang
Agenda
 What is NoSQL
 Types of NoSQL
 Who uses NoSQL?
 NoSQL Architecture
 Security Issues
 Prevention and Detection !?
What is NoSQL
    No SQL technologies do
  not support SQL
    No SQL technologies are
  not vulnerable to threats
  such as SQL injection
What is NoSQL
  One of the most
  commonly accepted
  definitions--Not only
  a SQL
What is NoSQL
  The storage itself is a
  “none-relational
  DBMS”
    Semi-structured
    Schema-less
Types of NoSQL
1. Key-value based
2. Column-based
3. Document-based
4. Graph-based
5. Object-based
6. …
Types of NoSQL
What’s challenging for security
   researchers:
  NoSQL is resembled by its
   diversity
  Within the same family of
   NoSQL, implementations (of the
   client library) differ widely
Why NoSQL
1.  Performance

2.  Scalability
Who’d use NoSQL?
(What’s the impact?)
1.  Cloud computing
   Saas vendors
2.  SNS providers
3.  Portal websites
 Use a mixture of databases
NoSQL Architecture
Web Application     Web Services


          Client Library



          Data Storage
NoSQL Architecture
Web Application       Web Services
                  a



          Client Library



          Data Storage
The Client Library
  No Standards such as ODBC,
   JDBC, ADO, PDO
  H w is it implemented?
  What interfaces does it
   support?
  Query interface?
Why a SQL-like interface?
  Easier for developers
  SQL statements can be
  reused during migration
  from RDBMS to NoSQL
NoSQL Architecture
Web Application       Web Services
                  a



          Client Library



          Data Storage
NoSQL Architecture


     Client Library
NoSQL Architecture




                                                   Old vectors
SQL       ODBC JDBC ADO PDO
                   Client Library
           QL-like impl impl  impl implimpl
key-value




                                                  New vectors
           None-QL impl impl impl impl  impl
          QL-like impl impl impl  impl impl
  column None-QL impl impl impl impl impl
                                           impl
          QL-like impl  impl impl impl impl
document None-QL impl impl impl impl impl
NoSQL Architecture
SQL




                                                     Old vectors
          ODBC JDBC ADO PDO
                    Client Library
            QL-like impl impl impl  impl impl
    graph   None-QL impl impl impl impl impl impl
            QL-like impl impl  impl impl
                                       impl
key-value




                                                    New vectors
            None-QL impl impl impl impl impl
          QL-like impl impl impl  impl impl
  column None-QL impl impl impl impl impl
                                           impl
          QL-like impl  impl impl impl impl
document None-QL impl impl impl impl impl
NoSQL Architecture
SQL




                                                    Old vectors
          ODBC JDBC ADO PDO
            QL-like impl impl impl impl impl
   object           Client Library
            None-QL impl impl impl  impl impl
          QL-like impl impl impl   impl impl
    graph None-QL impl impl impl impl impl
                                            impl
          QL-like impl impl   impl impl impl
key-value None-QL impl impl impl impl




                                                   New vectors
                                         impl
          QL-like impl impl impl   impl impl
  column None-QL impl impl impl impl impl
                                            impl
          QL-like impl   impl impl impl impl
document None-QL impl impl impl impl impl
A Blessing?
In the past:
 Notion of RDBMS matured
 Notion of SQL matured
 SQL implementation standards
   matured ODBC, JDBC, etc
NoSQL Architecture
SQL




                                                    Old vectors
          ODBC JDBC ADO PDO
            QL-like impl impl impl impl impl
   object           Client Library
            None-QL impl impl impl  impl impl
          QL-like impl impl impl   impl impl
    graph None-QL impl impl impl impl impl
                                            impl
          QL-like impl impl   impl impl impl
key-value None-QL impl impl impl impl




                                                   New vectors
                                         impl
          QL-like impl impl impl   impl impl
  column None-QL impl impl impl impl impl
                                            impl
          QL-like impl   impl impl impl impl
document None-QL impl impl impl impl impl
NoSQL Vulnerabilities
 1.  Connection Pollution
 2.  JSON Injection
 3.  View Injection
 4.  Key Bruteforcing
Connection Pollution
Using CouchDB as example
    RESTful
    Cross- Database/ Pool Access
    CouchDB’s Global and DB Handler

    Easier: Handlers are all RESTful
  Ex:
    NoSQL.connect(http://couchDB/_restart”)
Connection Pollution
Using CouchDB as example
    RESTful
    Cross- Database/ Pool Access
    CouchDB’s Global and DB Handler

    Harder: Even when an injection vector exist, crossing DB
     is difficult
      Traditional SQL: ConnectSQL injectionJump DB or table
  Ex:
    NoSQL.connect(“http://”.$Pool.”/DC18/”)
    NoSQL.connect(“http://POOL/”.$Database)
Document-Based Issues:
JSON Injection (CouchDB)
DATA Manipulation!!
   DRY Don’t Repeat Yourself -- leverage
     existing JSON implementations
   If we really need to implement our own
     JSON parser 
   Troublemaker is the String type
     •  Try to use the Collection type such as
         hash and map
   When handing tainted strings, must
     escapeJSON() / unescapeJSON()
Document-based Issue:
View Injection (CouchDB)
Application Manipulation!!
   CouchDB is scriptable--use SpiderMonkey
    as the scripting engine
     These javascripts are called “Views”

   Predefined Views and Temporary Views
     Views are to do map reduce
     Retrieve arbitrary data, modify return
       values to manipulate control flow, etc
Key-Value Based Problem
Key bruteforcing
     It’s schema-free  No schema guessing required
     How to speedup attacks?
         Depends on the implementation of client library &
            architecture
         CHALLENGE Can we make context-sensitive
            attack?

   http://IP/app/action?key=1aD33rSq
   Ex:
     $value = NoSQL.Get($key)
Key-Value Based Security
Key bruteforcing Prevention
  (application-level)
   How data is modeled
   Key Size
   Key Space
   Unpredictable key generation
    algorithm
   Challenge-based (eg. Captchas)
NoSQL vs. WAS
1.  For traditional scanning, how to
     handle unknown error messages?
2.  For blind injections,
  If xQL exist, how to perform logic
   -based blind injections?
  Time-based differential attacks? Based
    on statistical analysis?
NoSQL vs. WAS
3.  Different types of attack payload
   Languages (data and programming)
      JSON injections (data)
      View injections (programming)
   Schema-less
     Attack surface is redefined
     Data is modeled not by SQL but by the
       application
     Much more sensitive to the entry point
4.  Different attack concepts(ex bruteforcing key?)
NoSQL vs. WAS / pentesting
Selecting the payload requires understanding of
    the underlying DB
How to blindly identify URLs involving NoSQL?

  The SQL support will be a subset of
    SQL-92/95
  Features (ex: Unions) that will impact
    parallelization will be removed
NoSQL vs. SCA
1.  Checks by data flow, less problems
2.  Diversity is a big problem
   Unsupported Client Library
3.  In general, a lot easier than WAS
NoSQL vs. WAF
1.  Key bruteforcing is not injection attack
      Block by access threshold


2.  URL integrity check (ex: add token)
     Transparency to the backend
    Ex:
    http://IP/app/action?key=1aD33rSq[HMAC($key)]
3.  Definition of attack payloads
     What is a data (ex JSON) injection?
     What is a view (ex javascript) injection?
Conclusion
  Threat analysis must be conducted under a
    NoSQL mindset
  Modeling of data is done by the application
    logic and not the SQL statements or DB
    schema
   Threat very sensitive to entry point
  Threat types are different
   Key bruteforcing
  Impacts existing security technologies
Comments please!!
We are considering implementing
  static and blackbox scanners for
  NoSQL technologies

Please give us some comments!
NoSQL, no SQL injections?

Contenu connexe

Tendances

CQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NETCQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NETDavid Hoerster
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Matthew Groves
 
Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...Andy Kucharski
 
Altitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edgeAltitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edgeFastly
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Ganesh Kondal
 
Elm - Could this be the Future of Web Dev?
Elm - Could this be the Future of Web Dev?Elm - Could this be the Future of Web Dev?
Elm - Could this be the Future of Web Dev?David Hoerster
 
Python & Cassandra - Best Friends
Python & Cassandra - Best FriendsPython & Cassandra - Best Friends
Python & Cassandra - Best FriendsJon Haddad
 
Asynchronous programming in ASP.NET
Asynchronous programming in ASP.NETAsynchronous programming in ASP.NET
Asynchronous programming in ASP.NETAlex Thissen
 
Scaling with mongo db (with notes)
Scaling with mongo db (with notes)Scaling with mongo db (with notes)
Scaling with mongo db (with notes)emiltamas
 
Distributed Virtual Transaction Directory Server
Distributed Virtual Transaction Directory ServerDistributed Virtual Transaction Directory Server
Distributed Virtual Transaction Directory ServerLDAPCon
 
Data encoding and Metadata for Streams
Data encoding and Metadata for StreamsData encoding and Metadata for Streams
Data encoding and Metadata for Streamsunivalence
 
Spark Streaming @ Scale (Clicktale)
Spark Streaming @ Scale (Clicktale)Spark Streaming @ Scale (Clicktale)
Spark Streaming @ Scale (Clicktale)Yuval Itzchakov
 
RedisConf18 - Writing modular & encapsulated Redis code
RedisConf18 - Writing modular & encapsulated Redis codeRedisConf18 - Writing modular & encapsulated Redis code
RedisConf18 - Writing modular & encapsulated Redis codeRedis Labs
 
WebLogic Scripting Tool Overview
WebLogic Scripting Tool OverviewWebLogic Scripting Tool Overview
WebLogic Scripting Tool OverviewJames Bayer
 
High Performance Java EE with JCache and CDI
High Performance Java EE with JCache and CDIHigh Performance Java EE with JCache and CDI
High Performance Java EE with JCache and CDIPayara
 
Scale and Throughput @ Clicktale with Akka
Scale and Throughput @ Clicktale with AkkaScale and Throughput @ Clicktale with Akka
Scale and Throughput @ Clicktale with AkkaYuval Itzchakov
 
Running MongoDB in the Cloud
Running MongoDB in the CloudRunning MongoDB in the Cloud
Running MongoDB in the CloudTony Tam
 
Keeping your Kubernetes Cluster Secure
Keeping your Kubernetes Cluster SecureKeeping your Kubernetes Cluster Secure
Keeping your Kubernetes Cluster SecureGene Gotimer
 
Cloud Architecture & Distributed Systems Trivia
Cloud Architecture & Distributed Systems TriviaCloud Architecture & Distributed Systems Trivia
Cloud Architecture & Distributed Systems TriviaDr.-Ing. Michael Menzel
 

Tendances (20)

CQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NETCQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NET
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017
 
Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...Drupal commerce performance profiling and tunning using loadstorm experiments...
Drupal commerce performance profiling and tunning using loadstorm experiments...
 
Altitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edgeAltitude SF 2017: Security at the edge
Altitude SF 2017: Security at the edge
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6
 
Elm - Could this be the Future of Web Dev?
Elm - Could this be the Future of Web Dev?Elm - Could this be the Future of Web Dev?
Elm - Could this be the Future of Web Dev?
 
Python & Cassandra - Best Friends
Python & Cassandra - Best FriendsPython & Cassandra - Best Friends
Python & Cassandra - Best Friends
 
Asynchronous programming in ASP.NET
Asynchronous programming in ASP.NETAsynchronous programming in ASP.NET
Asynchronous programming in ASP.NET
 
CQRS
CQRSCQRS
CQRS
 
Scaling with mongo db (with notes)
Scaling with mongo db (with notes)Scaling with mongo db (with notes)
Scaling with mongo db (with notes)
 
Distributed Virtual Transaction Directory Server
Distributed Virtual Transaction Directory ServerDistributed Virtual Transaction Directory Server
Distributed Virtual Transaction Directory Server
 
Data encoding and Metadata for Streams
Data encoding and Metadata for StreamsData encoding and Metadata for Streams
Data encoding and Metadata for Streams
 
Spark Streaming @ Scale (Clicktale)
Spark Streaming @ Scale (Clicktale)Spark Streaming @ Scale (Clicktale)
Spark Streaming @ Scale (Clicktale)
 
RedisConf18 - Writing modular & encapsulated Redis code
RedisConf18 - Writing modular & encapsulated Redis codeRedisConf18 - Writing modular & encapsulated Redis code
RedisConf18 - Writing modular & encapsulated Redis code
 
WebLogic Scripting Tool Overview
WebLogic Scripting Tool OverviewWebLogic Scripting Tool Overview
WebLogic Scripting Tool Overview
 
High Performance Java EE with JCache and CDI
High Performance Java EE with JCache and CDIHigh Performance Java EE with JCache and CDI
High Performance Java EE with JCache and CDI
 
Scale and Throughput @ Clicktale with Akka
Scale and Throughput @ Clicktale with AkkaScale and Throughput @ Clicktale with Akka
Scale and Throughput @ Clicktale with Akka
 
Running MongoDB in the Cloud
Running MongoDB in the CloudRunning MongoDB in the Cloud
Running MongoDB in the Cloud
 
Keeping your Kubernetes Cluster Secure
Keeping your Kubernetes Cluster SecureKeeping your Kubernetes Cluster Secure
Keeping your Kubernetes Cluster Secure
 
Cloud Architecture & Distributed Systems Trivia
Cloud Architecture & Distributed Systems TriviaCloud Architecture & Distributed Systems Trivia
Cloud Architecture & Distributed Systems Trivia
 

En vedette

NoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDBNoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDBSqreen
 
SQL or NoSQL, that is the question!
SQL or NoSQL, that is the question!SQL or NoSQL, that is the question!
SQL or NoSQL, that is the question!Andraz Tori
 
Hadoop REST API Security with Apache Knox Gateway
Hadoop REST API Security with Apache Knox GatewayHadoop REST API Security with Apache Knox Gateway
Hadoop REST API Security with Apache Knox GatewayDataWorks Summit
 
Security Challenges in Node.js
Security Challenges in Node.jsSecurity Challenges in Node.js
Security Challenges in Node.jsWebsecurify
 
StHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injection
StHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injectionStHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injection
StHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injectionStHack
 
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...Kevin Minder
 
Discover Enterprise Security Features in Hortonworks Data Platform 2.1: Apach...
Discover Enterprise Security Features in Hortonworks Data Platform 2.1: Apach...Discover Enterprise Security Features in Hortonworks Data Platform 2.1: Apach...
Discover Enterprise Security Features in Hortonworks Data Platform 2.1: Apach...Hortonworks
 
Web Application Security 101 - 06 Authentication
Web Application Security 101 - 06 AuthenticationWeb Application Security 101 - 06 Authentication
Web Application Security 101 - 06 AuthenticationWebsecurify
 
Hadoop Security: Overview
Hadoop Security: OverviewHadoop Security: Overview
Hadoop Security: OverviewCloudera, Inc.
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introductionPooyan Mehrparvar
 
Hadoop Security Today & Tomorrow with Apache Knox
Hadoop Security Today & Tomorrow with Apache KnoxHadoop Security Today & Tomorrow with Apache Knox
Hadoop Security Today & Tomorrow with Apache KnoxVinay Shukla
 
Physical Penetration Testing - RootedCON 2015
Physical Penetration Testing - RootedCON 2015Physical Penetration Testing - RootedCON 2015
Physical Penetration Testing - RootedCON 2015Hykeos
 
Oracle Database 12c Attack Vectors
Oracle Database 12c Attack VectorsOracle Database 12c Attack Vectors
Oracle Database 12c Attack VectorsMartin Toshev
 
An Introduction to Accumulo
An Introduction to AccumuloAn Introduction to Accumulo
An Introduction to AccumuloDonald Miner
 
Hdp security overview
Hdp security overview Hdp security overview
Hdp security overview Hortonworks
 
NoSQL databases, the CAP theorem, and the theory of relativity
NoSQL databases, the CAP theorem, and the theory of relativityNoSQL databases, the CAP theorem, and the theory of relativity
NoSQL databases, the CAP theorem, and the theory of relativityLars Marius Garshol
 
Authentication(pswrd,token,certificate,biometric)
Authentication(pswrd,token,certificate,biometric)Authentication(pswrd,token,certificate,biometric)
Authentication(pswrd,token,certificate,biometric)Ali Raw
 

En vedette (20)

NoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDBNoSQL Injections in Node.js - The case of MongoDB
NoSQL Injections in Node.js - The case of MongoDB
 
SQL or NoSQL, that is the question!
SQL or NoSQL, that is the question!SQL or NoSQL, that is the question!
SQL or NoSQL, that is the question!
 
Hadoop REST API Security with Apache Knox Gateway
Hadoop REST API Security with Apache Knox GatewayHadoop REST API Security with Apache Knox Gateway
Hadoop REST API Security with Apache Knox Gateway
 
hacking with node.JS
hacking with node.JShacking with node.JS
hacking with node.JS
 
Security Challenges in Node.js
Security Challenges in Node.jsSecurity Challenges in Node.js
Security Challenges in Node.js
 
StHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injection
StHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injectionStHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injection
StHack 2013 - Florian "@agixid" Gaultier No SQL injection but NoSQL injection
 
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
Securing Hadoop's REST APIs with Apache Knox Gateway Hadoop Summit June 6th, ...
 
Discover Enterprise Security Features in Hortonworks Data Platform 2.1: Apach...
Discover Enterprise Security Features in Hortonworks Data Platform 2.1: Apach...Discover Enterprise Security Features in Hortonworks Data Platform 2.1: Apach...
Discover Enterprise Security Features in Hortonworks Data Platform 2.1: Apach...
 
Web Application Security 101 - 06 Authentication
Web Application Security 101 - 06 AuthenticationWeb Application Security 101 - 06 Authentication
Web Application Security 101 - 06 Authentication
 
Pentesting with Metasploit
Pentesting with MetasploitPentesting with Metasploit
Pentesting with Metasploit
 
Hadoop Security: Overview
Hadoop Security: OverviewHadoop Security: Overview
Hadoop Security: Overview
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introduction
 
Hadoop Security Today & Tomorrow with Apache Knox
Hadoop Security Today & Tomorrow with Apache KnoxHadoop Security Today & Tomorrow with Apache Knox
Hadoop Security Today & Tomorrow with Apache Knox
 
Physical Penetration Testing - RootedCON 2015
Physical Penetration Testing - RootedCON 2015Physical Penetration Testing - RootedCON 2015
Physical Penetration Testing - RootedCON 2015
 
Oracle Database 12c Attack Vectors
Oracle Database 12c Attack VectorsOracle Database 12c Attack Vectors
Oracle Database 12c Attack Vectors
 
An Introduction to Accumulo
An Introduction to AccumuloAn Introduction to Accumulo
An Introduction to Accumulo
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
Hdp security overview
Hdp security overview Hdp security overview
Hdp security overview
 
NoSQL databases, the CAP theorem, and the theory of relativity
NoSQL databases, the CAP theorem, and the theory of relativityNoSQL databases, the CAP theorem, and the theory of relativity
NoSQL databases, the CAP theorem, and the theory of relativity
 
Authentication(pswrd,token,certificate,biometric)
Authentication(pswrd,token,certificate,biometric)Authentication(pswrd,token,certificate,biometric)
Authentication(pswrd,token,certificate,biometric)
 

Similaire à NoSQL, no SQL injections?

Scala in a wild enterprise
Scala in a wild enterpriseScala in a wild enterprise
Scala in a wild enterpriseRafael Bagmanov
 
Sql vs NoSQL-Presentation
 Sql vs NoSQL-Presentation Sql vs NoSQL-Presentation
Sql vs NoSQL-PresentationShubham Tomar
 
KSQL Deep Dive - The Open Source Streaming Engine for Apache Kafka
KSQL Deep Dive - The Open Source Streaming Engine for Apache KafkaKSQL Deep Dive - The Open Source Streaming Engine for Apache Kafka
KSQL Deep Dive - The Open Source Streaming Engine for Apache KafkaKai Wähner
 
Rafael Bagmanov «Scala in a wild enterprise»
Rafael Bagmanov «Scala in a wild enterprise»Rafael Bagmanov «Scala in a wild enterprise»
Rafael Bagmanov «Scala in a wild enterprise»e-Legion
 
NoSQL – Beyond the Key-Value Store
NoSQL – Beyond the Key-Value StoreNoSQL – Beyond the Key-Value Store
NoSQL – Beyond the Key-Value StoreDATAVERSITY
 
C# Advanced L06-SQL Server+LINQ to SQL
C# Advanced L06-SQL Server+LINQ to SQLC# Advanced L06-SQL Server+LINQ to SQL
C# Advanced L06-SQL Server+LINQ to SQLMohammad Shaker
 
Survey of High Performance NoSQL Systems
Survey of High Performance NoSQL SystemsSurvey of High Performance NoSQL Systems
Survey of High Performance NoSQL SystemsScyllaDB
 
Big Data Day LA 2016/ NoSQL track - Spark And Couchbase: Augmenting The Opera...
Big Data Day LA 2016/ NoSQL track - Spark And Couchbase: Augmenting The Opera...Big Data Day LA 2016/ NoSQL track - Spark And Couchbase: Augmenting The Opera...
Big Data Day LA 2016/ NoSQL track - Spark And Couchbase: Augmenting The Opera...Data Con LA
 
Spark and Couchbase– Augmenting the Operational Database with Spark
Spark and Couchbase– Augmenting the Operational Database with SparkSpark and Couchbase– Augmenting the Operational Database with Spark
Spark and Couchbase– Augmenting the Operational Database with SparkMatt Ingenthron
 
ExceptionTail.com - MongoDB and RabbitMQ in action
ExceptionTail.com - MongoDB and RabbitMQ in actionExceptionTail.com - MongoDB and RabbitMQ in action
ExceptionTail.com - MongoDB and RabbitMQ in actionSorin Oboroceanu
 
Ideas for Step7 Tools.pptx
Ideas for Step7 Tools.pptxIdeas for Step7 Tools.pptx
Ideas for Step7 Tools.pptxFeri Handoyo
 
SQL Data Service Overview
SQL Data Service OverviewSQL Data Service Overview
SQL Data Service OverviewEric Nelson
 
Kafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kafka Streams vs. KSQL for Stream Processing on top of Apache KafkaKafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kafka Streams vs. KSQL for Stream Processing on top of Apache KafkaKai Wähner
 
Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...
Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...
Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...Codemotion
 
Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...
Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...
Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...Codemotion
 
java database connectivity for java programming
java database connectivity for java programmingjava database connectivity for java programming
java database connectivity for java programmingrinky1234
 

Similaire à NoSQL, no SQL injections? (20)

NoSQL for you
NoSQL for youNoSQL for you
NoSQL for you
 
Scala in a wild enterprise
Scala in a wild enterpriseScala in a wild enterprise
Scala in a wild enterprise
 
SFScon18 - Stefano Pampaloni - The SQL revenge
SFScon18 - Stefano Pampaloni - The SQL revengeSFScon18 - Stefano Pampaloni - The SQL revenge
SFScon18 - Stefano Pampaloni - The SQL revenge
 
Sql vs NoSQL-Presentation
 Sql vs NoSQL-Presentation Sql vs NoSQL-Presentation
Sql vs NoSQL-Presentation
 
KSQL Deep Dive - The Open Source Streaming Engine for Apache Kafka
KSQL Deep Dive - The Open Source Streaming Engine for Apache KafkaKSQL Deep Dive - The Open Source Streaming Engine for Apache Kafka
KSQL Deep Dive - The Open Source Streaming Engine for Apache Kafka
 
Rafael Bagmanov «Scala in a wild enterprise»
Rafael Bagmanov «Scala in a wild enterprise»Rafael Bagmanov «Scala in a wild enterprise»
Rafael Bagmanov «Scala in a wild enterprise»
 
NoSQL – Beyond the Key-Value Store
NoSQL – Beyond the Key-Value StoreNoSQL – Beyond the Key-Value Store
NoSQL – Beyond the Key-Value Store
 
Methods of NoSQL database systems benchmarking
Methods of NoSQL database systems benchmarkingMethods of NoSQL database systems benchmarking
Methods of NoSQL database systems benchmarking
 
C# Advanced L06-SQL Server+LINQ to SQL
C# Advanced L06-SQL Server+LINQ to SQLC# Advanced L06-SQL Server+LINQ to SQL
C# Advanced L06-SQL Server+LINQ to SQL
 
Survey of High Performance NoSQL Systems
Survey of High Performance NoSQL SystemsSurvey of High Performance NoSQL Systems
Survey of High Performance NoSQL Systems
 
Big Data Day LA 2016/ NoSQL track - Spark And Couchbase: Augmenting The Opera...
Big Data Day LA 2016/ NoSQL track - Spark And Couchbase: Augmenting The Opera...Big Data Day LA 2016/ NoSQL track - Spark And Couchbase: Augmenting The Opera...
Big Data Day LA 2016/ NoSQL track - Spark And Couchbase: Augmenting The Opera...
 
Spark and Couchbase– Augmenting the Operational Database with Spark
Spark and Couchbase– Augmenting the Operational Database with SparkSpark and Couchbase– Augmenting the Operational Database with Spark
Spark and Couchbase– Augmenting the Operational Database with Spark
 
ExceptionTail.com - MongoDB and RabbitMQ in action
ExceptionTail.com - MongoDB and RabbitMQ in actionExceptionTail.com - MongoDB and RabbitMQ in action
ExceptionTail.com - MongoDB and RabbitMQ in action
 
Ideas for Step7 Tools.pptx
Ideas for Step7 Tools.pptxIdeas for Step7 Tools.pptx
Ideas for Step7 Tools.pptx
 
SQL Data Service Overview
SQL Data Service OverviewSQL Data Service Overview
SQL Data Service Overview
 
Kafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kafka Streams vs. KSQL for Stream Processing on top of Apache KafkaKafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
Kafka Streams vs. KSQL for Stream Processing on top of Apache Kafka
 
Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...
Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...
Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...
 
Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...
Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...
Kai Waehner - KSQL – The Open Source SQL Streaming Engine for Apache Kafka - ...
 
java database connectivity for java programming
java database connectivity for java programmingjava database connectivity for java programming
java database connectivity for java programming
 
KSQL Intro
KSQL IntroKSQL Intro
KSQL Intro
 

Dernier

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Dernier (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

NoSQL, no SQL injections?

  • 1. DEF CON 2010 Kuon Ding, Wayne Huang
  • 2. Agenda  What is NoSQL  Types of NoSQL  Who uses NoSQL?  NoSQL Architecture  Security Issues  Prevention and Detection !?
  • 3. What is NoSQL  No SQL technologies do not support SQL  No SQL technologies are not vulnerable to threats such as SQL injection
  • 4. What is NoSQL  One of the most commonly accepted definitions--Not only a SQL
  • 5. What is NoSQL  The storage itself is a “none-relational DBMS”  Semi-structured  Schema-less
  • 6. Types of NoSQL 1. Key-value based 2. Column-based 3. Document-based 4. Graph-based 5. Object-based 6. …
  • 7. Types of NoSQL What’s challenging for security researchers:   NoSQL is resembled by its diversity   Within the same family of NoSQL, implementations (of the client library) differ widely
  • 8.
  • 10. Who’d use NoSQL? (What’s the impact?) 1.  Cloud computing  Saas vendors 2.  SNS providers 3.  Portal websites  Use a mixture of databases
  • 11.
  • 12. NoSQL Architecture Web Application Web Services Client Library Data Storage
  • 13. NoSQL Architecture Web Application Web Services a Client Library Data Storage
  • 14. The Client Library   No Standards such as ODBC, JDBC, ADO, PDO   H w is it implemented?   What interfaces does it support?  Query interface?
  • 15.
  • 16. Why a SQL-like interface?   Easier for developers   SQL statements can be reused during migration from RDBMS to NoSQL
  • 17. NoSQL Architecture Web Application Web Services a Client Library Data Storage
  • 18. NoSQL Architecture Client Library
  • 19. NoSQL Architecture Old vectors SQL ODBC JDBC ADO PDO Client Library QL-like impl impl impl implimpl key-value New vectors None-QL impl impl impl impl impl QL-like impl impl impl impl impl column None-QL impl impl impl impl impl impl QL-like impl impl impl impl impl document None-QL impl impl impl impl impl
  • 20. NoSQL Architecture SQL Old vectors ODBC JDBC ADO PDO Client Library QL-like impl impl impl impl impl graph None-QL impl impl impl impl impl impl QL-like impl impl impl impl impl key-value New vectors None-QL impl impl impl impl impl QL-like impl impl impl impl impl column None-QL impl impl impl impl impl impl QL-like impl impl impl impl impl document None-QL impl impl impl impl impl
  • 21. NoSQL Architecture SQL Old vectors ODBC JDBC ADO PDO QL-like impl impl impl impl impl object Client Library None-QL impl impl impl impl impl QL-like impl impl impl impl impl graph None-QL impl impl impl impl impl impl QL-like impl impl impl impl impl key-value None-QL impl impl impl impl New vectors impl QL-like impl impl impl impl impl column None-QL impl impl impl impl impl impl QL-like impl impl impl impl impl document None-QL impl impl impl impl impl
  • 22. A Blessing? In the past:  Notion of RDBMS matured  Notion of SQL matured  SQL implementation standards matured ODBC, JDBC, etc
  • 23.
  • 24.
  • 25.
  • 26. NoSQL Architecture SQL Old vectors ODBC JDBC ADO PDO QL-like impl impl impl impl impl object Client Library None-QL impl impl impl impl impl QL-like impl impl impl impl impl graph None-QL impl impl impl impl impl impl QL-like impl impl impl impl impl key-value None-QL impl impl impl impl New vectors impl QL-like impl impl impl impl impl column None-QL impl impl impl impl impl impl QL-like impl impl impl impl impl document None-QL impl impl impl impl impl
  • 27.
  • 28. NoSQL Vulnerabilities 1.  Connection Pollution 2.  JSON Injection 3.  View Injection 4.  Key Bruteforcing
  • 29. Connection Pollution Using CouchDB as example   RESTful   Cross- Database/ Pool Access   CouchDB’s Global and DB Handler   Easier: Handlers are all RESTful Ex:   NoSQL.connect(http://couchDB/_restart”)
  • 30.
  • 31.
  • 32.
  • 33. Connection Pollution Using CouchDB as example   RESTful   Cross- Database/ Pool Access   CouchDB’s Global and DB Handler   Harder: Even when an injection vector exist, crossing DB is difficult   Traditional SQL: ConnectSQL injectionJump DB or table Ex:   NoSQL.connect(“http://”.$Pool.”/DC18/”)   NoSQL.connect(“http://POOL/”.$Database)
  • 34. Document-Based Issues: JSON Injection (CouchDB) DATA Manipulation!!  DRY Don’t Repeat Yourself -- leverage existing JSON implementations  If we really need to implement our own JSON parser  Troublemaker is the String type •  Try to use the Collection type such as hash and map  When handing tainted strings, must escapeJSON() / unescapeJSON()
  • 35. Document-based Issue: View Injection (CouchDB) Application Manipulation!!  CouchDB is scriptable--use SpiderMonkey as the scripting engine  These javascripts are called “Views”  Predefined Views and Temporary Views  Views are to do map reduce  Retrieve arbitrary data, modify return values to manipulate control flow, etc
  • 36.
  • 37.
  • 38. Key-Value Based Problem Key bruteforcing   It’s schema-free  No schema guessing required   How to speedup attacks?   Depends on the implementation of client library & architecture   CHALLENGE Can we make context-sensitive attack? http://IP/app/action?key=1aD33rSq Ex:   $value = NoSQL.Get($key)
  • 39. Key-Value Based Security Key bruteforcing Prevention (application-level)  How data is modeled  Key Size  Key Space  Unpredictable key generation algorithm  Challenge-based (eg. Captchas)
  • 40.
  • 41. NoSQL vs. WAS 1.  For traditional scanning, how to handle unknown error messages? 2.  For blind injections,  If xQL exist, how to perform logic -based blind injections?  Time-based differential attacks? Based on statistical analysis?
  • 42. NoSQL vs. WAS 3.  Different types of attack payload  Languages (data and programming)   JSON injections (data)   View injections (programming)  Schema-less  Attack surface is redefined  Data is modeled not by SQL but by the application  Much more sensitive to the entry point 4.  Different attack concepts(ex bruteforcing key?)
  • 43. NoSQL vs. WAS / pentesting Selecting the payload requires understanding of the underlying DB How to blindly identify URLs involving NoSQL?   The SQL support will be a subset of SQL-92/95   Features (ex: Unions) that will impact parallelization will be removed
  • 44. NoSQL vs. SCA 1.  Checks by data flow, less problems 2.  Diversity is a big problem  Unsupported Client Library 3.  In general, a lot easier than WAS
  • 45. NoSQL vs. WAF 1.  Key bruteforcing is not injection attack   Block by access threshold 2.  URL integrity check (ex: add token)   Transparency to the backend Ex: http://IP/app/action?key=1aD33rSq[HMAC($key)] 3.  Definition of attack payloads   What is a data (ex JSON) injection?   What is a view (ex javascript) injection?
  • 46. Conclusion   Threat analysis must be conducted under a NoSQL mindset   Modeling of data is done by the application logic and not the SQL statements or DB schema   Threat very sensitive to entry point   Threat types are different   Key bruteforcing   Impacts existing security technologies
  • 47. Comments please!! We are considering implementing static and blackbox scanners for NoSQL technologies Please give us some comments!