Library

Video Player is loading.
 
Current Time 15:12
Duration 3:00
Loaded: 0.00%
 
x1.00


Back

Games & Quizzes

Training Mode - Typing
Fill the gaps to the Lyric - Best method
Training Mode - Picking
Pick the correct word to fill in the gap
Fill In The Blank
Find the missing words in a sentence Requires 5 vocabulary annotations
Vocabulary Match
Match the words to the definitions Requires 10 vocabulary annotations

You may need to watch a part of the video to unlock quizzes

Don't forget to Sign In to save your points

Challenge Accomplished

PERFECT HITS +NaN
HITS +NaN
LONGEST STREAK +NaN
TOTAL +
- //

We couldn't find definitions for the word you were looking for.
Or maybe the current language is not supported

  • 00:00

    >> MING CHOW: Good afternoon, everyone.

  • 00:01

    My name is Ming Chow and I will be speaking today about NoSQL databases.

  • 00:07

    How people here are using a NoSQL database such as Mongo, Redis, Cassandra, many, many,

  • 00:20

    to name.

  • 00:21

    How is your experience so far with them?

  • 00:23

    >> AUDIENCE MEMBER: Good.

  • 00:25

    >> MING CHOW: Yeah, so far, so good.

  • 00:28

    They are fast.

  • 00:29

    They are transactional.

  • 00:30

    They are very easy to use.

  • 00:32

    You don't need SQL to use them.

  • 00:35

    You know, and if you want to insert data, search for stuff, it's all based on the computer

  • 00:45

    science principle of key value pairs.

  • 00:48

    Okay?

  • 00:49

    So if you have never seen a Mongo database or a NoSQL database, typically how you want

  • 00:55

    to find data is I'm connected to a financial news database on Mongo right now, but if you

  • 01:01

    want to find something, it's going to be something like the database, the name of the collection,

  • 01:09

    then the find routine, and typically, it would take in JSON.

  • 01:15

    So the key is going to be screen name, let's say for the screen name is going to be CBS

  • 01:24

    News.

  • 01:25

    Okay?

  • 01:26

    So what I'm going to do here, just a very simple example is to show how you find all

  • 01:30

    financial news that's from CBS News on Twitter.

  • 01:34

    And so what happens is those are all of your results.

  • 01:38

    Okay?

  • 01:39

    So really nice and easy, but that's only just one way, one of many ways to search for stuff

  • 01:45

    in a NoSQL database such as Mongo.

  • 01:49

    What about security of NoSQL databases?

  • 01:54

    That's another story.

  • 01:55

    That's all over the place.

  • 01:57

    Right now we have a mixture of heterogeneous and homogenous security issues and that's

  • 02:05

    what I'm here to talk about.

  • 02:09

    Okay?

  • 02:11

    I'm actually very surprised that the topic of just NoSQL databases has never, ever been

  • 02:17

    covered here at DEF CON.

  • 02:19

    Two years ago, I talked about building, you know, the issues of using HTML 5, which is

  • 02:26

    the application side.

  • 02:28

    There's a lot to just the database side of things and a lot has changed in two years.

  • 02:34

    One thing that hasn't changed is we're all still new to NoSQL databases.

  • 02:42

    You know, we're all new to this, and the only thing largely a lot of us care about is just

  • 02:48

    making it work.

  • 02:50

    Just making it work.

  • 02:51

    And, of course, that certainly ‑‑ that has some, you know ‑‑ you know how usually

  • 02:58

    that goes, especially if you leave security into the hands of developers.

  • 03:04

    So a homogenous problem, a very simple one right off the bat, if you know database vendor,

  • 03:11

    you know the IP address, you know the port number.

  • 03:14

    You have almost won the game.

  • 03:16

    Okay?

  • 03:17

    Why?

  • 03:18

    Why is it just knowing just the IP address, the database vendor and the port number is

  • 03:24

    good enough?

  • 03:26

    That's because of this next thing, which is authentication and encryption.

  • 03:33

    It's almost nonexistent or extremely weak.

  • 03:37

    If you use many ‑‑ if not all NoSQL databases out there, if you take them out of the box,

  • 03:44

    you take them out of the box, and administrative user, authentication turned off.

  • 03:52

    Turned off.

  • 03:53

    Okay?

  • 03:54

    Even if they do support features such as encryption and auditing, not only do you have to turn

  • 04:03

    them on yourselves, but also, the scheme is really weak.

  • 04:12

    Because for example, among still uses MD5 in CouchDB.

  • 04:20

    If you ever read the documentation of Mongo or Couch or Redis or Cassandra.

  • 04:35

    We urge you to use this database system on a trusted environment.

  • 04:41

    (Chuckles).

  • 04:43

    That's from the documentation.

  • 04:44

    Just read the documentation.

  • 04:45

    It's quite mind boggling.

  • 04:48

    Security is a complete after thought.

  • 04:51

    How big is ‑‑ how big is NoSQL databases out there.

  • 04:57

    If you do a search on Shodan, it's 40,000 instances of Mongo that are out there, it

  • 05:06

    has and there are also 20,000 instances of Redis running.

  • 05:10

    So it's a big deal!

  • 05:11

    It's already there.

  • 05:13

    So this is a ‑‑ these are homogenous issues that we have seen that affects all

  • 05:21

    NoSQL databases.

  • 05:23

    Okay.

  • 05:24

    So there's a lot of chatter on this thing known as ‑‑ okay.

  • 05:29

    NoSQL ‑‑ not only do I not need to know SQL anymore, but this whole problem that I

  • 05:35

    think you guys might have heard of called SQL injection goes away.

  • 05:40

    Actually, in my humble opinion, the injection problem has gotten worse.

  • 05:47

    Okay?

  • 05:48

    Now, okay, sure SQL injection is gone, but now we have three ‑‑ I say three different

  • 05:56

    classes of injection attacks.

  • 05:58

    Okay.

  • 05:59

    One is called schema.

  • 06:00

    Now, NoSQL databases, how they work, they are based off of dynamic data model.

  • 06:07

    Okay?

  • 06:08

    If you insert a record or if you create a ‑‑ if you create a database that doesn't exist,

  • 06:20

    automatically create it for you, right on the fly.

  • 06:23

    Okay?

  • 06:24

    Yeah, it goes back to the original point that the NoSQL databases are really, really easy

  • 06:29

    to use.

  • 06:30

    It's very, very flexible.

  • 06:31

    That's a good thing.

  • 06:32

    Of course, a bad thing is, you know, you have flexible dynamic record and data entry.

  • 06:39

    Also, if you can easily overwrite existing values for keys, very, very simply, last key

  • 06:48

    wins.

  • 06:49

    Okay?

  • 06:50

    So I'm going to show you a few demos.

  • 06:53

    Schema I will do last.

  • 06:56

    You can do query, with many unsaved queries very simply by string concatenation and now

  • 07:03

    this gem.

  • 07:04

    I love this one.

  • 07:05

    How many people are good at JavaScript here?

  • 07:08

    Okay.

  • 07:09

    Learn it!

  • 07:11

    Okay.

  • 07:12

    Learn it!

  • 07:13

    It ‑‑ now a lot of these NoSQL databases, they have taken JavaScript functions as parameters

  • 07:23

    to search and insert okay?

  • 07:27

    And I will give you an example of using the where clause.

  • 07:30

    Now, here, I am now going to give a quick demo on ‑‑ hopefully this works.

  • 07:42

    Okay.

  • 07:45

    Search by handle.

  • 07:48

    So what I have done in this example is I have created a new search system, okay?

  • 07:54

    There's a whole bunch of Twitter handles that I use by the Bloomberg terminal and I have

  • 07:59

    actually stored 4,000 tweets in all.

  • 08:04

    But let's say that I know that one of the Twitters on the Bloomberg handle is venture

  • 08:13

    beat.

  • 08:14

    I type in venture beat and hit search.

  • 08:18

    This is a collection of all the news that's returned by venture beat, that has been tweeted

  • 08:23

    out by venture beat for, I don't know, a few days.

  • 08:29

    Okay?

  • 08:30

    All right.

  • 08:32

    Works well.

  • 08:33

    CBS News.

  • 08:38

    And so we have found 208 items.

  • 08:43

    Okay?

  • 08:44

    Now, how can we beat this system?

  • 08:48

    One thing is, what we can do, if you want to see more records than you want, okay, and

  • 08:56

    PHP is a very interesting beast working with Mongo databases.

  • 09:03

    Let's put in for this query parameters known as search box, we add square brackets, dollar

  • 09:11

    sign and E. And dollar sign and E in Mongo, means not equal to.

  • 09:17

    You can use dollar sign and E to search for things that are not equal for something.

  • 09:25

    What PHP does, any inputs that are within square brackets, they are automatically converted

  • 09:35

    to an associate format.

  • 09:37

    How will you read this is, okay ‑‑ so what this now ‑‑ this query will do,

  • 09:44

    the original stuff I showed you was, okay, give me everything that is CBS News or venture

  • 09:49

    beat.

  • 09:50

    Now, what we just did is we just modified the query and we just changed it on the fly

  • 09:55

    and we said, okay, give me everything that is not equal to CBS News.

  • 10:00

    Hit enter.

  • 10:03

    Now, we have all of these records, all of these news items that are from sources on

  • 10:13

    Twitter that are not CBS News.

  • 10:16

    Okay?

  • 10:17

    We have returned back everything.

  • 10:19

    So what's the culprit here?

  • 10:21

    What's the culprit?

  • 10:24

    So if I can show you the source, search by handle.php, and I'm going to show you the

  • 10:36

    line, that one right there, "collection find array, search for screen name equals something."

  • 10:46

    Now remember what I said, if you use square brackets for your query parameters those things

  • 10:51

    will be in ‑‑ that will be translated into an associative array.

  • 10:56

    What this will do will be the associated array will be screen name, arrow and the value will

  • 11:01

    be in an array, an associative ray format.

  • 11:05

    Not equal to as the operator and what did I use?

  • 11:09

    I think I used CBS News.

  • 11:12

    Okay?

  • 11:14

    Now I'm going to show you an example of JavaScript injection.

  • 11:17

    Okay?

  • 11:19

    Search "hack me.php."

  • 11:20

    Very, really plain looking box here.

  • 11:30

    What you can't do ‑‑ I didn't give any directions on how to use this, but what we

  • 11:35

    can do is this.

  • 11:37

    We can actually use JavaScript functions.

  • 11:40

    We will type in a few JavaScript functions.

  • 11:43

    Function.

  • 11:44

    Okay.

  • 11:46

    Now let's say I want to return all the news items from, let's say NBC News.

  • 11:51

    So we return this.screen name equals, equals and the string is going to be NBC News.

  • 12:03

    Okay?

  • 12:05

    Semicolon, close the statement, close the function and here we go.

  • 12:11

    Return.

  • 12:12

    Okay.

  • 12:13

    This is what it's going to do.

  • 12:14

    It will return all the news items that are from CBS News.

  • 12:19

    But this is using JavaScript.

  • 12:21

    Let's do one more.

  • 12:22

    Let's do one more, which is pretty nice which is going to be function.

  • 12:28

    Okay.

  • 12:30

    Let's see if we get everything.

  • 12:31

    Can we also do other mangling using JavaScript as well too?

  • 12:36

    Sure!

  • 12:37

    Why not?

  • 12:38

    How about this one, this.

  • 12:42

    Okay.

  • 12:43

    Return this.text.we can do a regular expression matching.

  • 12:49

    Okay?

  • 12:50

    What we are going to search for is Apple.

  • 12:55

    What this is going to do ‑‑ it's going to search for all the news items.

  • 13:01

    All 4,000 plus records.

  • 13:04

    Anything that has the word "apple" in them.

  • 13:07

    Okay?

  • 13:08

    Let's do some even more crazier things.

  • 13:09

    We can also do this, function while one print more.

  • 13:19

    Actually, I will put this in ‑‑ what this is going to do ‑‑ oops.

  • 13:30

    Did I close?

  • 13:32

    Nope.

  • 13:33

    I'm missing one more.

  • 13:35

    All right.

  • 13:38

    Going.

  • 13:39

    It's going.

  • 13:42

    I'm going to stop this.

  • 13:43

    You don't need this anymore.

  • 13:46

    But what I can show you is this.

  • 13:48

    If I SSH into the box, okay, probably going to get a password error.

  • 14:00

    Oh, I didn't.

  • 14:03

    Okay.

  • 14:05

    CD/var/log.

  • 14:06

    CDmongo db.

  • 14:08

    See what did in Mongo in logs and more Mongo db.log.

  • 14:19

    Oh, I don't like that.

  • 14:23

    How about this one, how about tail.

  • 14:29

    That was from ‑‑ you know, this is one result of using ‑‑ well, what you can

  • 14:34

    do with, well ‑‑ if your query is based on ‑‑ in your injection is a JavaScript

  • 14:40

    function.

  • 14:41

    Now, I only have 20 minutes for this whole talk.

  • 14:45

    What if you do this instead of PHP, if you use something like node, JS and express.

  • 14:52

    Okay?

  • 14:53

    Now, let's go back to the schema attacks.

  • 14:57

    How about this one.

  • 14:58

    I like this.

  • 14:59

    I've got to show you this.

  • 15:01

    So right now the server is at 19%.

  • 15:05

    But what if ‑‑ what if ‑‑ if I run the script that I created using Ruby, okay,

  • 15:12

    one of the nice byproducts, okay ‑‑ one of the nice byproducts of all of this, of

  • 15:22

    schema attack, you know, of this whole dynamic model, okay, what it's going to do, I'm going

  • 15:28

    to open up a word list of ‑‑ a Word list file, okay?

  • 15:33

    And it's going to create a brand new database for each and every word in this file.

  • 15:42

    One nice byproduct is you can exhaust the system resources on the server take up 100%

  • 15:47

    of the space.

  • 15:48

    Okay?

  • 15:49

    So if you take a look, now ‑‑ oops.

  • 15:54

    Not yet.

  • 15:55

    Okay.

  • 15:56

    We'll let this thing run.

  • 15:59

    Let this thing run.

  • 16:01

    Okay?

  • 16:02

    All right.

  • 16:04

    Heterogenous problems.

  • 16:05

    Now, how many NoSQL databases there are?

  • 16:11

    Too many to name.

  • 16:15

    Different database systems, different NoSQL database systems and you are also dealing

  • 16:18

    with different sets of term non, for example, Mongo, the whole idea of a table is a collection

  • 16:26

    and the whole idea of a record is a document.

  • 16:30

    It's completely different than Cassandra and Redis is just key value pairs and how about

  • 16:35

    the results?

  • 16:36

    I know different systems like, for example, CouchDB, they support different sets of outputs

  • 16:40

    as well.

  • 16:41

    Outputs that you can use JSON and binary JSON.

  • 16:46

    What does it have to do with anything security?

  • 16:49

    This infers this problem known as complexity.

  • 16:53

    Now, in order to really understand the problem of NoSQL, you need to each and every documentation.

  • 17:01

    Different systems, different features, different inputs and different outputs.

  • 17:06

    Even MongoDB, some vendor specific items, MongoDB, Mongo DB, is tied to all the different

  • 17:12

    interfaces.

  • 17:14

    You can take a look at some really cool start‑up lab data and this local collection, okay?

  • 17:23

    CouchDB, HTTP is actually opened by default.

  • 17:27

    All right.

  • 17:29

    So how do you actually protect yourself from ‑‑ so what does this all mean?

  • 17:34

    How do you secure the NoSQL databases.

  • 17:42

    It relies on the full perimeter security.

  • 17:45

    It's really, really important.

  • 17:49

    Okay?

  • 17:50

    Configuration, if you want to make NoSQL databases work right, configuration is very important.

  • 17:58

    You can't just take it out of box and sit back and use it right away.

  • 18:01

    The whole issue of validation becomes very important.

  • 18:04

    Not only are you validating inputs now.

  • 18:06

    You have more things to validate in terms of inputs, including JavaScript functions.

  • 18:12

    Hey, for output, you also have to validate the binary JSON and JSON as well.

  • 18:18

    So validation becomes even more critical.

  • 18:22

    What does it all mean?

  • 18:23

    Look, back in the good old days, the only game in town were Oracle, my SQL and you can

  • 18:30

    build any applications using that thing now.

  • 18:32

    But now they are not the only games in town and you have systems such as Mongo, Redis,

  • 18:39

    Couch.

  • 18:40

    You've got to use the right database for the right job, for the right application.

  • 18:45

    Okay?

  • 18:46

    Yeah, so not only did you ‑‑ okay is so you can't just assume that SQL injection

  • 18:51

    has gone away.

  • 18:52

    In fact, there are many, many more opportunities depending on what database system that you

  • 18:58

    choose.

  • 18:59

    But the thing that really, really bugged the living hell out of me, of these things, right

  • 19:04

    now NoSQL databases are completely brand new but we have a problem right now with, A, we

  • 19:09

    have technologies completely deployed naively.

  • 19:12

    They are just out there.

  • 19:13

    Especially if you believe the hands of developers, okay, we will not get hit.

  • 19:18

    We will just put it out there.

  • 19:20

    No, that's not the way, how it works.

  • 19:22

    So now you have the technologies being deployed naively, and one last thing, a lot of people

  • 19:29

    use NoSQL databases so we can get away from the whole idea of a database administration.

  • 19:35

    Well, the DBA, death of a DBA had been greatly, greatly exaggerated because now, you have ‑‑

  • 19:43

    they have even more ‑‑ there's even more opportunities out there.

  • 19:46

    You just have to read the documentation and, you know, for what this database system would

  • 19:50

    support.

  • 19:52

    Okay?

  • 19:53

    So those are my points.

  • 19:55

    And that's all that I have.

  • 19:56

    Let's see if this thing actually just run.

  • 19:59

    Nope.

  • 20:00

    Still running.

  • 20:01

    Still running.

  • 20:02

    Still running.

  • 20:03

    I don't know what happened to it.

  • 20:06

    But what it will do, this thing will just exhaust 100% of the disk space on the server

  • 20:16

    that I have.

  • 20:17

    So that's all I've got.

  • 20:18

    Okay?

  • 20:19

    Thank you guys, so much.

  • 20:20

    Thanks a lot.

  • 20:21

    (Applause)

