1 00:00:10,960 --> 00:00:11,440 I 2 00:00:11,440 --> 00:00:17,600 Guess so, I will there's still more seats up front if anybody wants to grab them rather than stand in the back or anything 3 00:00:26,060 --> 00:00:26,500 Oh 4 00:00:27,040 --> 00:00:31,620 Is this a good mic placement and everything I just tossed it on myself excellent 5 00:00:39,240 --> 00:00:44,420 All right, so I my name is Sean O'Toole and I'm going to be speaking to you about metamorphic viruses 6 00:00:45,120 --> 00:00:47,560 And I wanted to stress that I know 7 00:00:47,600 --> 00:00:53,300 this whole conference is educational purposes only but I must stress that this one is definitely because I 8 00:00:53,900 --> 00:00:58,760 Don't want to see anybody's grandmother not be able to access their email or something because I gave a speech 9 00:00:58,760 --> 00:01:04,400 You know you you guys are the computer guys of the your families, so you know if they have a problem 10 00:01:04,400 --> 00:01:05,460 You're gonna hear about it 11 00:01:10,380 --> 00:01:14,160 And so yeah, I mean my speech on that morphic viruses 12 00:01:14,160 --> 00:01:16,080 I'm going to start off with the eye 13 00:01:16,080 --> 00:01:17,460 going through like 14 00:01:17,460 --> 00:01:24,640 Some pseudo code on how the various modules work and then after that I'll talk about like some of the AV approaches to it 15 00:01:25,460 --> 00:01:33,360 and also why I'm the CD I wanted to mention I that I did have some misspellings, but you know 16 00:01:33,360 --> 00:01:38,020 It's a late-night presentation that I was putting together after a friend's birthday, so you know what happens 17 00:01:40,600 --> 00:01:46,420 So as we go on I just wanted to give you a couple of the definitions one from Peter's or who say I 18 00:01:46,420 --> 00:01:47,420 well-known 19 00:01:48,360 --> 00:01:56,380 Antivirus person down to like your virus people and it goes from body polymorphics where they swear they've always been around in simpler techniques 20 00:01:57,080 --> 00:02:00,560 down to the artist's extreme mutation, so 21 00:02:01,300 --> 00:02:03,280 We got that going now 22 00:02:03,280 --> 00:02:10,860 I'm going to give a brief description of all the various sections or the main sections that you'll see or are theorized 23 00:02:11,820 --> 00:02:15,960 the first one is the disassembler which I mainly usually 24 00:02:16,420 --> 00:02:19,000 Has some way of putting something into a structure 25 00:02:19,610 --> 00:02:21,920 Something a lot of reverse engineering tools and whatnot 26 00:02:22,540 --> 00:02:25,280 then the second is the deep her mutator which I 27 00:02:26,480 --> 00:02:31,440 Takes the code that's been shuffled and connected by jumps and puts it straight down to 28 00:02:31,440 --> 00:02:36,760 the straightest code eyes that the algorithm can put it back together with and 29 00:02:37,780 --> 00:02:41,460 I also the shrinker which takes op codes and I 30 00:02:42,500 --> 00:02:46,000 recombine or clusters of opcode and recombines them say like 31 00:02:46,420 --> 00:02:54,520 If you have a push ebx pop ecx it becomes a move ecx comma ebx type of thing so 32 00:02:54,520 --> 00:03:01,040 These two first or two and three are mainly the ones that get you back down to the skeleton of your virus 33 00:03:01,040 --> 00:03:06,080 That it can be expanded on later with it these ones the expanders 34 00:03:06,080 --> 00:03:10,200 I which will do the exactly the reverse of the shrinker and 35 00:03:11,040 --> 00:03:14,580 The permutator which shuffles the code links it with jumps and so forth 36 00:03:14,580 --> 00:03:16,400 and also we get down to the 37 00:03:16,400 --> 00:03:23,960 Reassembler the reassembler assembler which I places the virus back together fixes jumps and so forth and 38 00:03:24,920 --> 00:03:30,380 These six are the main ones that you'll see are here theorized like a shrinker is very rare 39 00:03:31,360 --> 00:03:35,020 Expander permutator those are ones are more used 40 00:03:35,740 --> 00:03:41,700 And here's just one that I want to go over really quick is when you're programming these viruses or looking at them 41 00:03:41,700 --> 00:03:45,280 You got to think in a I very software engineering type of 42 00:03:45,280 --> 00:03:50,020 Thinking towards it because you know you want to think in modules everything separate 43 00:03:50,020 --> 00:03:56,300 We just pass this information to this one, so you don't end up getting into this huge project that never finishes 44 00:03:59,220 --> 00:04:03,920 So we get down to the disassembler we have two choices one is I one day 45 00:04:03,920 --> 00:04:10,680 I haven't really passed across was heavily theorized to make a pseudo language so that you can change like 46 00:04:11,240 --> 00:04:15,220 Say if you want to go from elf to I x86 you can change? 47 00:04:15,280 --> 00:04:17,400 a few things in there through your 48 00:04:17,960 --> 00:04:20,920 pseudo language before you put it back down into 49 00:04:21,480 --> 00:04:26,080 The I assembly language and also we have reverse engineering tools 50 00:04:26,080 --> 00:04:29,560 Which I the zombie art is the main person that puts those together? 51 00:04:29,960 --> 00:04:37,100 The LD was an earlier version of the ade which has a linked list of structures and the structure is I? 52 00:04:37,700 --> 00:04:43,400 Actually inside with that module when you get it so you can look at kind of like the manual and that will tell you 53 00:04:43,400 --> 00:04:45,200 Basically, what's where you got to deal? 54 00:04:45,280 --> 00:04:47,280 With after you run it oh 55 00:04:47,820 --> 00:04:54,460 And also that one of the things about the disassembler is also that it's not always able to reverse engineer all 56 00:04:55,040 --> 00:04:59,660 Files it just has some so there's it's cuts out some of the selection project 57 00:05:01,080 --> 00:05:02,240 process and 58 00:05:02,240 --> 00:05:07,440 here's one from I the mental drills article practice on metamorphism that's a 59 00:05:07,440 --> 00:05:12,080 Little example of how you can put together your pseudo I language 60 00:05:12,920 --> 00:05:14,720 one is that you could I 61 00:05:15,280 --> 00:05:19,980 Will you have the opcode the instructions tell you of course which registers and whatnot? 62 00:05:20,500 --> 00:05:27,940 Lm which is label marker which tells you later if there's a label that points to that that may be jumped to and this is 63 00:05:27,940 --> 00:05:35,100 Very important for shrinkers and so forth because if you shrink an extraction instruction, and there's a label in between that cluster 64 00:05:35,740 --> 00:05:41,660 Then you've just basically screwed up the whole thing that is jumping to because you've added too much code into one area 65 00:05:43,120 --> 00:05:43,640 also 66 00:05:43,640 --> 00:05:43,740 so 67 00:05:43,740 --> 00:05:48,520 We have like the idea of how to deal with the opcode you can say that 68 00:05:49,180 --> 00:05:52,380 Move is to 40 if you're doing memory to register 69 00:05:52,980 --> 00:06:00,440 It's plus 2 so move high memory to register would become 42 and there's also a full list of I 70 00:06:00,440 --> 00:06:05,080 The idea of points to op codes like this in the same article 71 00:06:08,840 --> 00:06:13,040 So now we get down to the D permutator because I the other 72 00:06:13,640 --> 00:06:20,660 choice for the assembler can or disassembler can be found to I in its manual pages and the D 73 00:06:20,660 --> 00:06:22,740 Permutator as I said earlier just 74 00:06:23,760 --> 00:06:31,420 Deshuffles the code if you will and this can be put in I its own module or can be included in the disassembly process 75 00:06:32,340 --> 00:06:34,520 depending on which way you'd like to go and 76 00:06:36,060 --> 00:06:39,980 Here's like the pseudo code at the beginning you got the variables like 77 00:06:39,980 --> 00:06:43,260 You start out with the entry point? 78 00:06:43,640 --> 00:06:46,620 Of the eye which you're disassembling or D permutating 79 00:06:46,620 --> 00:06:55,600 You have a path marker which is your buffer for after your D permutating code a label which is 2d words one is the eye 80 00:06:56,480 --> 00:07:01,820 Old address of the code and one's the new address of the code which later on some of these won't have an old address 81 00:07:01,820 --> 00:07:05,480 Which will I see in this is very important for jump fixing? 82 00:07:06,100 --> 00:07:13,620 Later on as well as other things and they future jump label table which has labels that you don't want to deal with 83 00:07:13,640 --> 00:07:14,960 yet through the algorithm 84 00:07:16,060 --> 00:07:22,020 And you'll of course zero out the path markers, so you don't end up hitting it random my eye 85 00:07:22,020 --> 00:07:29,480 Op codes that are just somewhere something that wasn't that buffer so that you think that this could be a portion of what you're D 86 00:07:29,480 --> 00:07:33,080 permutating and I you translate the I 87 00:07:33,660 --> 00:07:34,320 current I 88 00:07:35,240 --> 00:07:37,220 instruction pointer into the ESI 89 00:07:39,540 --> 00:07:40,060 and 90 00:07:40,060 --> 00:07:43,620 Then I here's what you do for a jump if you have a jump? 91 00:07:43,640 --> 00:07:50,320 And you've already D permutated it of course you just jump it back to that and that's that's one of the things about this algorithm 92 00:07:50,320 --> 00:07:53,420 That makes you know that you cannot have the same 93 00:07:54,880 --> 00:08:02,660 D permutated that virus every time you may have a I jump from a couple generations back that the algorithm never really took out 94 00:08:03,480 --> 00:08:10,420 and then if you I have not D permutated yet you put in a no op unless it's just in case if it's being pointed to 95 00:08:11,200 --> 00:08:13,460 and then you just go on from where 96 00:08:13,640 --> 00:08:15,540 the jump leads you and 97 00:08:16,080 --> 00:08:19,820 Then you have the conditional jumps which I a lot of times 98 00:08:19,820 --> 00:08:25,820 They're just kept in there, and I they're putting the future label table and whatnot you can see everything here 99 00:08:28,180 --> 00:08:33,400 Call same as I conditional jumps returns just goes to the future label table 100 00:08:33,400 --> 00:08:39,760 So you move by one I branch up the or one leaf up the code tree and get back to it 101 00:08:41,980 --> 00:08:42,540 and 102 00:08:42,540 --> 00:08:43,560 Then here's a little 103 00:08:43,640 --> 00:08:46,500 Note I wanted to make sure that I we had on there 104 00:08:46,500 --> 00:08:53,260 Which is when getting a new EIP from the future label table we check if the labels stored here are already been D 105 00:08:53,260 --> 00:09:02,120 Permutated if they are then it we insert the corresponding labels at the at the label table and eliminate the entry and 106 00:09:02,120 --> 00:09:06,060 future label tables if not we get the I newly IP 107 00:09:06,660 --> 00:09:07,180 continue 108 00:09:09,500 --> 00:09:13,620 And also I just had like a little note here for if you're making it stand alone 109 00:09:13,640 --> 00:09:20,000 What not you're gonna have to do a lot more I list things if you're doing it stand alone because in two buffers? 110 00:09:20,140 --> 00:09:24,460 So that's one of the reasons. It's usually in the disassembler. It will take up less room 111 00:09:25,660 --> 00:09:31,520 and here's a little example here, and we see that I accept the triple X's are the I 112 00:09:32,060 --> 00:09:34,620 code they meet is meaningful and 113 00:09:35,140 --> 00:09:43,220 So the y codes are the ones that are unreachable so this is another thing that your deep permutator will help you do it 114 00:09:43,220 --> 00:09:44,860 It'll allow you to put in 115 00:09:45,660 --> 00:09:50,560 Worthless code that will never be reached so that it's just in there makes it look different 116 00:09:51,000 --> 00:09:55,340 We see this before beforehand. We got the conditional jump. We got some of the other jumps 117 00:09:56,880 --> 00:10:01,140 After it runs we got this no more at the wise to our useless instructions 118 00:10:01,960 --> 00:10:06,720 once you hit a jump links you straight to the where it that code was goes through there until 119 00:10:08,240 --> 00:10:12,500 You've hit it all and that's it's there and then we get to the shrinker 120 00:10:13,220 --> 00:10:13,740 which is I 121 00:10:14,500 --> 00:10:18,520 extremely rare to find and will reappear in our AV section and 122 00:10:20,100 --> 00:10:24,460 This is basically the like I saying the inverse of the expander and 123 00:10:26,200 --> 00:10:34,340 It's most I haven't run upon it, so that's why it's not and I I don't have any examples of it anywhere and so 124 00:10:34,340 --> 00:10:38,020 We have the pseudo code for that right here 125 00:10:38,020 --> 00:10:43,140 Which we can see is basically looking through and seeing if we can find code clusters and switches? 126 00:10:43,220 --> 00:10:50,560 you know back to their I most simple ones, which I I do it as if there's a list of five 127 00:10:51,900 --> 00:10:57,560 These conversions, but many times. It's just a whole function that just does one thing 128 00:11:00,780 --> 00:11:08,580 Then we get to the expander which I is the inverse of the shrinker, okay, and I basically 129 00:11:08,580 --> 00:11:13,140 That's usually a standalone thing and usually also those don't use a list 130 00:11:13,220 --> 00:11:18,880 Or anything to see what the conversions are mainly. They're just functions are already written out like the 131 00:11:20,300 --> 00:11:28,800 when 9x Ramones virus will have some of these I'd so that you can I take a reference point to see how they're done and 132 00:11:29,840 --> 00:11:34,280 Here's the pseudo code for that we have five is expandable I 133 00:11:35,120 --> 00:11:42,660 forgot to switch it to actual number rather than a boolean, but basically I that the expandable question is 134 00:11:43,220 --> 00:11:49,680 How many times can we or how can we expand it three op codes two op codes or just switch op codes and? 135 00:11:50,560 --> 00:11:55,160 It goes through and it says okay if we got this random number, and we got this we're going to do it 136 00:11:56,180 --> 00:12:00,440 and that's basically that pseudo code, and that's just by telling you about how you can make a 137 00:12:01,120 --> 00:12:04,780 Expandable or is expandable type of thing it shows zero 138 00:12:04,780 --> 00:12:12,780 There's no high way to expand it seven you expand it all three different ways and up and down the line with the various 139 00:12:13,740 --> 00:12:14,220 combinations 140 00:12:15,020 --> 00:12:16,200 That's on the same thing 141 00:12:16,900 --> 00:12:23,500 So we get to the I permutator which you can see in I the ghost virus C perm as well as in a lot of 142 00:12:23,500 --> 00:12:25,460 other zombie viruses and 143 00:12:26,360 --> 00:12:28,580 Here's the pseudo code for that which basically 144 00:12:29,700 --> 00:12:34,700 Goes through like well this one's when it's actually kind of shuffling beforehand 145 00:12:35,840 --> 00:12:43,100 So it just puts the code groups together puts a jump in after that code group and then we come into this one which goes 146 00:12:43,100 --> 00:12:44,740 to the jump and 147 00:12:44,740 --> 00:12:50,460 Inserts the proper address to jump to the next code group in this sequence oh 148 00:12:52,960 --> 00:12:58,700 I also forgot to mention I changed my presentation a little bit, so it's I different from the one on the CD 149 00:12:59,300 --> 00:13:00,020 but I 150 00:13:00,720 --> 00:13:07,140 If yeah, it's just so if you're following along on a computer just so you don't get lost I've made a lot of changes I 151 00:13:07,940 --> 00:13:11,720 In the assembler section the main thing that you have to worry about 152 00:13:11,720 --> 00:13:13,080 rather than the whole 153 00:13:13,080 --> 00:13:17,800 Like converting all the stuff is the main thing is to do jump relocation fixes 154 00:13:18,520 --> 00:13:25,840 Which so I your old sit pointer or your old jump will go to the proper jump once it's reassembled in the new I? 155 00:13:26,140 --> 00:13:27,220 new program 156 00:13:28,500 --> 00:13:32,660 And here we I usually initialize a couple tables one 157 00:13:32,660 --> 00:13:37,720 That's I eight bytes long four bytes for where the new instruction pointer is 158 00:13:37,720 --> 00:13:41,860 four bytes for where the old instruction was located and 159 00:13:41,860 --> 00:13:43,020 Then we have a jump table 160 00:13:43,020 --> 00:13:50,340 Which basically lists I the offsets of our jumps and jumping to the instructions so we can check in there the older jumps? 161 00:13:50,460 --> 00:13:52,480 So you can check these old jumps match 162 00:13:53,100 --> 00:13:55,000 Now we should change it to this new one 163 00:13:56,680 --> 00:14:01,380 And basically that's what this for loop does with the infinite checks to see 164 00:14:01,940 --> 00:14:06,700 goes through if there's still I jumps to be processed it goes to the jump table and 165 00:14:07,200 --> 00:14:12,680 Goes through until it hits the end and then I comes down and sees if the old 166 00:14:13,020 --> 00:14:15,940 I jump table address is the same as the I 167 00:14:16,840 --> 00:14:23,800 New earth the old jump table address in the EI P table and then assigns the new one if the old ones match 168 00:14:25,780 --> 00:14:31,520 Other ideas that have come up about this is one of them was that I it's been an extremely old idea 169 00:14:31,520 --> 00:14:37,560 It's been done a lot even I can't think of any of the DOS viruses, but there have been ones either done that and 170 00:14:38,380 --> 00:14:39,640 It's registered change 171 00:14:41,060 --> 00:14:42,720 one generation and 172 00:14:43,020 --> 00:14:48,240 You have eax doing all these operations for you next generation you may have ebx 173 00:14:48,240 --> 00:14:52,860 Doing it which will change if you're doing a signature scan it changes the op code 174 00:14:53,540 --> 00:14:54,740 then we have I 175 00:14:55,460 --> 00:15:02,060 entry point obscuring techniques which have been fairly popular so that basically that is when you 176 00:15:02,060 --> 00:15:07,640 put a I jump or a call at the hosts entrance and 177 00:15:08,380 --> 00:15:13,000 Via file and then it jumps straight to the virus code runs it jump? 178 00:15:13,020 --> 00:15:19,260 back. And then there was one that's only been seen in the Z-MIST virus, which is unknown 179 00:15:19,260 --> 00:15:26,100 entry point. And what that does is it interjects the virus straight into the stream of code, 180 00:15:26,300 --> 00:15:32,240 which this can be done with your reassembler after disassembling both the host and the 181 00:15:32,240 --> 00:15:38,220 previous generation virus. And then we have other modules that you see a lot of them, 182 00:15:38,220 --> 00:15:44,460 like trash code generation that was big during a lot of email spreading viruses and worms 183 00:15:44,460 --> 00:15:50,960 and whatnot. And that one can be added, but there's a drawback that will be that your 184 00:15:51,570 --> 00:15:56,940 code will keep on growing throughout, which is what always happens with a garbage code 185 00:15:56,940 --> 00:16:05,860 generator. But also this can be used to change signatures, and we'll see why this might become 186 00:16:05,860 --> 00:16:07,860 important with a new type of AV. 187 00:16:09,740 --> 00:16:18,360 And then we have encryption, be it polymorphic, be it just regular encryption. These things 188 00:16:18,360 --> 00:16:23,340 are, you can also include them, but you have to be careful how you do it. So that, say 189 00:16:23,340 --> 00:16:28,500 like, sometimes a flag will be thrown up because you're using a certain technique to 190 00:16:29,500 --> 00:16:35,180 polymorphically encrypt and decrypt your virus. But say a properly done one would be Z-MIST 191 00:16:35,180 --> 00:16:38,100 is a great example of that one too, which is one of the greater viruses. 192 00:16:38,220 --> 00:16:46,480 And what it does is it acts exactly like a file that will decompress at runtime when 193 00:16:46,480 --> 00:16:53,680 it uses its polymorphic engine. So here comes the start of our AV section. I just wanted 194 00:16:53,680 --> 00:17:00,720 to put up this quote from an article about Z-MIST that says that metamorphism is something 195 00:17:00,720 --> 00:17:07,300 that's going to be pretty crazy and we need to find out something to do for it. And since 196 00:17:08,220 --> 00:17:13,840 Z-MIST and I, the I, unexpected entry point, have been written by ZOMBIE, I found an article 197 00:17:13,840 --> 00:17:20,820 by ZOMBIE that shows what the implications of doing this would be. And you have your 198 00:17:20,820 --> 00:17:24,480 variables, and this is basically saying that if you're doing a signature scan, you have 199 00:17:24,480 --> 00:17:29,000 to run through until you know you're definitely on the virus, and you don't know how long 200 00:17:29,000 --> 00:17:38,200 that will take. So, while I've been mentioning signature scans, so just to show you that 201 00:17:38,220 --> 00:17:40,160 in case if people don't know, I had 202 00:17:40,160 --> 00:17:42,080 like a little slide to tell you about 203 00:17:42,080 --> 00:17:43,780 signature scans, which is basically 204 00:17:43,780 --> 00:17:45,920 the oldest technique for virus 205 00:17:45,920 --> 00:17:48,200 finding viruses, and it's 206 00:17:48,200 --> 00:17:49,060 just to check a 207 00:17:49,700 --> 00:17:52,120 string of bytes or so forth to see 208 00:17:52,120 --> 00:17:54,060 if it matches a signature in a database. 209 00:17:54,480 --> 00:17:56,180 And if those match, then most likely 210 00:17:56,180 --> 00:17:56,980 you have a virus. 211 00:17:57,460 --> 00:18:00,200 And there's many other things. 212 00:18:00,340 --> 00:18:00,680 Say like, 213 00:18:01,480 --> 00:18:03,660 Z-Myst is my major example 214 00:18:03,660 --> 00:18:05,960 because that's the one that uses 215 00:18:05,960 --> 00:18:07,440 the most metamorphic techniques 216 00:18:07,440 --> 00:18:09,540 as a date that I've seen. 217 00:18:10,120 --> 00:18:11,580 And in his, 218 00:18:11,760 --> 00:18:13,800 he puts a Z in the DOS 219 00:18:13,800 --> 00:18:15,560 header, and 220 00:18:15,560 --> 00:18:17,880 that is his mark for 221 00:18:17,880 --> 00:18:19,180 I've infected that file. 222 00:18:19,600 --> 00:18:21,680 And you need these marks 223 00:18:21,680 --> 00:18:23,760 so you don't constantly infect the same 224 00:18:23,760 --> 00:18:24,220 file, 225 00:18:24,380 --> 00:18:27,860 but it's still a constant struggle in between 226 00:18:27,860 --> 00:18:29,660 will the virus recognize it, will 227 00:18:29,660 --> 00:18:31,140 the AVs recognize it. 228 00:18:31,260 --> 00:18:33,400 And one thing is this one's somewhat 229 00:18:33,400 --> 00:18:35,420 ambiguous because a Z is 230 00:18:35,420 --> 00:18:36,980 allowed in that portion of the header. 231 00:18:37,640 --> 00:18:39,840 So that you know sometimes the virus 232 00:18:39,840 --> 00:18:42,540 may not infect every file it can. 233 00:18:43,220 --> 00:18:46,080 Infecting ones are already not infected. 234 00:18:46,580 --> 00:18:49,600 And at the same time the AV will look at it 235 00:18:49,600 --> 00:18:51,300 and say, we're really not sure, 236 00:18:51,400 --> 00:18:53,240 this could be a legitimate Z, 237 00:18:53,440 --> 00:18:55,400 or it could be a Z placed by the virus. 238 00:18:58,000 --> 00:19:00,220 And next we come onto geometric scanning, 239 00:19:00,420 --> 00:19:03,040 which is one of the downfalls of like 240 00:19:03,740 --> 00:19:04,220 polymorphism. 241 00:19:04,660 --> 00:19:07,420 And I, but we see with it, Z-Myst, you know, like, 242 00:19:07,420 --> 00:19:15,900 it was able to beat it by acting like a runtime self-decompressing file. 243 00:19:16,680 --> 00:19:23,020 And so basically what GeometricScan does is check the size changes in the file 244 00:19:23,020 --> 00:19:27,060 so they can say, all right, this is acting like this, this is acting like that, 245 00:19:27,140 --> 00:19:30,540 because the initialized data section's grown this much. 246 00:19:32,780 --> 00:19:38,100 And then we have the possible answers, because we saw that ZMist had beaten the previous ones. 247 00:19:38,760 --> 00:19:44,420 And one of them is to combine various techniques and use kind of a heuristic idea. 248 00:19:45,120 --> 00:19:48,780 But this fails because it takes a lot of time, 249 00:19:48,800 --> 00:19:50,940 and nobody's going to run anything if it takes a lot of time. 250 00:19:51,600 --> 00:19:56,420 And also there's always anti-emulation, debugging, all that type of stuff, 251 00:19:56,500 --> 00:19:59,840 techniques coming out so that some of these techniques 252 00:20:00,540 --> 00:20:05,540 will fail, the AV techniques will fail if they try to use them 253 00:20:05,540 --> 00:20:09,800 with these other anti-star, whatever you want to call them, techniques included. 254 00:20:10,600 --> 00:20:13,480 And the second, which is a fairly new one, 255 00:20:13,600 --> 00:20:16,400 and I actually was looking around the Internet, 256 00:20:16,500 --> 00:20:19,120 and I saw that there's somebody that might be talking about this 257 00:20:19,120 --> 00:20:21,420 at the Virus Bolton conference. 258 00:20:22,360 --> 00:20:26,780 And it's to use a shrinker, like we were talking, one of the parts of the virus, 259 00:20:26,900 --> 00:20:30,220 the shrinker and the de-permutator, so that you can have this, 260 00:20:30,540 --> 00:20:33,140 virus de-permutated and shrink to its skeleton. 261 00:20:33,860 --> 00:20:37,840 And that's where the executable trash generator being left in there 262 00:20:37,840 --> 00:20:42,520 could help it out, because at its skeleton you'll still have opcodes 263 00:20:42,520 --> 00:20:45,660 that weren't there a generation beforehand. 264 00:20:47,320 --> 00:20:49,960 And so, yeah, we see the flaws in the answers. 265 00:20:50,340 --> 00:20:51,580 They take too long. 266 00:20:51,860 --> 00:20:56,160 You're not able to do some techniques if they include various ways of programming. 267 00:20:57,300 --> 00:21:00,360 And, but the shrinker is the closest one. 268 00:21:00,540 --> 00:21:03,280 We have, so that's what they have to go with. 269 00:21:05,600 --> 00:21:10,260 And I just want to include a section that's why this might be stronger 270 00:21:10,260 --> 00:21:12,360 compared to other techniques. 271 00:21:13,020 --> 00:21:17,000 And trash generation, of course, you just have worthless code, 272 00:21:17,080 --> 00:21:22,100 and the virus grows loads and loads every time it passes a generation. 273 00:21:22,200 --> 00:21:25,080 So after a while, a file will get big enough, 274 00:21:25,140 --> 00:21:26,860 and they'll know that something's happened. 275 00:21:27,300 --> 00:21:29,160 And also in polymorphism, 276 00:21:30,540 --> 00:21:33,740 you usually, you can always take like a static picture of the body, 277 00:21:33,840 --> 00:21:35,920 or at least portions of the body at times, 278 00:21:36,540 --> 00:21:37,780 throughout the running of the virus. 279 00:21:37,860 --> 00:21:41,100 So you can know that though it's decrypted now, 280 00:21:41,160 --> 00:21:44,220 or it's encrypted now, it always has to decrypt itself. 281 00:21:44,400 --> 00:21:47,200 So you have the same code once it's decrypted. 282 00:21:50,080 --> 00:21:55,180 Well, I'm sorry, I'm kind of new to speaking to large crowds, 283 00:21:55,240 --> 00:21:57,200 so I might have flew through that too fast. 284 00:21:57,380 --> 00:22:00,240 But I just wanted to open the floor to question and answer, 285 00:22:00,540 --> 00:22:01,800 or anything like that. 286 00:22:01,900 --> 00:22:02,100 Yes? 287 00:22:02,380 --> 00:22:04,640 Wouldn't most of these viruses be small enough 288 00:22:04,640 --> 00:22:07,160 that if you took a snapshot of any part of the body, 289 00:22:07,280 --> 00:22:10,540 did that look the same as like another program apart? 290 00:22:11,180 --> 00:22:14,660 Are we talking about the, with the polymorphism? 291 00:22:16,260 --> 00:22:19,100 I, it's possible that this could happen, 292 00:22:19,680 --> 00:22:24,680 but I haven't really checked too much into polymorphism to tell you the truth. 293 00:22:24,780 --> 00:22:28,160 I just looked at a few techniques and saw what they did, 294 00:22:28,340 --> 00:22:30,380 and, but I haven't really, 295 00:22:30,380 --> 00:22:30,520 I haven't really checked too much into polymorphism to tell you the truth. I just looked at a few techniques and saw what they did, and, but I haven't really, 296 00:22:30,520 --> 00:22:40,160 I haven't really checked too much into polymorphism to tell you the truth. I just looked at a few techniques and saw what they did, and, but I haven't really checked too much into polymorphism to tell you the truth. 297 00:22:40,160 --> 00:22:40,300 I haven't really checked too much into polymorphism to tell you the truth. I just looked at a few techniques and saw what they did, and, but I haven't really checked too much into polymorphism to tell you the truth. 298 00:22:40,480 --> 00:22:50,040 I haven't really checked too much into polymorphism to tell you the truth. I just looked at a few techniques and saw what they did, and, but I haven't really checked too much into polymorphism to tell you the truth. 299 00:22:50,040 --> 00:23:00,500 I haven't really checked too much into polymorphism to tell you the truth. I just looked at a few techniques and saw what they did, and, but I haven't really checked too much into polymorphism to tell you the truth. 300 00:23:03,600 --> 00:23:05,200 Which section were we talking about? 301 00:23:05,400 --> 00:23:11,880 I mean, the part that files the process of the decrypting virus during the infection. 302 00:23:12,140 --> 00:23:14,220 That's kind of the danger of your virus. 303 00:23:19,360 --> 00:23:21,980 I'm sorry, I can't really hear you too well up here, 304 00:23:22,040 --> 00:23:23,900 so I kind of miss pieces, and I think they're important. 305 00:23:23,900 --> 00:23:31,440 There is a part that is common, or is not encrypted, 306 00:23:31,820 --> 00:23:36,280 that is not polymorphic, which is the start of the virus. 307 00:23:36,540 --> 00:23:41,840 Is that the signator that can be easily recognized from antivirus software? 308 00:23:43,060 --> 00:23:43,920 I will... 309 00:23:45,020 --> 00:23:48,840 With the eyes, with the eyes, we have to be... 310 00:23:48,840 --> 00:23:49,220 Hey, Sean! 311 00:23:49,400 --> 00:23:49,600 Yeah? 312 00:23:49,800 --> 00:23:50,720 Repeat the question! 313 00:23:50,960 --> 00:23:51,780 Don't put it on the microphone. 314 00:23:57,300 --> 00:24:01,800 Well, his question was, if I recognize it correctly, 315 00:24:02,080 --> 00:24:06,940 is there a static part in metamorphic viruses that can always be recognized? 316 00:24:07,500 --> 00:24:14,580 And the thing is, since it can always be randomly expanded or permutated, 317 00:24:14,620 --> 00:24:18,300 you can step through it, but of course you'll still have different opcodes 318 00:24:18,300 --> 00:24:22,460 because of the expander or register exchange type of thing. 319 00:24:22,460 --> 00:24:27,280 So that's one thing, that's where the strength is with this, 320 00:24:27,320 --> 00:24:29,920 is that you can change, like, opcodes, 321 00:24:30,140 --> 00:24:33,700 and that's where mainly signatures are strings of opcodes. 322 00:24:35,860 --> 00:24:43,280 Do you think that AV software is going to have to run down the road of hash tables like QuickWire 323 00:24:43,280 --> 00:24:45,520 to be able to recognize changes? 324 00:24:46,000 --> 00:24:47,220 To recognize changes? 325 00:24:47,420 --> 00:24:52,200 I haven't looked too much into that, but that sounds like an interesting idea. 326 00:24:52,460 --> 00:24:53,860 That could be tried. 327 00:24:54,680 --> 00:24:57,080 Because mainly what I've heard is the shrinker idea, 328 00:24:57,300 --> 00:24:58,800 which will give you the code skeleton. 329 00:25:01,440 --> 00:25:01,880 Yes? 330 00:25:08,100 --> 00:25:12,040 This is how it shows how ridiculous viruses have gotten. 331 00:25:12,240 --> 00:25:17,520 Say, like, if you have, not even all of the major six I was talking about, 332 00:25:17,680 --> 00:25:19,500 but maybe, say, four of them. 333 00:25:20,380 --> 00:25:22,000 Say, like, the Z-MIS virus. 334 00:25:22,000 --> 00:25:27,220 I remember that being, I want to say, around 70, 80 pages or so. 335 00:25:27,300 --> 00:25:31,020 And some of it's also done in C, so, you know, that makes it even bigger. 336 00:25:31,420 --> 00:25:32,200 So it's... 337 00:25:32,660 --> 00:25:33,260 I'm sorry. 338 00:25:33,500 --> 00:25:34,740 Actually, that's a very good question. 339 00:25:35,520 --> 00:25:35,960 Okay. 340 00:25:37,000 --> 00:25:38,160 Oh, no, no, go ahead. 341 00:25:39,740 --> 00:25:42,940 When you do this sort of software engineering, 342 00:25:45,260 --> 00:25:47,200 does it make sense to break the C? 343 00:25:47,460 --> 00:25:49,240 That's what you might as you go later. 344 00:25:49,920 --> 00:25:50,360 Yeah. 345 00:25:50,420 --> 00:25:51,680 Is C unoptimized viruses? 346 00:25:52,660 --> 00:25:54,340 Just like what the compiler does? 347 00:25:54,940 --> 00:26:00,180 Well, the thing is, is with this virus, basically, we wrote something. 348 00:26:00,380 --> 00:26:04,120 Or with these viruses, the expander is basically an unoptimizer, 349 00:26:04,180 --> 00:26:06,520 which is really funny because, like, you know, 350 00:26:07,820 --> 00:26:11,420 not too long ago, everything had to be optimized for a virus. 351 00:26:12,120 --> 00:26:14,760 Nowadays, we're writing things to unoptimize them afterwards. 352 00:26:14,960 --> 00:26:17,280 So it shows that you really don't need optimization 353 00:26:17,280 --> 00:26:20,600 because we have so much room to deal with. 354 00:26:21,040 --> 00:26:21,980 So you have more... 355 00:26:26,740 --> 00:26:29,560 The techniques, it's no specific technique. 356 00:26:29,640 --> 00:26:31,560 Basically, it just looks through, and I... 357 00:26:31,560 --> 00:26:34,160 Well, most of them just look through, compare opcodes, 358 00:26:34,300 --> 00:26:35,660 because most of them are functions now, 359 00:26:35,740 --> 00:26:38,020 and they'll say, like, is this the opcode? 360 00:26:38,380 --> 00:26:40,020 If yes, change it to this. 361 00:26:40,600 --> 00:26:43,420 Yeah, but it's an expander. 362 00:26:43,620 --> 00:26:44,760 What about the shrink? 363 00:26:45,080 --> 00:26:45,740 Oh, the... 364 00:26:45,740 --> 00:26:47,340 I mean, the shrinker can compress operations. 365 00:26:47,720 --> 00:26:48,540 Yeah, well... 366 00:26:49,080 --> 00:26:50,880 Yeah, the compression is basically, like, 367 00:26:50,880 --> 00:26:51,920 say, for an easy example, 368 00:26:52,000 --> 00:26:56,040 I push ebx, pop ecx becomes... 369 00:26:56,040 --> 00:26:58,980 I move ecx, comma, ebx. 370 00:27:07,400 --> 00:27:08,980 Basically, that's it. 371 00:27:09,810 --> 00:27:10,260 Yes, sir? 372 00:27:12,160 --> 00:27:17,820 Yes, sir. 373 00:27:18,920 --> 00:27:19,860 There's 10. 374 00:27:20,140 --> 00:27:21,020 There's 10? 375 00:27:23,040 --> 00:27:25,420 Yeah, I haven't opened up the CD, so I... 376 00:27:26,180 --> 00:27:26,620 Wow. 377 00:27:30,820 --> 00:27:31,980 Are there any other... 378 00:27:31,980 --> 00:27:32,540 Yes, sir? 379 00:27:36,680 --> 00:27:37,440 I'm sorry, sir. 380 00:27:37,620 --> 00:27:38,920 Can you stand up? 381 00:27:42,520 --> 00:27:42,720 Yeah. 382 00:27:49,920 --> 00:27:50,800 I was... 383 00:27:50,800 --> 00:27:53,260 Well, with behavior blockers, I... 384 00:27:59,020 --> 00:28:03,300 Yeah, well, I... 385 00:28:03,300 --> 00:28:07,340 The thing with behavior scanners 386 00:28:08,020 --> 00:28:11,420 is if the behavior is found, of course, anything... 387 00:28:11,420 --> 00:28:13,300 Once you see what it will do, 388 00:28:13,900 --> 00:28:14,940 you'll know what's happening. 389 00:28:15,000 --> 00:28:18,740 But a lot of times, that takes a lot of time. 390 00:28:18,800 --> 00:28:20,680 And then, say, like, for emulation, 391 00:28:20,680 --> 00:28:23,020 sometimes there's ways that people have found 392 00:28:23,020 --> 00:28:23,920 to block emulation. 393 00:28:24,160 --> 00:28:28,960 So it'd be more of, like, an integrity scanner 394 00:28:28,960 --> 00:28:31,360 than an integrity scanner. 395 00:28:31,720 --> 00:28:33,020 Basically, you're already infected, 396 00:28:33,220 --> 00:28:34,600 and that's why it knows you're... 397 00:28:35,680 --> 00:28:36,900 have been infected. 398 00:28:41,900 --> 00:28:42,940 Emulation, I... 399 00:28:43,480 --> 00:28:45,560 I don't have my notes on it right now, 400 00:28:45,640 --> 00:28:47,540 but there's a few ways to... 401 00:28:47,540 --> 00:28:49,240 If I remember correctly, it's... 402 00:28:49,820 --> 00:28:51,520 It's placement of, like, variables 403 00:28:51,520 --> 00:28:53,760 below the call. 404 00:28:55,100 --> 00:28:55,900 So they... 405 00:28:56,420 --> 00:28:58,500 And it's, like, one of the hard-coded ones. 406 00:28:58,620 --> 00:28:59,880 Like, so if you do... 407 00:28:59,880 --> 00:29:01,620 I think it's, like... 408 00:29:02,380 --> 00:29:03,640 Usually, if you put the address 409 00:29:03,640 --> 00:29:06,000 that you want to put in for your call or jump, 410 00:29:06,160 --> 00:29:06,860 and I think it's... 411 00:29:06,860 --> 00:29:08,940 If you put in the instruction to do, like, 412 00:29:08,940 --> 00:29:09,880 dollar minus four, 413 00:29:10,080 --> 00:29:12,280 so it throws it back up in the instruction. 414 00:29:13,460 --> 00:29:15,660 If I remember correctly, that was one of them. 415 00:29:16,080 --> 00:29:17,340 But I don't know if... 416 00:29:17,340 --> 00:29:19,140 It's been a while since I've... 417 00:29:19,240 --> 00:29:21,060 If I read up too much on that. 418 00:29:22,060 --> 00:29:24,020 Is there a good reference? 419 00:29:24,320 --> 00:29:25,420 A good reference? 420 00:29:25,580 --> 00:29:26,040 I... 421 00:29:26,680 --> 00:29:27,080 Let's see. 422 00:29:27,200 --> 00:29:28,220 A good reference is... 423 00:29:29,560 --> 00:29:32,120 I'd basically say just reading through code 424 00:29:32,120 --> 00:29:33,640 is, like, the best reference. 425 00:29:34,140 --> 00:29:35,680 So sometimes... 426 00:29:35,680 --> 00:29:37,760 Usually, you can find some that's commented 427 00:29:37,760 --> 00:29:38,940 where they say this is... 428 00:29:38,940 --> 00:29:41,640 this technique being done type of thing. 429 00:29:41,800 --> 00:29:43,740 So that'd be the best start, I'd say, 430 00:29:43,800 --> 00:29:44,660 and best reference. 431 00:29:45,000 --> 00:29:46,400 So what part is... 432 00:29:48,480 --> 00:29:49,000 I... 433 00:29:49,240 --> 00:29:51,460 Currently, I know of some places 434 00:29:51,460 --> 00:29:53,240 where you can get, like, viruses 435 00:29:53,240 --> 00:29:56,900 that have the comments in them and so forth 436 00:29:56,900 --> 00:29:58,040 that use anti-emulation. 437 00:29:58,040 --> 00:29:58,860 I don't know if... 438 00:29:59,720 --> 00:30:01,080 They're still fairly new. 439 00:30:01,440 --> 00:30:04,080 And, well, usually, you can go to the same websites 440 00:30:04,080 --> 00:30:06,860 that I accessed some of my data off of 441 00:30:06,860 --> 00:30:08,760 for metamorphism, 442 00:30:08,780 --> 00:30:10,660 and they'll talk about that as well. 443 00:30:10,940 --> 00:30:12,280 So say, like... 444 00:30:14,820 --> 00:30:15,440 Let's see. 445 00:30:15,580 --> 00:30:17,800 The zombie's website, if you go to his, 446 00:30:17,980 --> 00:30:18,920 which is... 447 00:30:22,540 --> 00:30:24,180 z0mbie.host.sk, 448 00:30:24,880 --> 00:30:26,860 and you go to some of his links, 449 00:30:26,920 --> 00:30:29,520 you'll probably find some on his page 450 00:30:29,520 --> 00:30:31,180 and some on some of his link pages 451 00:30:31,740 --> 00:30:33,980 that you can, I, look at. 452 00:30:36,000 --> 00:30:36,520 I... 453 00:30:44,420 --> 00:30:45,540 Any more questions? 454 00:30:49,300 --> 00:30:49,740 Okay. 455 00:30:49,820 --> 00:30:50,700 Thank you for coming. 456 00:30:50,740 --> 00:30:52,780 Also, I'd like to thank my school 457 00:30:52,780 --> 00:30:54,740 because they helped... 458 00:30:54,740 --> 00:30:56,380 They're going to most likely help me pay 459 00:30:56,380 --> 00:30:58,060 for some of the trip over here. 460 00:30:58,420 --> 00:31:00,120 So I wanted to thank Regis University. 461 00:31:01,160 --> 00:31:01,780 Thank you. 462 00:31:02,740 --> 00:31:03,180 applause