Shrinker and Expander For the Shrinker and Expander, I call a direct expansion just a different way of doing the same instruction. I say, like, for example, well, I think I've got an example coming up next. And basically, Expander makes different instructions that do the same thing. Shrinker converts them back down so you can have your same code skeleton, if you will, each time. Yeah, here's an example. You have your original code where you move register 2 and register 1. And that's just the same as doing push register 2, pop register 1, because all you're doing is using the system stack to move it. And I just decided I put the bytecode on there, so it actually shows that it creates just a different bytecode. And that's pretty big. Yeah. That's the one thing I'm always up for trying to do. And so the addition to it is the idea of being able to create random expanders, because these regular expanders are easily caught by just looking for them instead of, like, any other type of search for three bytes. You know, if I saw push register 1, pop register 2, I know that was just a move instruction that's been expanded, so I could shrink it. I could shrink it myself and, therefore, know what the code's supposed to be doing and have that original code skeleton. So it's just the basis of figuring out ways, rule-based, to figure out ways of how to create these random expansions. And so, like, an indirect one would be, like, as we see here, we got a, since we do, before we do pop register 1, the idea of the rule is that register 1 becomes a free register, where you can do whatever you want. You can do whatever you want with it, since all you're doing is waiting for it to pop at the end off the stack to do your standard move operation. And so you get a, it does increase code size, but it does give you a different signature for even just one operation, like we see for this. And, yeah, this is the part about the whole idea of using the rule. The rule is register 1 can be manipulated before any point. Any point before the pop of register 1. And, therefore, since you have that rule, that's why we can stick that or in there and add random registers and values to register 1 in that earlier example. And, then next, for generating these, the idea is if you have, just label the areas. And. For each area, you have a different combination of rules since it depends which set of labels you're within at that time. So it's just a basic owing of all the rules together. So if you're in a section that's within two boundary points, you can decide to use both of the rules together and stuff like that. Say, for instance, this one. We can see the rule one starts at the beginning of the code and ends right before the pop register one because pop register one is when the rule tells you that you can no longer randomly use register one. And then I just had some stuff on like basic metamorphic viruses. is if I, because that's where they first started from, and that's just some ones to check out that are usually really good. Metaforil was the first one that was a fully metamorphic virus. It actually had a shrinker in it as well as a code expander and various other stuff. There's also the executable trash generator that was written by Zombie, and that one's great for just creating random. You can pass in instructions, and it will output random opcodes for you, and you can tell it what you want as your destination registers, what you want as your source registers, and you have some instructions you can pick out of. So you just set all these bikes, push it in. I think I got it on the next slide. Yeah, here's calling it. So you just tell it how long you want it, point towards the buffer, and then the rest is just telling it what instructions. It can use what you want as your source and what you want as your destination. And there's also one other tool that I forgot to mention on that other page that's called the micro-length disassembler, and that one's great for... You can do incremental development of this engine because you're going to have to map your opcodes kind of to do your own parser. So this one, you can stick this micro-length disassembler, which is... I think... I can't remember the exact length, but it's nice and small. You can basically take this and stick it in your ELTS. So if you don't feel like mapping an operation, it just drops through to this. The micro-length disassembler will tell you the length of the instruction, and therefore you can just skip over it and go to the next one. So when we're using X-Keyboard Trash Generator, to generate our code, since we'll be mapping to show where the registers are in the opcode, I just would go by sticking ELX in for your source as well as destination register if you have two or anything like that, since they'll just give you all zeros in there. So you can easily map another register in there by just doing it, oring it in there. I think I... Yeah, I said oring it in there. You can... It's just... Yeah, if you do that oring and put it in there, I think I've got a little something on... Yeah, I put a little something on extracting register values out of opcode, and it's... Well, if you just got it mapped like so, then you know which you've got to or and which you've got to and to mess with stuff. And, like, it's... Here's just, like, a small algorithm for... or just showing how adding that register in would work. It's easy. It's oring it in as, like, that first push and the pop is shown. And it's... If you just or that in, it just goes into there and combines with the rest of the opcode. And it's safer. If you just... If you have a mobile piece of code and... Since if you fully, ever fully shrink something, say, with these old metamorphic engines, they always made sure to never shrink itself completely because then you fall into the same hole that you have when you're using regular encryption because your encryption, at one point or another, it's got to be decrypted so you can use it. And if you fully... fully shrink this, you just get the standard, you're looking on a high-coded skeleton. So this code skeleton, you can pick up in memory and it'll always be the same. So you always have to leave it somewhat unoptimized or it's just as easy as checking memory to find what it looks like. And since we were going to try to randomly generate these expansions, the idea... I didn't see that. It was right in there. The idea is that since we're going to be developing new expansions, and we can't fully shrink it, it's pretty much worthless to use. You have to find some middle ground to pass these expansions on to the next one. So I just have it that the shrinker knows that generation n as well as generation n-1, and it knows that I... the shrinkers were... I developed... or the shrinkers were the random expansions that were developed during those generations. So it's... And then, of course, your expander creates the expansions that go into the n-plus-1 generation. And therefore, you kind of just carry half of the older generation, you create half new, and you just keep on going from there and you always just drop the old one, develop the other half again as your new set of expansions. And you always... But to make sure, if you want to, that you don't end up just having geometric growth like a regular trash code generator, you've got to fully shrink the n-minus-1 generation's expansions because you would lose... By n-plus-1, you would have... You'd end up losing that generation of how to shrink that, and therefore just leaving trash code in there that's not reversible, and to be re-trunked to use. And I see this as an improvement on metamorphosis, oh my. Because in your standard metamorphic virus, when you have your expansions and shrinkers, it's easy as just scanning for these things. For studying, and usually they only go about five deep in most codes for doing expansions, so you optimize it five times, and you've got the original code. So, but hopefully by... It just adds, like, a little more complexity is really all I'm going for, is because you don't have... It's not as easy as this is automatically... You can't just have, like, a database of expansions and check that towards the code since you can randomly generate a fairly large amount of these expansions. So it wouldn't make sense to just use, like, a database of them, or just to have them so you can just brute force it or anything. And for using this technique, it's... Well, I'm still working on the engine, but for using it, I do believe it'll work because of adding these random opcodes in there. It will keep us away from just the standard and easy optimization and stuff, but also... Rather than just using a trash generator and combining the code of the trash generator with the expansions and not worrying about the shrinking, then you just... I got something that's exponentially growing generation to generation in comparison to actually being know how... to know how to shrink it, and therefore no longer having that exponential growth. And I realized this was... So I want the 20-minute presentation, and I want the 20-minute presentation of the questions that they just started doing this year. So I kind of... I just tried. I kind of went real quick through those. And I'd like to... I will put on the floor for questions if anybody... And so, for asking any. And I thank you for coming this morning. Any questions? All right. Thank you. Thank you. Thank you. Thank you. Thank you.