00:00:00.000 --> 00:00:05.873 Goods morning everyone. Thanks for being here my name is 00:00:05.873 --> 00:00:11.745 Christopher Domes, I work for this company called the Battelle 00:00:11.745 --> 00:00:17.618 Memorial Institute -- what's so ever if are you really 00:00:17.618 --> 00:00:24.658 interesting in a practical talk this is not a right place for 00:00:24.658 --> 00:00:31.131 you. This is going to be really interesting and see some 00:00:31.131 --> 00:00:37.604 interesting stuff. What I want to talk to you is reverse 00:00:37.604 --> 00:00:43.477 engineering. I take software apart and figure out how it 00:00:43.477 --> 00:00:49.950 works but for whatever reason I spend a tremendous amount of 00:00:49.950 --> 00:00:57.591 time trying to figure out how I can make my life more difficult. 00:00:57.591 --> 00:01:04.064 So there is a couple basic ways people normally approach that 00:01:04.064 --> 00:01:09.336 problem. Encrypt -- tool to people to anterior reverse 00:01:09.336 --> 00:01:15.809 engineering. There is a theme in all the approaches. You're just 00:01:15.809 --> 00:01:21.682 trying to make things for difficult. So I was thinking 00:01:21.682 --> 00:01:26.954 around. Reverse engineering. Techic and the idea behind this 00:01:26.954 --> 00:01:34.594 for the most part. We are going to look at the individual pieces 00:01:34.594 --> 00:01:41.068 inside that program so. Using the tool like -- unknown file. 00:01:41.068 --> 00:01:48.108 We can figure out it out. Take it apart. So experience reverse 00:01:48.108 --> 00:01:54.581 engineer could take exactly what this is doing. Tell what is 00:01:54.581 --> 00:02:01.054 doing without almost no time at all. So starting out imlooking 00:02:01.054 --> 00:02:08.095 at the no maddic setters is moving 0. Is initially a local 00:02:08.095 --> 00:02:14.568 variable. Pushing something out of the stack as an argument and 00:02:14.568 --> 00:02:21.608 calling a function to -- remove that. It adds 1. Then compare 00:02:21.608 --> 00:02:29.249 the local variable to 100 and if it islesser or equals is going 00:02:29.249 --> 00:02:37.491 to jump out. But a few months ago I was reading this paper I 00:02:37.491 --> 00:02:42.195 found really interesting. Is called move stirring complete. 00:02:42.195 --> 00:02:48.668 If you are not familiar with the prove instruction. Moves data 00:02:48.668 --> 00:02:55.142 from unlocation to another. Any code you write in any language 00:02:55.142 --> 00:03:02.182 would be written as a set and absolutely nothing else and when 00:03:02.182 --> 00:03:09.222 you think about everything you do in the program is hard to 00:03:09.222 --> 00:03:17.464 believe. When you think that are you doing a -- all we need to 00:03:17.464 --> 00:03:23.937 impliment all of that stuff is just a bunch of move 00:03:23.937 --> 00:03:30.977 instructions. As I thought about that more and more that would be 00:03:30.977 --> 00:03:36.850 really, really hard. Because we would go from something like 00:03:36.850 --> 00:03:43.323 this where we have all the instructions that tells was what 00:03:43.323 --> 00:03:51.565 is going on on the program. All of the sudden all of the queues 00:03:51.565 --> 00:03:59.206 we use have been removed are the program. We have nothing to go 00:03:59.206 --> 00:04:04.478 off. Every instruction likes like every other instruction. It 00:04:04.478 --> 00:04:10.951 is really hard reverse engineer -- and at the beginning of 00:04:10.951 --> 00:04:18.592 DEFCON on Thursday. I release a move on the C compiler. C source 00:04:18.592 --> 00:04:24.464 code and translate only move instruction. C compiler every. I 00:04:24.464 --> 00:04:31.505 don't think anybody is every want -- before. But is it turns 00:04:31.505 --> 00:04:39.146 out to be neat. It turns program into moves as of indication tech 00:04:39.146 --> 00:04:45.619 nick. So for example -- I got this really little simple 00:04:45.619 --> 00:04:52.092 program that prints out prime numbers and I compile this with 00:04:52.092 --> 00:04:57.964 a tradition compiler BCC and look at the instructions that 00:04:57.964 --> 00:05:05.605 gives me that's great be but if you look at this instruction it 00:05:05.605 --> 00:05:13.246 takes no time at all to -- engineer to pick this up and 00:05:13.246 --> 00:05:20.887 understand what is happening. On the other hand if we use the -- 00:05:20.887 --> 00:05:24.991 thousands of uncondition movering instructions. But the 00:05:24.991 --> 00:05:33.233 cool part is if we run this it just calculated -- but that is 00:05:33.233 --> 00:05:39.706 nightmare to try to reverse engineer -- get hub page. It 00:05:39.706 --> 00:05:46.746 will include. So what the check -- compiling the thing is going 00:05:46.746 --> 00:05:54.387 to dump out the move. You'll see that with just a couple million 00:05:54.387 --> 00:06:02.629 -- so this is not fun to work with as a reverse engineer. But 00:06:02.629 --> 00:06:10.270 is really need to think about that just by moving data to one 00:06:10.270 --> 00:06:16.142 place to another we can really complex computation. So assort 00:06:16.142 --> 00:06:22.015 met this as a thought experience in anterior reverse engineering. 00:06:22.015 --> 00:06:29.055 So finally finish running that and it will run our AES and 00:06:29.055 --> 00:06:35.528 encrypt data using only move instruction but we can make it 00:06:35.528 --> 00:06:42.569 more complicated I rote a little nibbles came we link that. We 00:06:42.569 --> 00:06:49.609 can play video games now with instruction. We can take it a 00:06:49.609 --> 00:06:57.250 step further -- so since I could do that I decided what's the 00:06:57.250 --> 00:07:03.723 illustration of flooding point -- and matrix trance form and I 00:07:03.723 --> 00:07:11.965 could compile that with the moth skater. So we have a little 3 D 00:07:11.965 --> 00:07:18.438 program here. Written with on move instruction now we can do 00:07:18.438 --> 00:07:26.079 incredible complicated 3 D. And we I think took as far as I 00:07:26.079 --> 00:07:32.552 could possible conceive. So I got a program written in only 00:07:32.552 --> 00:07:39.592 move instruction. So that's a couple -- [ APPLAUSE ] >> So 00:07:39.592 --> 00:07:47.233 this is a couple million lines we are not going to sit around 00:07:47.233 --> 00:07:54.274 and wait for this. Finish dumping. So I thought this was a 00:07:54.274 --> 00:08:01.314 cool engineer. I'm at get hub page and see move only reverse 00:08:01.314 --> 00:08:08.955 engineering for yourself. But after this I -- how an ex -- and 00:08:08.955 --> 00:08:15.428 open it up and all I saw were hundreds of thousands 00:08:15.428 --> 00:08:20.700 unconditional data transfer. I'll go find something else to 00:08:20.700 --> 00:08:28.341 do. I reverse engineer because I think is fun and this does not 00:08:28.341 --> 00:08:36.583 look like fun to me but I had a big realization at that moment 00:08:36.583 --> 00:08:42.455 from an anti reverse engineering perspective a code doesn't have 00:08:42.455 --> 00:08:51.264 to be hard to reverse engineer. All it has to to be is none of 00:08:51.264 --> 00:08:58.905 the things we don't need -- all we need is to make reverse 00:08:58.905 --> 00:09:05.378 engineer give up and that's not nessessary as making hard to 00:09:05.378 --> 00:09:13.019 reverse. So I started to think how else could we make a reverse 00:09:13.019 --> 00:09:20.660 quick. If we don't want to -- how can with stop them from 00:09:20.660 --> 00:09:26.533 looking at it in the first place. I thought psychology 00:09:26.533 --> 00:09:33.573 warfare -- and our code. So I started thinking how could we 00:09:33.573 --> 00:09:40.046 accomplish that. It seemed clear we needed some one to influence 00:09:40.046 --> 00:09:45.919 them. We needed a way to influence the reverse engineer 00:09:45.919 --> 00:09:53.560 through our code. I need to have that binary. So it seemed clear 00:09:53.560 --> 00:10:00.033 if I wanted any binary to influence them to send that 00:10:00.033 --> 00:10:07.674 message. So there is an easy way. We is just embed a string 00:10:07.674 --> 00:10:14.714 in our program. Like stop looking at my code. Or -- die 00:10:14.714 --> 00:10:21.187 seccing our program you'll see that string. But that's not a 00:10:21.187 --> 00:10:28.228 good technique. I'm a reverse engineer if I put a string in 00:10:28.228 --> 00:10:35.268 their binary saying stop looking -- they'll laugh at that. And a 00:10:35.268 --> 00:10:41.741 lot of modern programs are started to look at entry -- 00:10:41.741 --> 00:10:47.013 distribution -- hopper and they have entry visuallation inside 00:10:47.013 --> 00:10:56.422 of hop per so I thought if I ran my message -- high program I can 00:10:56.422 --> 00:11:03.463 send the reverse engineer of my program. But so it works. You 00:11:03.463 --> 00:11:09.335 can do this. But again not the most affected technique, 00:11:09.335 --> 00:11:16.976 somebody is going to see this and move on. And still not going 00:11:16.976 --> 00:11:22.849 to really accomplish what we want. All of these horrible 00:11:22.849 --> 00:11:30.490 decision. At the end of the day nobody is going to see the 00:11:30.490 --> 00:11:38.731 message. If we really want to be able to see the message. This is 00:11:38.731 --> 00:11:44.003 idea pro. Reverse everything near, any professional is going 00:11:44.003 --> 00:11:50.476 to be using IDoe pro. To reverse engineering for sending message. 00:11:50.476 --> 00:11:56.950 IDoe has a more powerful capable. So the idea of control 00:11:56.950 --> 00:12:03.990 graph is something like this. We have basic blocks that do simple 00:12:03.990 --> 00:12:11.631 things. Is going to go down one path if it decided that thing 00:12:11.631 --> 00:12:19.272 was true or different path if it decided that thing was false. So 00:12:19.272 --> 00:12:26.913 the nice these about this these flow graphs I can tell at the 00:12:26.913 --> 00:12:33.953 high level when this program is going to be doing. That's the 00:12:33.953 --> 00:12:41.594 loop happening inside of the code. So at the end of the day 00:12:41.594 --> 00:12:48.635 looking at the control flow graph to quickly get an add of 00:12:48.635 --> 00:12:53.906 what's inside. So almost ever major static reverse engineering 00:12:53.906 --> 00:13:00.380 is going to have -- so the hopper reverse engineer has 00:13:00.380 --> 00:13:06.853 control flow graphs. This is the thing to use for reverse 00:13:06.853 --> 00:13:12.725 engineering. So for this presenation we are going look at 00:13:12.725 --> 00:13:22.135 IDoe. So reverse -- so when is 3 a.m. and you are looking at a -- 00:13:22.135 --> 00:13:29.175 with it. And if you stair at these control flow graphs long 00:13:29.175 --> 00:13:35.648 enough they start to look like things. Very simple control flow 00:13:35.648 --> 00:13:42.121 graph in IDo but a lot of professional are dwellig with 00:13:42.121 --> 00:13:47.994 very complicated control flow graph and when you're dozing off 00:13:47.994 --> 00:13:56.235 at 3 a.m. once in a while you'll start to see things inside of 00:13:56.235 --> 00:14:02.108 these imagines. Maybe we can send the reverse engineer a 00:14:02.108 --> 00:14:06.813 message through control flow graph because that'some they 00:14:06.813 --> 00:14:15.054 cannot look away from. So if we mend -- what we want. So maybe 00:14:15.054 --> 00:14:22.095 we can draw pictures send them text through the control of our 00:14:22.095 --> 00:14:29.135 program but in order to do that we need to understand exactly 00:14:29.135 --> 00:14:36.175 how our reverse engineering -- to figure out how it works. So 00:14:36.175 --> 00:14:44.417 is a little bit -- for long enough. So my first idea for how 00:14:44.417 --> 00:14:50.890 we can draw picture or send messages was pretty simple. To 00:14:50.890 --> 00:14:58.531 know -- flow graph. Or fan jumps will do that. Is not really 00:14:58.531 --> 00:15:06.172 clear how the program got though this jump here. So we got all 00:15:06.172 --> 00:15:12.645 these jumped that didn't seem to come from any where. It 00:15:12.645 --> 00:15:18.518 basically -- horizontal lines using technique -- so a whole 00:15:18.518 --> 00:15:25.558 bunch of knobs that don't do anything converts into a nice so 00:15:25.558 --> 00:15:33.199 lid line. I can make an sketch in IDoe. So that seems easy 00:15:33.199 --> 00:15:40.840 enough. So heres I how thought you would draw a scare. We would 00:15:40.840 --> 00:15:48.481 have a bunch of jump and we need that horizontal line to connect 00:15:48.481 --> 00:15:56.722 in both sides of the scare. And then jump to right. So the next 00:15:56.722 --> 00:16:04.363 slide is going to be a whole bunch of knobs to don't do 00:16:04.363 --> 00:16:10.837 anything. And whole bunch of knob to create a vertical line 00:16:10.837 --> 00:16:18.477 we going to tie at the bottom. Same thing fort the bottom easy 00:16:18.477 --> 00:16:26.118 enough. Not quite to a scare just yet. But this tells us a 00:16:26.118 --> 00:16:33.159 little bit abhow IDo is trying to lay out these control graphs. 00:16:33.159 --> 00:16:41.400 So line up a bunch of -- try together line the blocks in a 00:16:41.400 --> 00:16:49.642 given road so we need IDoe to not do that so instead of using 00:16:49.642 --> 00:16:57.283 knobs for any vertical line we can use this jump plus two. And 00:16:57.283 --> 00:17:04.323 what that is going to do is break those vertical lines so 00:17:04.323 --> 00:17:12.565 when we try to draw this again, so at least got the bottom line 00:17:12.565 --> 00:17:20.206 to move to the bottom here and then a little bit closer to 00:17:20.206 --> 00:17:26.679 being about sketch inside of IDoe. But there is still an 00:17:26.679 --> 00:17:34.320 issue. I still got my verticals line right next to each other. I 00:17:34.320 --> 00:17:41.360 want them in opposite lines of the scare. Is squeezing all of 00:17:41.360 --> 00:17:47.233 our control lean -- vertical lines to separate from each 00:17:47.233 --> 00:17:54.874 other. So that's sort of the depth of my first idea. But we 00:17:54.874 --> 00:18:01.914 learn allot along the way. How row and columns and domain how 00:18:01.914 --> 00:18:10.156 the rows are arrange but Idoe is going to have control of all of 00:18:10.156 --> 00:18:18.965 those columns so we need a way to fight back. -- need -- I need 00:18:18.965 --> 00:18:26.005 to have some way to stop IDoe from changing that stuff around 00:18:26.005 --> 00:18:34.814 so my idea was to force IDoe to keep those notes in place. So we 00:18:34.814 --> 00:18:42.455 look at what a basic node -- is bunch of instruction that branch 00:18:42.455 --> 00:18:51.263 to one location or another. So I said what if we have a bunch of 00:18:51.263 --> 00:18:58.904 those. Is going to trying to be pulling the other nodes with it 00:18:58.904 --> 00:19:06.545 so this will force IDo to keep everything in place. So it will 00:19:06.545 --> 00:19:13.019 look something like this. All we have a conditional jump. Like 00:19:13.019 --> 00:19:21.260 this place or is going to fall the node below. So we look at 00:19:21.260 --> 00:19:28.300 what that looks like in a control flow graph view. This is 00:19:28.300 --> 00:19:35.341 what we enup. Not that bad. Define structure so we can touch 00:19:35.341 --> 00:19:42.982 this up a little bit. First -- giant block here. We can cut 00:19:42.982 --> 00:19:50.623 that block by the middle. We need to create a whole bunch of 00:19:50.623 --> 00:19:58.864 these by hand. -- this is just all the code we need to generate 00:19:58.864 --> 00:20:07.106 one of these matrix or lay outs for us. That lets us create a 00:20:07.106 --> 00:20:14.146 whole bunch of these nodes very quickly to begin looking at more 00:20:14.146 --> 00:20:22.388 complex pattern. But I got kind of an issue here. I wan to draw 00:20:22.388 --> 00:20:29.428 something but is going to be hard to draw with lopsided. I 00:20:29.428 --> 00:20:36.469 really wanted a perfectly grid. So we need to change a little 00:20:36.469 --> 00:20:45.277 bit. Is a way to draw with these nodes by turning pix -- so I 00:20:45.277 --> 00:20:52.318 thought something like this. If I wanted to have this pix sell 00:20:52.318 --> 00:21:01.127 off I will remove this nodes. So first we are going to try to get 00:21:01.127 --> 00:21:08.767 this into a nonram bow shape. We take an assemble a little bit. 00:21:08.767 --> 00:21:17.009 It looks like a mess that -- there is 4 nodes there that are 00:21:17.009 --> 00:21:24.049 per if he cannily arrange there. Perfectly -- and so back to 00:21:24.049 --> 00:21:30.523 preprocesser to again rate a whole bunch of these. We are 00:21:30.523 --> 00:21:36.395 getting almost to perfectly well define structure that we have 00:21:36.395 --> 00:21:43.435 deep control over and maybe we can started using this to send 00:21:43.435 --> 00:21:51.076 messagings. We are going to cut that big node in half. We got 00:21:51.076 --> 00:21:58.717 some -- node escaping I decided I can push those back into the 00:21:58.717 --> 00:22:07.526 rest of the imagine by having a bunch or -- we have a reck tang 00:22:07.526 --> 00:22:15.167 here not a scare. And to each individual node and make this a 00:22:15.167 --> 00:22:22.208 little bit taller. Once again we have some nodes trying escape at 00:22:22.208 --> 00:22:30.449 once. Turns out that some of the assemble we are using to do this 00:22:30.449 --> 00:22:36.922 using 2 different forms depending on how far have you to 00:22:36.922 --> 00:22:43.963 jump. These nodes have to jump higher than the other ones -- 00:22:43.963 --> 00:22:50.436 same jump instruction for every node and we finally have the 00:22:50.436 --> 00:22:56.308 perfect grid that we can actually start try together draw 00:22:56.308 --> 00:23:03.349 on. So we can finally start drawing on them. I try to 00:23:03.349 --> 00:23:09.822 remauve a singling node from there. IDoe tries to squeeze -- 00:23:09.822 --> 00:23:17.463 that was the depth of a very long idea. But maybe we can 00:23:17.463 --> 00:23:25.104 resue reck it. Maybe we can leave all the nodes in place and 00:23:25.104 --> 00:23:35.114 fill a node with code if we want it to be on or empty if we want 00:23:35.114 --> 00:23:42.755 it off. Sosome like this, the ones that are on this have bunch 00:23:42.755 --> 00:23:51.563 no app inside of them -- and in order to fill up this node. So 00:23:51.563 --> 00:24:00.372 no when we try that we bet if affect we wan. We can see this 00:24:00.372 --> 00:24:08.013 looks like the pixel that look like it has been turn off. So 00:24:08.013 --> 00:24:15.654 this was the first thing I ever drew circle. There is a few 00:24:15.654 --> 00:24:22.127 things I wanted to touch up. Because this the first function 00:24:22.127 --> 00:24:28.600 in the program and IDoe is adding a whole bunch of 00:24:28.600 --> 00:24:35.641 additional information. We get rid of that. Dumb my code to get 00:24:35.641 --> 00:24:43.882 rid of those. If I go back a slide you notice that these look 00:24:43.882 --> 00:24:50.356 back and these look kind of white. The nodes that we 00:24:50.356 --> 00:24:56.228 supposed to -- well they're still use two lines instruction 00:24:56.228 --> 00:25:04.470 in a label. What you wan to do is reduce the impact of those 00:25:04.470 --> 00:25:11.510 two line and reduce the imfact of those two lines by increasing 00:25:11.510 --> 00:25:18.550 the height of the over all node. So those two lines doesn't 00:25:18.550 --> 00:25:25.591 matter too much. But we also need the increase the the -- 00:25:25.591 --> 00:25:32.064 from single -- that I long instructions like that which is 00:25:32.064 --> 00:25:39.104 really convenient -- [ APPLAUSE ] >> So we have introduce new 00:25:39.104 --> 00:25:46.145 issues. So every time these nodes try to escape we need the 00:25:46.145 --> 00:25:53.185 put them back in place. Is trying to escape because we made 00:25:53.185 --> 00:26:00.826 it really wide. Compare to these really wide nodes all we have to 00:26:00.826 --> 00:26:08.467 do to fix that is add those wide instructions. So after we do 00:26:08.467 --> 00:26:16.108 that we have this nice perfect grid with a circle on in the 00:26:16.108 --> 00:26:24.349 middle. There is an issue if we have all the pixel ins the row 00:26:24.349 --> 00:26:31.990 turn off the entire imagine will colaps on its. I did not like 00:26:31.990 --> 00:26:40.232 the idea of having knobs -- so I added a junk code generates that 00:26:40.232 --> 00:26:47.873 will add dumb instruction so they can run. So I had to draw 00:26:47.873 --> 00:26:54.913 that stupid circle by hand so I created a preprocesser. And in 00:26:54.913 --> 00:27:03.155 order to generate the code for us and we can take a bit map 00:27:03.155 --> 00:27:10.195 imagine like the smiley face and create control flow map with a 00:27:10.195 --> 00:27:17.836 smiley face [ APPLAUSE ] >> So we are getting a little further. 00:27:17.836 --> 00:27:26.645 So there is a few things I did not like about this. So I don 00:27:26.645 --> 00:27:35.454 like the new line at the -- blue line at the bottom. All the work 00:27:35.454 --> 00:27:42.494 I really went through to tie all these things together was not 00:27:42.494 --> 00:27:50.135 really necessary. As long as you tie the top and bottom like that 00:27:50.135 --> 00:27:57.175 they'll stay in place. Well before we had this node tied to 00:27:57.175 --> 00:28:03.649 this node we no longer need that. We have this node 00:28:03.649 --> 00:28:10.122 following directly. So that form -- tool change I'll show exactly 00:28:10.122 --> 00:28:17.162 how I can use this. Coming up but what this does generate 00:28:17.162 --> 00:28:21.867 assemble instruction to form imagines and they control 00:28:21.867 --> 00:28:30.108 flowchart. So what I have here is a bit map imagine that I want 00:28:30.108 --> 00:28:36.582 to render. Is really small is just a skull. Manipulate the 00:28:36.582 --> 00:28:44.823 control flow mark so what we want to do is run me to turn 00:28:44.823 --> 00:28:52.464 that imagine into some assembly code. And all is going to do is 00:28:52.464 --> 00:28:58.337 turn that imagine into a bunch of preprocesser directives. So 00:28:58.337 --> 00:29:05.377 we are going to go head and make executable who's control flow 00:29:05.377 --> 00:29:11.249 graph will mimic that imagine. And it will generate some 00:29:11.249 --> 00:29:16.521 functional executable to do whatever you want for these 00:29:16.521 --> 00:29:22.995 purposes and decided to make them render so they actually run 00:29:22.995 --> 00:29:29.468 they're not fake executable but if a reverse engineer wanted to 00:29:29.468 --> 00:29:35.941 'approach this and figure out what it did they're going to 00:29:35.941 --> 00:29:43.582 have to go to their ado and pull this executable and examine the 00:29:43.582 --> 00:29:50.622 control flow graph and when they do that they then see the 00:29:50.622 --> 00:29:57.663 imagine that was created. [ APPLAUSE ] >> Thank you. What an 00:29:57.663 --> 00:30:05.303 optimal time. How is he doing? I think you all know better about 00:30:05.303 --> 00:30:11.176 our little tradition new speaker. Welcome to all the new 00:30:11.176 --> 00:30:18.216 attendees to DEFCON this year. [ APPLAUSE ] >> Good job. >> 00:30:18.216 --> 00:30:25.857 Thanks guys. All right. Give a second to get back on track now. 00:30:25.857 --> 00:30:33.498 So I'm trying to think of where else we can take this thing. 00:30:33.498 --> 00:30:39.971 What can we do with these imagines. We're trying to let 00:30:39.971 --> 00:30:47.612 the reverse engineer know what we think of their work so we can 00:30:47.612 --> 00:30:54.086 let them know that our code doesn't even do anything useful. 00:30:54.086 --> 00:31:01.126 Maybe this whole time we're just trolling them. Or we can let 00:31:01.126 --> 00:31:08.166 them know what we really think about and poking around that we 00:31:08.166 --> 00:31:14.639 work really, really hard and I don't like people poking around 00:31:14.639 --> 00:31:24.049 in the code that I work hard on. But -- the goal was not just to 00:31:24.049 --> 00:31:30.522 send them amusing picture. We wan them to stop poking -- 00:31:30.522 --> 00:31:36.394 control flow graph. Whatever message you embed inside of this 00:31:36.394 --> 00:31:42.868 program. So you can use this to their advantage. Crush their 00:31:42.868 --> 00:31:49.341 sole, abandon hope and not want to reverse engineer anymore. So 00:31:49.341 --> 00:31:57.582 what -- remind them this is not going to turn on in your favor. 00:31:57.582 --> 00:32:04.623 We can remind them -- to send them messages in our control 00:32:04.623 --> 00:32:10.495 flow graph, our program -- reverse engineer our program. No 00:32:10.495 --> 00:32:18.136 life in general and should quit all together. [ APPLAUSE ] >> So 00:32:18.136 --> 00:32:26.945 I was having fun with this I did not want to call it quits at 00:32:26.945 --> 00:32:34.586 this point. I realize we are not limbed to black and white. We 00:32:34.586 --> 00:32:40.458 can make them gray by adding more or fewer instructions. 00:32:40.458 --> 00:32:45.163 Really important opportunity and cyber security history. I 00:32:45.163 --> 00:32:52.804 decided to take the first as far as I know assemble self'. So 00:32:52.804 --> 00:32:59.277 that is back when I had hair. It is completely functional 00:32:59.277 --> 00:33:06.918 assemble code. So what I really like about the group I work with 00:33:06.918 --> 00:33:13.391 make something stupid like this and they'll have a hundred new 00:33:13.391 --> 00:33:19.865 ideas to use this. Piece of malware and call it the 00:33:19.865 --> 00:33:26.905 interview. And when you drop it into IDoe you'll find out where 00:33:26.905 --> 00:33:32.777 you are -- came from. There's north Korea. And another 00:33:32.777 --> 00:33:38.650 coworker recommend the -- UTC problem where you can stand 00:33:38.650 --> 00:33:45.690 hundreds of hours reversing but when you needed to do is zoom 00:33:45.690 --> 00:33:52.163 out and realize they were sending you on the wrong path. 00:33:52.163 --> 00:34:00.405 So that's a real QR code and it will take you some where. And 00:34:00.405 --> 00:34:08.046 you can check that out later. Onslide if you have a chance but 00:34:08.046 --> 00:34:15.086 that's one CPA problem. I felt like toward the DEFCON CTF they 00:34:15.086 --> 00:34:22.727 would not -- used to be complete without goat see so for DEFCON 00:34:22.727 --> 00:34:32.137 CTF I felt like it would be goat see so I was not going to show 00:34:32.137 --> 00:34:39.177 you. You're welcome. My favor rot of all. What could be the 00:34:39.177 --> 00:34:44.449 creepest malware of all time. Retrieve your personal imagine 00:34:44.449 --> 00:34:50.922 and then rewrite its code based on the imagines it was 00:34:50.922 --> 00:34:57.395 collecting. So this took a quite a bid of modification. Very 00:34:57.395 --> 00:35:03.868 different of what I wrote. Exactly that. So we have go 00:35:03.868 --> 00:35:09.140 ahead and hundred this malware, just sits there nothing 00:35:09.140 --> 00:35:15.013 important but I do have some vacationsphotos. Those are not 00:35:15.013 --> 00:35:23.822 my feet or my dog but if I was curious I would you say throw 00:35:23.822 --> 00:35:29.094 this into IDoe. After IDoe processes is really not 00:35:29.094 --> 00:35:34.366 interesting nothing in the control flow graph so I'll 00:35:34.366 --> 00:35:40.238 analyze that a little bit. I would not see anything 00:35:40.238 --> 00:35:47.278 interesting. I'm going to have to run this thing and see what 00:35:47.278 --> 00:35:54.319 is doing. I'm going to change my debugger here and run this 00:35:54.319 --> 00:36:01.359 program. So the program begins to run the first thing it does 00:36:01.359 --> 00:36:09.000 it trigger a software break. It wants you to see what is doing. 00:36:09.000 --> 00:36:16.041 So I'm going to follow this and any reversion engineer tool and 00:36:16.041 --> 00:36:23.081 pull up my reverse program. IDoe doesn't like to do this much 00:36:23.081 --> 00:36:30.121 when is program is running, to reverse over here. But those are 00:36:30.121 --> 00:36:38.363 my feet and if I keep running make is a fluke. No the malware 00:36:38.363 --> 00:36:46.004 is going to stop me again it has something new. What's it this 00:36:46.004 --> 00:36:54.245 time? That's my dog. My is my dog in the malware. I was a 00:36:54.245 --> 00:37:02.487 little worry to get this demo I hope for it to get those two 00:37:02.487 --> 00:37:10.128 picture I don't know what is going to go collect. So I feel 00:37:10.128 --> 00:37:17.168 like this impliment what we were after. Other ways to get the 00:37:17.168 --> 00:37:23.641 reverse engineer to stop looking. I think is neat to keep 00:37:23.641 --> 00:37:30.682 your mind open and is not to make things harder to reverse 00:37:30.682 --> 00:37:38.323 but over all is a really fun thing to thinker with. Is a 00:37:38.323 --> 00:37:45.363 total line of 15 lines and 128 lines preprocesser ma -- for 00:37:45.363 --> 00:37:53.605 this. I'm on -- if you are interesting in the -- get hub as 00:37:53.605 --> 00:37:58.877 of Thursday morning. XADC processer itself. Some proof of 00:37:58.877 --> 00:38:05.350 processer. But I would love to discus more with anybody that 00:38:05.350 --> 00:38:12.390 has ideas. I will thinker with this on the upcoming week. So 00:38:12.390 --> 00:38:19.430 you with follow me on twitter. If you want to discus further. 00:38:19.430 --> 00:38:27.672 Thanks very much. This was a fun project. [ APPLAUSE ] >> So if 00:38:27.672 --> 00:00:00.000 anyone has questions you can talk to me offline.