All

The example sentences of BYPRODUCTS in videos (15 in total of 17)

one cardinal number of preposition or subordinating conjunction the determiner nice adjective byproducts noun, plural , okay adjective ‑‑ proper noun, singular one cardinal number of preposition or subordinating conjunction the determiner nice adjective byproducts noun, plural of preposition or subordinating conjunction all determiner of preposition or subordinating conjunction this determiner , of preposition or subordinating conjunction
gas noun, singular or mass produced verb, past participle in preposition or subordinating conjunction this determiner process noun, singular or mass is verb, 3rd person singular present used verb, past participle as preposition or subordinating conjunction a determiner fuel noun, singular or mass whilst proper noun, singular other adjective byproducts noun, plural such adjective as preposition or subordinating conjunction
byproducts noun, plural ; now adverb , iron noun, singular or mass 3 cardinal number + noun, singular or mass can modal than preposition or subordinating conjunction be verb, base form reduced verb, past participle back adverb to to iron verb, base form 2 cardinal number + noun, singular or mass via preposition or subordinating conjunction hydrogen noun, singular or mass peroxide noun, singular or mass again adverb ,
that wh-determiner 's verb, 3rd person singular present right noun, singular or mass , in preposition or subordinating conjunction a determiner few adjective cases verb, 3rd person singular present the determiner juice noun, singular or mass was verb, past tense contamined proper noun, singular with preposition or subordinating conjunction some determiner byproducts noun, plural of preposition or subordinating conjunction its possessive pronoun manufacture verb, base form .
referred verb, past participle to to as preposition or subordinating conjunction a determiner job noun, singular or mass description noun, singular or mass and coordinating conjunction job noun, singular or mass specification noun, singular or mass respectively adverb , these determiner are verb, non-3rd person singular present two cardinal number common adjective byproducts noun, plural
some determiner is verb, 3rd person singular present blasted verb, past participle off preposition or subordinating conjunction into preposition or subordinating conjunction space noun, singular or mass , and coordinating conjunction some determiner of preposition or subordinating conjunction the determiner byproducts noun, plural of preposition or subordinating conjunction fusion noun, singular or mass pile noun, singular or mass up preposition or subordinating conjunction on preposition or subordinating conjunction its possessive pronoun surface noun, singular or mass .
universe noun, singular or mass are verb, non-3rd person singular present byproducts noun, plural of preposition or subordinating conjunction the determiner competition noun, singular or mass between preposition or subordinating conjunction the determiner two cardinal number types noun, plural of preposition or subordinating conjunction matter verb, base form he personal pronoun proposed verb, past tense that preposition or subordinating conjunction standard adjective
paste noun, singular or mass namely adverb what wh-pronoun happens verb, 3rd person singular present to to the determiner byproducts noun, plural after preposition or subordinating conjunction all determiner since preposition or subordinating conjunction we personal pronoun 're verb, non-3rd person singular present no adverb longer adverb using verb, gerund or present participle pure adjective hydrogen verb, base form we personal pronoun
also adverb wash noun, singular or mass the determiner precipitate noun, singular or mass with preposition or subordinating conjunction generous adjective amounts noun, plural of preposition or subordinating conjunction water noun, singular or mass to to wash verb, base form out preposition or subordinating conjunction the determiner byproducts noun, plural and coordinating conjunction impurities noun, plural .
the determiner truly adverb green adjective energy noun, singular or mass is verb, 3rd person singular present that preposition or subordinating conjunction which wh-determiner produces verb, 3rd person singular present little adjective in preposition or subordinating conjunction the determiner way noun, singular or mass of preposition or subordinating conjunction byproducts noun, plural , and coordinating conjunction that preposition or subordinating conjunction accounts noun, plural
thing noun, singular or mass for preposition or subordinating conjunction us personal pronoun to to know verb, base form is verb, 3rd person singular present that determiner fermentation noun, singular or mass creates verb, 3rd person singular present byproducts noun, plural that wh-determiner can modal be verb, base form of preposition or subordinating conjunction great adjective interest noun, singular or mass
in preposition or subordinating conjunction a determiner slightly adverb different adjective way noun, singular or mass , and coordinating conjunction produce verb, base form their possessive pronoun own adjective byproducts noun, plural with preposition or subordinating conjunction their possessive pronoun own adjective ratios noun, plural of preposition or subordinating conjunction carbon noun, singular or mass .
that preposition or subordinating conjunction the determiner bacteria noun, plural will modal then adverb break verb, base form down adverb and coordinating conjunction provide verb, base form byproducts noun, plural such adjective as preposition or subordinating conjunction vitamins noun, plural and coordinating conjunction even adverb be verb, base form important adjective
this determiner is verb, 3rd person singular present a determiner condition noun, singular or mass where wh-adverb you personal pronoun get verb, non-3rd person singular present a determiner breakdown noun, singular or mass of preposition or subordinating conjunction the determiner muscles noun, plural that wh-determiner sends verb, 3rd person singular present byproducts noun, plural to to the determiner
byproducts noun, plural that wh-determiner are verb, non-3rd person singular present being verb, gerund or present participle used verb, past participle to to make verb, base form color noun, singular or mass and coordinating conjunction eggs noun, plural are verb, non-3rd person singular present actually adverb pretty adverb easy adjective to to get verb, base form .

Use "byproducts" in a sentence | "byproducts" example sentences

How to use "byproducts" in a sentence?

  • Biologically inspired materials could revolutionize materials science. People looking at spider silk and abalone shells are looking for new ways to make materials better, cheaper, and with less toxic byproducts.
    -Janine Benyus-

Definition and meaning of BYPRODUCTS

What does "byproducts mean?"

/ˈbīˌprädəkt/

noun
incidental or secondary product made in manufacture or synthesis of something else.
other
A waste product made from making something else.