Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > .NET

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 07-07-2011, 08:22 AM
kthx kthx is offline
Junior Member
 
Join Date: Feb 2010
Posts: 4
Question How do I load .NET framework in Delphi

Hello all

I am using Delphi 7 and I was just wondering how to load the .NET framework from the source code... I want to be able to enable or disable it whether or not I want .NET. I will do all the work, is there a one liner like microsht.NET.load(Application); ?

I have a HWID program, and it needs to be .NET compatible if it is protecting a .NET application.

I had a user test it out, and they got this message. He is a programmer but didn't know what it meant.



I figured it meant that because I hadn't loaded .NET, and his program was injected in to memory from my program, it might try loading .NET and try to figure what version .NET it is, only to find the file on disk (mine) is not .NET.

Any Ideas?

Help much appreciated thxz
Reply With Quote
  #2  
Old 07-07-2011, 12:59 PM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,335
Default

I'm missing some stuff in your story, because I really don't understand it.

As far as I know now, you have an app written in Delphi 7... Somewhere in that app you load another app (.NET) in your memory, how do you do this???

And what happens if you run the .NET app from within windows (doubleclick the .exe of that app)
Reply With Quote
  #3  
Old 07-07-2011, 08:58 PM
kthx kthx is offline
Junior Member
 
Join Date: Feb 2010
Posts: 4
Default

First off, thanks for the reply!

Using a memory inject function? That is not the problem... The problem is that because the protected application is injected in to memory from my application, it needs to somehow load the .NET framework (only if the protected application is .NET).

If you want to know how to inject in to memory, create another thread :P It doesnt matter how its done, all you need to know is that it is done.

My question is simply this: "How do I load .NET framework runtime?" and nothing more. I only gave a background on the program so you know why I need to do such a thing.

Obviously if you run a .NET app in windows, it will see the EXE, see what version of .NET it needs to load, and load.

If you inject in to memory, because there is no file on disk, and its injected in to MY process, it looks at MY executable and cant tell which version of the framework to load (because its not using .NET)

Actually, last night I read Delphi8 is .NET. I think this is my solution, I will just write part of it in Delphi8 I still am looking for a way to do this entirely from D7 if possible.

Thanks in advance

Last edited by kthx; 07-07-2011 at 09:02 PM.
Reply With Quote
  #4  
Old 07-08-2011, 11:04 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,335
Default

Quote:
It doesnt matter how its done, all you need to know is that it is done.
I disagree on this part, if you don't tell us how it's done it's nearly impossible to tell you the how to load .NET

Since it's all theory here:
But you store your app somewhere, why not store it's .NET equivalent with it... You can find out the one you need before storing it...
If you can inject an app, you can also inject a specific .NET framework I guess...
Reply With Quote
  #5  
Old 07-17-2011, 11:50 PM
kthx kthx is offline
Junior Member
 
Join Date: Feb 2010
Posts: 4
Default

Thanks for your reply;

I have got as far as coding a seperate .NET app to execute, if it makes a file, then the D7 app knows it supports .NET

But when I try to inject a .NET app in to that .NET app I get a different DLL error.

Lets say I just want to make the program load the latest version of the .NET framework from D7, how would I do that? It is a console application.
Reply With Quote
  #6  
Old 07-19-2011, 10:42 PM
lornemck lornemck is offline
Member
 
Join Date: Jan 2002
Location: Richmond, BC CANADA
Posts: 49
Default

Does anyone else here know wtf he is talking about? How do you "inject" an app into another app? And what exactly is an "injected" app supposed to accomplish?

I've been a programmer for 30 years, I've built TSR (anyone remember TSR?) applications, I've built multi-thread applications, I've built applications that interact with controls of other applications. I have never had any reason to "inject" one app into another.

Unless maybe he's talking about writing a virus... in which case the correct word is "infect" not "inject"...
Reply With Quote
  #7  
Old 07-20-2011, 02:53 AM
kthx kthx is offline
Junior Member
 
Join Date: Feb 2010
Posts: 4
Default

Quote:
Originally Posted by lornemck View Post
Does anyone else here know wtf he is talking about? How do you "inject" an app into another app? And what exactly is an "injected" app supposed to accomplish?
Injection is where you take the application, and "inject" it in to memory. You know what a needle is right? Basically, it means that my program that I am protecting never touches the hard disk. It goes straight in to memory after decryption. This accomplishes a file executed on the computer without any part of it touching the hard disk.

Quote:
Originally Posted by lornemck View Post
I've been a programmer for 30 years, I've built TSR (anyone remember TSR?) applications, I've built multi-thread applications, I've built applications that interact with controls of other applications. I have never had any reason to "inject" one app into another.
You are 30 years old? Wow, I am 25 and I know something you don't! Not only that, but I am a self-accomplished programmer This is my first experience with injection, but I saw a legitimate use for it. What can I say, I am smart

You simply have not had to inject your app in to another app, because you did not come up with the genius idea that I did. (read on)

Quote:
Originally Posted by lornemck View Post
Unless maybe he's talking about writing a virus... in which case the correct word is "infect" not "inject"...
BINGO! You are right, you hit the nail on the head! Injection is commonly used in underground programs (viruses, bots, trojans, etc.)... However, I am not using it for such purposes. If you actually read my OP, you would see "I wrote an HWID program".

I have a legitimate licensing software that will lock an application to a specific computer, without the need to communicate with a licensing server over the internet. This reduces the amount of time to verify the computer, as well as it allows users to use their protected applications offline. Also, I did not mention, I have paid people to attempt cracking this. The best of the best have had their attempts and failed. (PM me if you would like a crack at it )

This is all accomplished by storing the EXE inside of my EXE encrypted with blowfish, and then at runtime dumping it to the memory, decrypting, and injecting.

If I were to put my clients applications right on the hard disk, somone could run it in a VM and hit pause, then find the EXE and use it without limit and of course, not to mention pirate my clients software.


So, now that everyone knows my project (I have explained it twice now) can we please get OFF the topic of injection, and back to the original topic of "How do I load .NET framework"?

Pretend as if you never heard me say "injection" because it has no effect what so ever on the process to load the .NET framework (if there is one) Injection has NOTHING to do with my question. Not to mention, it seems that it is too advanced for users of this forum :-/

Please, NO MORE REPLIES unless it is something related to loading .NET framework. I am sick of explaining injection, and I should not have to, because this is a programming forum right? If you want to know about injection, please open your own thread.


I thought fellow programmers would embrace me, being a programmer and all. I was even nice, and kind at first. But it seems I was wrong and we are all a bunch of dicks that don't help each other out... This thread is like a child knocking on his front door, only to have his parents slam it in his face and kick him to the curb... This is truly sad.

I have found a solution, however sadly it is not good enough. My solution is to just drop the .NET file to disk. This is insecure, although it will have to do for now until I get a decent reply to my question... Otherwise I can't support .NET which is a huge drawback... This also means my claims of un-crackability are not true, for .NET files :-/

Last edited by kthx; 07-20-2011 at 04:33 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:51 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.