Click to See Complete Forum and Search --> : how could I make an Invisible program!!!?


virus975
January 19th, 2006, 01:34 PM
Hi all;

this is my first subject, I'm a new C++ programmer, and I've a question:

How could I make an Invisible Console-application that works in the backgraound of the PC without any thing that we can see on the screen

I mean what's the code that makes an Application without that dos screen

I just want a program that works but we can't see it



Thanks all;

Good luck

Jean-Guy2000
January 19th, 2006, 01:37 PM
You can create a NT service, If you don't plan on supporting Win98/95/Me

NT services will run in background and do not appear on taskbar or tray.

OR

Make a C++ Windows application, but hide the default dialog , or remove it.

PadexArt
January 19th, 2006, 01:40 PM
Use invisible code. :D

There are several choices, all can be inmplemented in Visual C++ 6.0:
1. make a service - this might be an overkill
2. use a Windows application but use winmain as you would do with main
3. make a console application but destroy it's console.

for 2


The simplest is 2. How to create it: Use New Project, Win 32 application. you will end up with the code bellow which does exactelly what you need.

// PlainWnd.cpp : Defines the entry point for the application.
//

#include "stdafx.h"

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.

return 0;
}

virus975
January 19th, 2006, 01:49 PM
I'm sorry but I want an Invisible " Console Application " not visual win api

PadexArt
January 19th, 2006, 01:54 PM
I'm sorry but I want an Invisible " Console Application " not visual win api
There is no Visual Win Api involved.

We are discussing here about Console applications, Windows applications, Dialog Applications etc as application frameworks provided with Visual Studio. There are some other differences but in this case they are irrelevant.

The Windows application that you want to avoid assumes a window, a message loop and much more.

GCDEF
January 19th, 2006, 01:57 PM
I'm sorry but I want an Invisible " Console Application " not visual win api

You can create a Windows application but don't create any windows. It'll run but nothing will show up on the screen.

golanshahar
January 19th, 2006, 01:58 PM
I'm sorry but I want an Invisible " Console Application " not visual win api

you can use this code to make your console invisible, but it will work only on win2000 and higher.

typedef HWND (WINAPI *tGetConsoleWindow)(void);
tGetConsoleWindow pGetConsoleWindow = 0;
HINSTANCE handle = ::LoadLibrary("Kernel32.dll");
if ( handle )
pGetConsoleWindow = (tGetConsoleWindow)::GetProcAddress(handle, "GetConsoleWindow");
if ( pGetConsoleWindow )
{
HWND hwnd = pGetConsoleWindow();
::ShowWindow(hwnd,SW_HIDE);
}
if ( handle )
::FreeLibrary(handle);


Cheers

virus975
January 19th, 2006, 02:07 PM
I'll see the codes
and waiting for other members


thanks all.

GCDEF
January 19th, 2006, 02:18 PM
With this request and a name like Virus975, maybe you should explain what you're up to before we provide much more info.

virus975
January 19th, 2006, 02:46 PM
I sware I'm not planning anything but this is my username in everywhere ( in all forums, msn, yahoo, anywhere you want )

cause I use only one user and pass.

GCDEF
January 19th, 2006, 02:49 PM
Just busting your chops, but we do have to be careful about aiding and abetting the enemy. :)

Marc G
January 19th, 2006, 02:51 PM
[ moved thread ]

Marc G
January 19th, 2006, 02:52 PM
What exactly are you trying to accomplish?
What will the program do?
Do you want an icon in the system tray for you application?

virus975
January 19th, 2006, 03:00 PM
I want to make a hidden program(without that console screen) like this simple one:

int main()
{
do {
static int i = 1;
i++;
}while ( i != 100);
return 0;
}

kirants
January 19th, 2006, 03:19 PM
There is nothing this program is doing with console.. Then why are you insisting on a console program ?

You can as well do the same in a win32 program as PadexArt already suggested in post #3

Ariston
January 20th, 2006, 10:42 AM
Nice topic. But i don't need an invisible program, i want is uncloseable program. We know that windows xp and above have task manager that have process list. In that list we can close any application, especially if we have administrator password. What i want is how to make our application can not be closed by using this process list. I have create event on window close (i forgot the code, but it use window message/WM) it only work if we close it on window list not on process list.

PS: I'm not doing harmfull things with this application, i only create a netcafe billing because my friend can see the password even the password is complex.

Thanks.

Marc G
January 20th, 2006, 11:44 AM
I find it very bad practise to prevent a user from killing your application. If I would find a program that I could not kill on my system, I would uninstall it immediately.
An administrator should have full control over the system period.

Xatrix
January 21st, 2006, 12:34 PM
I'm pretty surprised you guys are actually helping him. The guy did not clearly explained why he wants to make the program to be invisible. I also do agree with Marc that at least administrator must have the option of shutting down the process via task manager, I see no reason a normal program would want to disable this option. Then, if your program is supposed to be run in the background, it must be a so-called "service", sitting somewhere in the systray, which consumes less resources. To make a completely invisible to a user program sounds fishy to me, considering the question ironically being asked from a person with the nick "virus". Now, if you want to be helped, you must at least say what you want the program to do, because if it's not harmful, then maybe there is no actual need in making it invisible, and then you will be directed into the appropriate direction instead. With that little info you provided and nature of your posts, I'm actually thinking you want to make a virus, so please members, don't help make viruses, or at least make sure you believe the guy is not going to make one, ask him to post the code or some portion of it which he wants to make invisible. And in general, there are other forums somewhere out there on the "dark-side", you will be helped there without being asked why you need this or that. I'm all for helping the guys, no matter their skill level, but helping to make harmful software is nowhere near the same as helping cracking the program. Needless to say viruses are able to bring huge damage to entire corporations, not mentioning usual home workstations which sometimes contain years of hard work on their HDDs...

Guess I made my point.

PadexArt
January 21st, 2006, 05:45 PM
Guess I made my point.

Yes but I'm afraid I can not agree with you.

Even if one wants to make a virus there is not necessarily a harm in it. I had to make a virus as an assignment given in the university in the assembler course. I did it and took the maximum grade for it. :D

Second, if we don't help that person he/she might really fall to the dark side and learn a lot of bad things there. I think it is a lot safer to browse this forums than other.

Thirdly, do you thing a person that wants to harm other would choose a nick like "virus"? Do you have any clue what my nick name means, perhaps it is "dark programmer" in romanian. :D

My point is that there is enough mistrust in the world to bring it in the CG forums.

Peace brothers. :)

Ariston
January 22nd, 2006, 09:58 AM
Well the billing is complicated you know, its about money.
The first application i made in windows 98 looks fine, the application is invisible so no one can not close the application without authentication from the application it self.
The the problem came out when client install the windows xp, the task manager really bad. It have process list, so any one can close any application in task list.
May be you mean that we disallow user to use administrator user, like i said, if we want to install something in client computer we must log in as administrator, so if some one have seen the password (if he have a good eye) then he can directly access task manager and kill our billing application.
Thats the point. But any way thanks for helping, i will think the other way to resolve the problem for my billing application (i have some in my mind).

PS: Not every one who want to make a restricted software are bad, maybe he/she only want to make the system more safe.

Thanks.

PadexArt
January 22nd, 2006, 10:05 AM
As previouslly stated there is no reason whatsoever to disallow an admin the complete system over his system. One reason is that few admins would willinglly install such app. Instead you should use the OS user groups to grant different access rights.

On XP you should make your app a service and dissalow normal users access to services. This way the admin still has 100% control over his system while normal users cannot shutdown your tool.

kirants
January 22nd, 2006, 10:55 AM
Personally, I don't understand why there are so many threads dedicated to this kind of question i.e. prevent user from using task manager to kill an app.

First, why would a user try that ? Is it because the app is consuming too much CPU and the user feels it has to be terminated ?

I simply fail to understand the motivation behind such a requirement.

golanshahar
January 22nd, 2006, 11:38 AM
Personally, I don't understand why there are so many threads dedicated to this kind of question i.e. prevent user from using task manager to kill an app.

First, why would a user try that ? Is it because the app is consuming too much CPU and the user feels it has to be terminated ?

I simply fail to understand the motivation behind such a requirement.

Basically you are right, if you refer to standard home users then of course there is no question about it, in my personal PC i don’t want anyone to prevent me from controlling it and if I find such application it can say bye bye :D

However, sometimes as a company you sell PC + your software only as one device.
Such machines can be sold, for instance, to factory for controlling hardware machines and get status in real-time about the hardware.

The idea is that such PC is like a device to those end users, when PC start the application run at start-up and block the user from terminating it, go play FreeCell and leave the machine like that, then this man finishes his shift and his colleague comes to the system and see screen with cards game, then guess what happens next?
That’s right, a phone call to the tech support in the company "Program stopped functioning i can’t see status all I see screen with cards”
I know its funny but those things do happen.
Further more, sometimes such a requests comes from the higher management of those factories, so employees wont use that PC to install games and play during job time.

So that is why on these cases you need to block the "user" from doing whatever he wants excpet using your software or reboot and then use the software again :p

I don’t know what OP want exactly but this kind of requirement is sometime needed.

:wave:

Cheers

kirants
January 22nd, 2006, 03:01 PM
The idea is that such PC is like a device to those end users, when PC start the application run at start-up and block the user from terminating it

But, then this problem has to be avoided by training the users how to use the system and what not to do.. That is my opinion.
Further more, sometimes such a requests comes from the higher management of those factories, so employees wont use that PC to install games and play during job time.
In this case, I feel employing proper policy enforcements on the target PCs is more relavant than trying all sorts of means to ensure that through modifications in s/w. Isn't it ?

Perhaps I am failing to understand because I haven't worked on a software with that kind of requirements. If I did, probably I would've appreciated the motivation better ;)

golanshahar
January 22nd, 2006, 03:48 PM
But, then this problem has to be avoided by training the users how to use the system and what not to do.. That is my opinion.


You are right, however on these kind of applications it’s better to close the options for the users. Just to be on the safe side, there are enough problems to deal with, last thing you want to know someone messed up with the computer just because he could get to the desktop ;)


In this case, I feel employing proper policy enforcements on the target PCs is more relavant than trying all sorts of means to ensure that through modifications in s/w. Isn't it ?

Again it depends how you look at it: lets say this app provides diagnostics from machines in product line of cars for instance, if someone will shut it down (even accidentally) and there is a problem in that specific product line no alert will be sound and it can cause damage of thousands of dollars in couple of seconds, believe me no one wants that. :D.


Perhaps I am failing to understand because I haven't worked on a software with that kind of requirements. If I did, probably I would've appreciated the motivation better ;)

Yeah I think you would, I know it sound terrible but think of it, those PCs are not designed for entertainment but to run 24/7 without interfering. The room for error should be minimal as possible. ;)

/EDIT: again this is in general, I still don’t think it is the case of OP, at least he didn’t mention it.

Cheers

rdrast
January 23rd, 2006, 08:34 AM
Just to chime in, I happen to design, install, and maintain industrial manufacturing control systems, including PLC's, and Window's based Human-Machine-Interfaces.

There is absolutely zero reason, to lock out an administrator from killing a task, ever. All of the other security problems (Solataire, Games, DVD playing) can be completely locked out with user and group policies on Windows 2K and XP. Remotely if you have a domain.

If your users are unable to maintain account and password security, there is absolutely nothing you can do about it. Making a program 'Invisable' and 'Unkillable' is totally unacceptable, and any vendor that does that to me will never again make a sale to me.

Windows services can be critical, and unstoppable, but even they should be stoppable by an administrator.

If you really desire something so ultra-secret, the true solution is to not use a commercially available operating system to host it. Write your own. Run it on a non-PC, single-board-computer platform.

golanshahar
January 23rd, 2006, 09:10 AM
If your users are unable to maintain account and password security.

I am sorry but not all users in the world know windows in such way to maintain an account and passwords, most employees don’t even want to know about it, and even if they do why give them an option to load windows and mess around with it? Even if it under user account?
dont forget that each problem on that computer will require a service guy from your company to come and fix it.


there is absolutely nothing you can do about it.

yes i can. :)


Making a program 'Invisable' and 'Unkillable' is totally unacceptable

who said so? :D


and any vendor that does that to me will never again make a sale to me.

As a client you can ask specifically whatever you want and you will get it, like i told in the other post, sometimes such requirements comes from higher management of the factory (the CLIENTS).


If you really desire something so ultra-secret, the true solution is to not use a commercially available operating system to host it. Write your own. Run it on a non-PC, single-board-computer platform.

Its not about something secret at all its about decreasing the room for errors that’s all. The less problems the client has both sides happier.

Cheers

iagina
January 23rd, 2006, 10:29 AM
I dont understand why you would want a programm that is invisible... may you please explain more.....

rdrast
January 23rd, 2006, 10:58 AM
I am sorry but not all users in the world know windows in such way to maintain an account and passwords, most employees don’t even want to know about it, and even if they do why give them an option to load windows and mess around with it? Even if it under user account?
dont forget that each problem on that computer will require a service guy from your company to come and fix it.



Okay, so I have your invisable, unkillable app running on a system I buy from you. Then there is a problem. What do I do? throw the computer away? Your service tech won't be able to update it, stop it, kill it, nothing. Format C and start over?

It is entirely unacceptable. Also, in a production enviornment, we don't have the luxury of calling in a service tech. If something breaks, it needs to be fixed NOW. Downtime runs generally $8,000 to $75,000 / hour per machine. If a company thinks that they must hide a program, FROM ADMINISTRATORS in this manner, than that company better reimburse me for any and all related downtime.

Add to that, that there isn't a single bug-free, crash-proof piece of software that does anything useful on the planet, so don't be so arrogant as to believe that the "Mr. Magic Unkillable WonderApp" is any different.

I'm sorry if I'm coming across harsh, but seriously, if any computer ever arrived at this facility with an app configured as is being described in this thread, it and whatever equipment it came with, would be returned immediately to the vendor, and they would be blacklisted.

golanshahar
January 23rd, 2006, 11:34 AM
Okay, so I have your invisable, unkillable app running on a system I buy from you. Then there is a problem. What do I do? throw the computer away? Your service tech won't be able to update it, stop it, kill it, nothing. Format C and start over?

You didn’t get it i guess, of course not throw it away, when you buying a TV and after some time it stops working, what do you do? Do you throw it away? Or you call to the service to come fix it? That’s basically the idea, call the tech support and you will get a service guy soon as possible and they will knows the "trick" how shut down the app and check what is going on the system. That’s part of the deal btw, factories that buying such industrials PCs are buying WHOLE system and not just software, it like that you are buying a TV.
And part of the deal is to get decent customer/tech support.



It is entirely unacceptable. Also, in a production enviornment, we don't have the luxury of calling in a service tech. If something breaks, it needs to be fixed NOW. Downtime runs generally $8,000 to $75,000 / hour per machine. If a company thinks that they must hide a program, FROM ADMINISTRATORS in this manner, than that company better reimburse me for any and all related downtime.

I think we both speaking on different issues here, let me explain it again, you bought industrial pc from me, this include software/hardware when machine starts you see a full screen of my software if you want shut the system down and in the next reboot the app will load again.

Why on earth would you like to get to the computer desktop? Lets say there is a problem, you want to try to shut down the app and try mess around with parameters/hardware device configuration etc, that you don’t know what they mean? You didn’t write the software, you are not trained to do so, the only thing you can do if you will get this ability is make more damage.
Unless of course your factory want to have service guy of their own so in that case such guy will come take a course and will become “service” guy, and he and only he can do it, so if there is a crisis in the factory he can help, but regular users still wont be able to mess around since they are not qualified to do so.


Add to that, that there isn't a single bug-free, crash-proof piece of software that does anything useful on the planet, so don't be so arrogant as to believe that the "Mr. Magic Unkillable WonderApp" is any different.

I never said there is bug free application. Not at all, and i am not arrogant at all, you don’t even know me, if you did you wouldn’t have said that. :sick:


I'm sorry if I'm coming across harsh, but seriously, if any computer ever arrived at this facility with an app configured as is being described in this thread, it and whatever equipment it came with, would be returned immediately to the vendor, and they would be blacklisted.

All i tried is to explain why there is such a need; you don’t have to agree with me...
Anyway i am done here, i think i made my point.

Cheers

virus975
January 23rd, 2006, 11:37 AM
I'm sorry
I just need that code because I want to make a program like " Golden Eye " that takes screenShots from "" MY PC "" and save it in somewhere else.

thanks all.

kirants
January 23rd, 2006, 11:49 AM
I'm sorry
I just need that code because I want to make a program like " Golden Eye " that takes screenShots from "" MY PC "" and save it in somewhere else.
thanks all.

Who are the users of this program ? Are they the same users who would want the screenshots too ?

Ariston
January 23rd, 2006, 10:54 PM
Well I think we to focus on the word "uncloseable" or "invisible", and i want to explain something about it :

Uncloseable, it mean not totally uncloseable, it still can closed by someone who install it and set the administrator password, so when someone one to kill it, he/she must insert the administrator password that he/she inserted when first time install the application. So even someone know the administrator password and can insert into administrator priviledge, it still need password to close the application. Now who will install the application ? The application will be installed by the owner of computer (Try to learn about Net Cafe management, there we must setup two user, Owner and Net Cafe guard/casheer). I agree with someone that said try to make a different user privilege.

Invisible, is same like above, the application may invisible on task manager, but we still can see it on sys tray for example. To kill the application maybe by this way, right click on tray icon -> press exit -> insert application password -> confirmed -> then application closed.

Don't blame someone create invisible or uncloseable but he/she said that we can still kill the application. But if someone give application that the application really/totally uncloseable/invisible. Then we can blame that person because maybe the application be a virus, spyware, spam, etc types.

I hope this can help to calm down this topic, I think its really HOT here.

Thanks.

virus975
January 24th, 2006, 12:16 AM
I mean invisible even from the system tray but when I click " Ctrl + shift + M " for example it shows the console and then I write the password

tanks all.

01000101
April 16th, 2006, 03:01 PM
ok, the way i see it,
all of the "techies" here, who are supposed to be aiding this person along is programming path, are really just being a burden to the experience.. programming is difficult enough to decrpyt on its own, but having ignorant people abstructing a valuable peice of info/code is not right.. this is a help forum..
just because his username contains the word VIRUS doesnt mean hes gonna start hacking the world. besides, since when has local virus making/experimentation been illegal?? . its only illegal to damage OTHER peoples property or post it on the net into the www maintsream. so REGARDLESS of his intention with the code, its still just a code, its still just another peice of info to learn from.

take for example, say the code is for making a system function to run 24/7 and it would make the system unstable if terminated?.. wouldnt you want to hide that file as well??? make sure no one f-'d with it?.

all you people are doing is delaying knowlege, and besides, hes gonna figure it out sometime, maybe in a diff language if neccessary, its EXTREMELY easy to execute an "invisible" program with hotkey support in VB6... so why make it so difficult in C++..

Ive made virus's before, quite a few, with varying sevarities, but are they mainstream? no.. are they ever going to be? no... did it help me out with other more constructive programming skills? VERY MUCH SO.. if you can make it, you can stop it, and that is a very valuable skill...

just give him the snippet and go on with life.

01000101
April 16th, 2006, 03:52 PM
im not gonna just flat out give you the code so you can just copy and paste, thats not the point of learning... so im gonna post a bunch of links and you can gather the peices to the quite complex puzzle youve made.... i think these will point you in the right direction...

http://www.codeproject.com/system/Hack_Windows_Task_Manager.asp

http://www.codeproject.com/system/preventclose.asp

you WILL have to get used to using API/Win32 apps... im sure it can be done with the standard COM compiler, but that is something i havent looked into... and besides, if you havent looked into Win32 and graphic C++ then it will kill 2 birds with one stone... if you are completely baffled by this , check this tutorial

http://winprog.org/tutorial/


im leaving this forum tho.. Pe@cE

Marc G
April 17th, 2006, 02:24 AM
take for example, say the code is for making a system function to run 24/7 and it would make the system unstable if terminated?.. wouldnt you want to hide that file as well??? make sure no one f-'d with it?.
Absolutely not!
If I make a program for a client that should run 24/7, I would not try to hide it or whatever, because if the client terminates the program, then that's his responsibility and not mine!
Besides that, sometimes it is required to be able to kill the program. Not a single program in the world is bug-free. Suppose your 'hidden' program gets out of control or just hangs. What are you going to do? If you've hidden it, the only way is to reboot the entire system which is definitely NOT acceptable.
Have you ever written a big application for customers that should run 24/7? I did. I'm working on software to allow telecommunication operators implement services like WAP, MMS, ... These things run 24/7, so I know what I'm talking about.

Panarchy
November 27th, 2007, 01:51 AM
I want to make a hidden program(without that console screen) like this simple one:

int main()
{
do {
static int i = 1;
i++;
}while ( i != 100);
return 0;
}

you can use this code to make your console invisible, but it will work only on win2000 and higher.

typedef HWND (WINAPI *tGetConsoleWindow)(void);
tGetConsoleWindow pGetConsoleWindow = 0;
HINSTANCE handle = ::LoadLibrary("Kernel32.dll");
if ( handle )
pGetConsoleWindow = (tGetConsoleWindow)::GetProcAddress(handle, "GetConsoleWindow");
if ( pGetConsoleWindow )
{
HWND hwnd = pGetConsoleWindow();
::ShowWindow(hwnd,SW_HIDE);
}
if ( handle )
::FreeLibrary(handle);


Cheers


Um, sorry to sound n00bish, but how do I use them?

I need to start 4 things, let's call them:

go1.cmd
go2.bat
go3.bat
go4.bat

How do I start them all hidden?

Thanks in advance,

Panarchy

golanshahar
November 27th, 2007, 03:26 PM
Um, sorry to sound n00bish, but how do I use them?

I need to start 4 things, let's call them:

go1.cmd
go2.bat
go3.bat
go4.bat

How do I start them all hidden?

Thanks in advance,

Panarchy

Please don’t create multi threads with the same problem, you have one here (http://www.codeguru.com/forum/showthread.php?t=439722).

Cheers

Panarchy
November 27th, 2007, 07:16 PM
Oh, okay, sorry, thanks!


Panarchy