Metamorphism help?

Discuss how to write good code, break bad code, your current pet projects, or the best way to approach novel problems

Metamorphism help?

Post by n00bl37 on Mon Jan 25, 2010 2:38 am
([msg=33859]see Metamorphism help?[/msg])

How is metamorphic code usually done? I'm toying with it in Java for the lulz and ran into a road block. What if I want to run the program on a computer without JDK? My solution! Write to the .class file! *face hits a road block* crap! How do I understand this! That's where you guys come in!

Anyone know how to read a .class file with your eyes? How about any information on metamorphic code in general?
n00bl37
New User
New User
 
Posts: 9
Joined: Mon Jan 25, 2010 2:24 am
Blog: View Blog (0)


Re: Metamorphism help?

Post by BhaaL on Mon Jan 25, 2010 12:46 pm
([msg=33872]see Re: Metamorphism help?[/msg])

I suppose you are talking about self-modifying code?
I don't think this is possible in managed languages like Java, since you don't have access to the lower levels where the VM actually runs your code. Even if you did, I could imagine it will block such attempts.

And you usually dont need the JDK (Development Kit) to run Java applications, but the JRE (Runtime Environment). That is, essentially the VM your Code (the .class file) runs on (is interpreted by).
BhaaL
Poster
Poster
 
Posts: 270
Joined: Sun Apr 13, 2008 11:16 am
Blog: View Blog (0)


Re: Metamorphism help?

Post by n00bl37 on Mon Jan 25, 2010 9:38 pm
([msg=33903]see Re: Metamorphism help?[/msg])

I know that the JRE is needed to run the code but, recompiling is part of the program I'm making. Don't you need JDK to compile? Or is there another way I to recompile code without JDK that I don't know about?

Also isn't saying it's impossible an infringement of the hacker mentality of making things do something they aren't meant to do?
n00bl37
New User
New User
 
Posts: 9
Joined: Mon Jan 25, 2010 2:24 am
Blog: View Blog (0)


Re: Metamorphism help?

Post by insomaniacal on Tue Jan 26, 2010 6:39 am
([msg=33916]see Re: Metamorphism help?[/msg])

I have next to no experience in Java, but couldn't you have it write the new source code to a file and then just issue command lines commands in order to compile and run the new code?

I'm sure Java has some feature that allows it to run outside programs.
It's not who votes that counts, it's who counts the votes
insomaniacal.blog.com
User avatar
insomaniacal
Addict
Addict
 
Posts: 1210
Joined: Sun May 24, 2009 10:21 am
Blog: View Blog (0)


Re: Metamorphism help?

Post by tgoe on Tue Jan 26, 2010 8:20 am
([msg=33918]see Re: Metamorphism help?[/msg])

You could probably do it with something like Jasmin Assembler. But if your goal is malware that avoids pattern recognition you'd have to rewrite the assembler itself to be metamorphic :)
User avatar
tgoe
Contributor
Contributor
 
Posts: 715
Joined: Sun Sep 28, 2008 2:33 pm
Location: q3dm7
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests