Implosion, beyond Destroy

Started by Ishvaaag101, July 11, 2025, 04:16:13 AM

Previous topic - Next topic

Robert

Quote from: Ishvaaag101 on July 12, 2025, 06:40:27 PMAI to help: (CHatGPT translated excerpt)

COMMAND$(0) returns the name of the current executable file

start /min cmd /c del [name of executable file]

"del " command to erase files in Windows.

"cmd /c del ..." executes the command del and closes the cmd

"start /min" launches the CMD in mimimized window to make it invisible

Result: A string is created as needed to execute a command that deletes the program's own executable file.

SHELL NotToBe
Executes the command held in the string variable NotToBe

Create a command that deletes the program's executable file.

Run this command in a minimized console.

Everything clear.

Thank you very much, Robert, and to everyone considering the question.

Windows Command Reference
https://www.microsoft.com/en-hk/download/details.aspx?id=2632&msockid=1eea15546bab6ee3144703736a5b6f5d

Important: If you download the CHM file and it does not open properly on your computer, you might need to unblock it. To unblock the CHM file, first save the file to your computer, right-click the file, click Properties, and then click Unblock.

Ishvaaag101

AI to help: (CHatGPT translated excerpt)

COMMAND$(0) returns the name of the current executable file

start /min cmd /c del [name of executable file]

"del " command to erase files in Windows.

"cmd /c del ..." executes the command del and closes the cmd

"start /min" launches the CMD in mimimized window to make it invisible

Result: A string is created as needed to execute a command that deletes the program's own executable file.

SHELL NotToBe
Executes the command held in the string variable NotToBe

Create a command that deletes the program's executable file.

Run this command in a minimized console.

Everything clear.

Thank you very much, Robert, and to everyone considering the question.

Ishvaaag101

Thank you, Robert,

I first added secure deletion (my way) of Destroy.exe in the 1st part of Toby.bas. 2nd I added your last code contribution. Then I build Toby.exe and erase the Toby.c, Toby.bas and Toby.obj that at the moment or its practical use wouldn't be extant on the previous action of Destroy. To conform a final image of the situation I add Destroy.exe to the folder, so the situation in the folder on the start of Toby.exe is as expected an inert Destroy.exe and a running Toby.exe.

IT WORKS perfectly, Toby.exe has secure deleted (my way) Destroy.exe and on your code apport sent itself to the oblivion I am still to understand.

Certainly your code fulfils all my wishes on the matter, and may be more.

Some explanation on its workings would shorten much my effort to understand its ways and reach.

Thank you very much, again, Robert.


Ishvaaag101

Thanks, Robert,
It is my hour for bedtime ... tomorrow will learn your wise enigma (to me). Best wishes.

Robert


DIM AS STRING NotToBe
NotToBe = "start /min cmd /c del " & COMMAND$(0)
SHELL NotToBe


Ishvaaag101

To the moment I am using a call to a Toby.exe that kills Destroy.bas (that may change of name to whatever) and leaves Toby as the culprit of whatever the mess is. Decompilation would show what Toby does is to kill Destroy.exe. To get this solution both only Destroy.exe and Toby.exe have been excepted of destruction by Destroy.exe, and upon the call to Toby Destroy.exe is finished. In the end, Toby,exe stays extant for direct use (except if erased by hand), and for the moment not having cared for secure delete of Destroy.exe it stays ready for decompilation; all other elements of decryption have experienced the (relatively) secure delete process.

Will continue looking for a more complete deletion for Destroy and later, for apparent inexistence surmised on invisibility. Perhaps some attribute of invisibility for (now) Toby .exe?

Ishvaaag101

Maybe I am just magnifying the matter and be able to force a shell delete Destroy.exe (you get the idea) to be executed after ending it. Will try and say.

Ishvaaag101

#1
Hi,

I think to keep the Destroy program that you helped me to program extant after execution falls sort of ideal, just (upon exam) giving cue there may have been there such activity. So I am thinking that, since the (then) inert parts .c, .obj and .bas components may also be killed by the .exe component, it would be nice to modify Destroy to cause the implosion of Destroy.exe itself.

My initial idea is that, upon Destroy.exe has killed every file in the folder but itself, it creates a W10 programmed task from the shell that 0.1 secs after ending execution kills (if feasible securely) Destroy.exe

A further enhancement would be ensuring such task disappears from the visible records, but we can stop short of that, since that may cause excessive work pursuing deletion of traces along events. A not visible Destroy.* is enough for my intent. My intent is mainly protect the encryption system and immediately visible cues on it having been working at some desk, not to protect Destroy.exe

I understand this should also be factible launching a killDestroyexe.bat process left in execution at the Destroy.exe end, and 0.1 secs later the .bat killing Destroy.exe

Any help, comment or advice about any of the  W10 programmed task or .bat venues will be appreciated, for what I thank all you beforehand.