Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Mutating Programs

This thread is locked; no one can reply to it. rss feed Print
Mutating Programs
CGamesPlay
Member #2,559
July 2002
avatar

Yep. The first virus I wrote had a section that encrypted the rest of it, so it was impossible to trace, but better than that, the decryptor code changed, too :)

Unfortunately, a virus has to be small to be unnoticable (not so much nowadays though) so you can't have a large database of possible decryptors to use... In which case there still are some signatures it leaves. Plus, all the methods you find probably are already used. I set off my virus scanner several times :)

Damage: They are very dangerous. Speed is not essential. You should really be using a VM if you want to have a display: all the organisms will run in the same memory space.

Elver: Wow. You know there's an interrupt that when called, in all likeliness would have writtien over your partition table?

I like my opcodes still, (rather, my nodes) because they alow a lot of freedom, you can add more, the programisms have something more digitally alive rather than digital representations of biological creatures. (No, we shouldn't emulate something like anything biological).

[edit]
RedMarvin: The VM can't do anything dangerous.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

redMarvin
Member #3,714
July 2003
avatar

well with "!VM" I mean such progranisms
as was shown first here where windows was the VM

<code>cout<<"red_Marvin";</code>

CGamesPlay
Member #2,559
July 2002
avatar

Well, seeing as how that isn't a VM, my statement still holds.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Billybob
Member #3,136
January 2003

redMarvin, you really can't prevent that. Like I've asked twice before though, under a non-admin account does Win XP stop programs from modifing things like that? If it does, then we're safe under that setting :)

finds a major logical error in the Shadow I's ASM code...

X-G
Member #856
December 2000
avatar

What if your programs suddenly develop the ability to exploit a previously unknown bug in Windows and suddenly gain admin privileges? ;D

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Billybob
Member #3,136
January 2003

I'd be overflowing with joy because they found an unknown windows exploit :) heh, I'd let them have their fun.

CGamesPlay
Member #2,559
July 2002
avatar

Who needs exploits? Does Admin even do anything to programs? I'm certain there would be simple ways around it. And not unknown to microsoft. Of course, if you just run it in a VM, you DON'T HAVE THAT PROBLEM!!!

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Billybob
Member #3,136
January 2003

I'm trying to run it under bochs, but I'm having a very hard time with bochs. I finally got it to boot with the WinXP disc, but then I got a PANIC error cause by [HD ].... :'( maybe my disc image is too big...

Goalie Ca
Member #2,579
July 2002
avatar

What if, like human will someday, discover something outside the vm and learn how to manipulate it muhahaha. It's kinda like how maybe humans will leave this unverse or something :P

Muhahaha, like, what i'm also implying is, what if there is a program called NEO! Will you, the architect simply reboot the matrix or what will happen.

-------------
Bah weep granah weep nini bong!

Billybob
Member #3,136
January 2003

You can't get out of the VM, all the Progranisms are batteries and they'll stay that way >8)

Irrelevant
Member #2,382
May 2002
avatar

Heh. This is kinda neat.

It doesn't really have to be a complete VM, it could just recognise 256 (anyone feeling creative?) assembly-esque commands. Or rather, recognise some primitive maths, memory handling, branching, and file IO.

Of course, this would all be restricted to an array malloc()ed by the VM, and either a folder or a disk image on the HD.

Should it multitask, and allow one Progranism to write to others' memory (ie access violate)? Or would an access violating program get terminated by the VM (as in a real system)? ;)

<code>//----------------//</code>Here be l33tsp33x0rz.

Billybob
Member #3,136
January 2003

What I want:
*Multi-tasking VM, 32-bit
*Global memory, can be allocated, but VM does not block access violations, thus allowing for the Progranisms to hack each other.
*Programs in memory, copies of them on the HD
*A max process limit, denying new processes if this limit is hit.

Now, I have a 16-bit Console VM, and I've been upgrading it a bit, but it's still far from what I want...

CGamesPlay
Member #2,559
July 2002
avatar

Now, multiple threads are going to be hard when there is no one memory space for the programs. You'll bsically have a bunch of IPs all taking turns and such.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Billybob
Member #3,136
January 2003

installing linux on Bochs is taking a long time... I hope it works and that I can figure out how to convert Progranisms to linux, I'm dumb!.

Andrei Ellman
Member #3,434
April 2003

Have any of you guys heard of "Corewars"? It's a game where you write machine-code programs for a VM. All programs are run in a single memory-space. The idea is for your program to kill off all the other programs (by writing non-functioning op-codes in them IIRC) and survive the longest. The VM goes round giving each program a single opcode execution cycle before it goes on to the next program. These programs can spawn multiple processes, but when it's the program's execution cycle, only one of the process gets to execute it's opcode on that cycle (the other processes have to wait for the next cycle of the program).

On some implementations, the 'areana' (the memory where the competing programs are run) is shown graphically. Each program is given a different colour, and the instruction-pointer of the program or process is shown in a lighter shade of the colour.

I'm sure some good old Googling will bring you more information on Corewars and possible implementations for your platform.

AE.

--
Don't let the illegitimates turn you into carbon.

23yrold3yrold
Member #1,134
March 2001
avatar

That post reminds me of this GameDev contest. Check out the rest of the forum for more info. Maybe you guys could do something like that ;)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

X-G
Member #856
December 2000
avatar

Quote:

Have any of you guys heard of "Corewars"?

I used to play Corewars at one point! ;D Never was any good though. :(

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Billybob
Member #3,136
January 2003

That's what I want to do, but writing an emulator isn't easy, so I'm taking other routes and see what I come up with.

Carrus85
Member #2,633
August 2002
avatar

It shouldn't be to hard to have a file that handles the 256 bytecode operations? You could go with a format something like this...
ABXXXXXXXXXX

A is the opcode
B is the Number of Following Bytes controled with that opcode (0-255)
X is a value that is used by that opcode....

Just make sure you write your programs in a hex editor, and your set!

And, in the future, you could double the number of supported opcodes by simply making the template like this...
AA

Shouldn't be too hard...

X-G
Member #856
December 2000
avatar

Carrus: Each opcode accepts a set amount of parameters, so the "B" is unnecessary. As for having two-byte opcodes, you would reserve a couple of values for the first byte that signifies that there is another byte following, I believe ...

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Carrus85
Member #2,633
August 2002
avatar

Ok, I'm not very good at opcodes and I am kinda new at it...

I've worked out a system that uses two opcode flags... I'll post my system when it is up.

Synapse Jumps
Member #3,073
December 2002

I don't understand why the program launches the two children when it's done. I can see why it would, formatically speaking, but I can't find the code that executes the children.

mEmO
Member #1,124
March 2001
avatar

Just tried you proganisms, and it seems cool. Didn't dare run them for more than one cycle, though, but still they managed to put a file named "~" on my desktop :) way cool, man!

---------------------------------------------
There is only one God, and Connor is his son!
http://www.memocomputers.com
Happy birthday!

Billybob
Member #3,136
January 2003

Quote:

but still they managed to put a file named "~" on my desktop

They did? Sweet, never seen that before, hehe.

And as for what calls the children:

WinExec(Temp, SW_SHOW);

Synapse Jumps
Member #3,073
December 2002

I've got a question. Why does the parent's process never finish? Shouldn't it, or is the WinExec function blocking or something?
EDIT: WTF, it used to...



Go to: