Jump to content
Tuts 4 You

Self Destructing Dll Witha Catch [delphi]


Departure

Recommended Posts

hey guys first of all I'll try and explain what I have done and what I want to do, and my thought on what I should proberly do to make a self destructing dll.

First of I have created a custom dll in delphi to help me manipulate strings passed in Joe.exe (joe for example sake), I used IIDKing to inject my dll and functions to catch & manipulate the strings from joe.exe, this makes the custom.dll a static type dll for joe.exe which mean joe.exe now needs custom.dll to even run, Thats all fine and good but what I want to do is when I decide its time for custom.dll to be update (which I have already coded in to the dll), I want it close joe.exe and this will result in unloading custom.dll and then delete both, Now I have some ideas but I was wondering if anyone here could give me advice on implimenting them with delphi custom.dll?

1st idea was to set something in "runonce" into the registry, but that would require the user to reboot before it got deleted, So i dont like that idea because as for my self, im lucky to have a reboot once a month, 2nd idea was to make the custom.dll write a .bat file, that would delete both joe.exe and custom.dll I would call this .bat file just before i terminate Joe.exe.

Anyway thats my thoughts has anyone got any suggestions?

Edited by Departure
Link to comment

In general it should work like that:

Load Joe

-> loads dll -> finds update -> downloads updated dll to temp dir

inject some code into Joe (a second dll maybe ???) to unload the dll, replace it with the new one and restart Joe.exe

Link to comment

Yes that way is an excellent example on how you should do updates, But I should have stated the real reason why want to delete the file in my first post, And that is this "update" is acting like a banning system, If user is in the txt file I have on the server then it will message user why he/she is bann'ed from using this "crack"(just for agument sake, not putting my self into an illegal situation) then I want it close joe.exe and unload the dll (this should happen when joe.exe get terminated) then delete both joe.exe and the custom.dll.

I know it sounds really wierd to have a banning system with a "crack". But the way I have written the crack, some users might and have abused the features I have added to joe.exe. So this is my attept to stop this from happening.

To make this even more weird, the feature added with the custom dll was stop joe.exe banning users LOL, I know its crazy and sort of defeats the purpose of the crack to start with but it seems this feature has caused many problems with joe.exe client abusing the antiban sustem

Edited by Departure
Link to comment

Let's imagine I try to update joe.exe your way.

The exe starts a .bat to delete joe.exe and the dll.

The .bat tries to download from the server.

The file file is only received at 50% before the connection drops.

The .bat goes on to delete itself afterwards.

I'm stuck with a paid-for application that I cannot use unless I reinstall it since there are no valid executables or dlls.

But the way I have written the crack

Are you building a software or just getting information on how to crack it?

TiGa

Link to comment

All i need is really to know how to kill a running process, when the procces is custom.dll and joe.exe, but BEFORE killing the process write bat file, is it possiable to execute the .bat to delete custom.dll and joe.exe AFTER killing the process? im thinking the time between killing process and executing bat file might not be possiable?

1. kill running process(self)

2. run bat file to delete custom.dll and joe.exe

3. Bat deletes self after finshed

3. bat joe and custom does not need to download new files.................

Link to comment

ShellExecute can launch a bat file.

ExitProcess will close the current process.

In that order.

If you call ExitProcess first, well, that's it.

Nothing else happens.

There's prayer but don't count too much on results.

But the way I have written the crack
Are you building a software or just getting information on how to crack it?

You didn't answer the question, you just edited your post...

TiGa

Link to comment
But the way I have written the crack
Are you building a software or just getting information on how to crack it?

You didn't answer the question, you just edited your post...

TiGa

sorry , No im not building a software and I have already "cracked" it, Just in an orthadox

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...