Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 7th, 2006, 3:13 AM   #1
ProjectX
Programmer
 
ProjectX's Avatar
 
Join Date: Feb 2005
Posts: 37
Rep Power: 0 ProjectX is on a distinguished road
need serious help

hey guys, how do i make a program to run like a process in the system everytime the computer starts? And is it possible to make the program invisible?
ProjectX is offline   Reply With Quote
Old Sep 7th, 2006, 3:50 AM   #2
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,207
Rep Power: 5 grumpy is on a distinguished road
The techniques depend on operating system.

If you're developing for windows NT/2000/XP, partial answers follow.

You need to develop a windows service (a particular type of program, using specific programming methods so it behaves correctly). Once you've developed such an application, it is necessary to install it so it starts during system startup (and that requires administrator privileges on the target machine).

There are several techniques to make a program "invisible", depending on what you mean by "invisible". If your meaning is that it has windows but none are visible, then the technique is easy: one attribute of windows is whether it is visible or not. If your meaning is not appearing on the task bar, or not appearing in the process list (eg through Task Manager) the techniques are a little more difficult.
grumpy is offline   Reply With Quote
Old Sep 7th, 2006, 10:06 AM   #3
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
It looks like he might want to develop some kind of malware.
__________________

tempest is offline   Reply With Quote
Old Sep 7th, 2006, 1:36 PM   #4
Edgar
Programmer
 
Edgar's Avatar
 
Join Date: May 2006
Location: Bathroom
Posts: 43
Rep Power: 0 Edgar is on a distinguished road
yep that is what he wnats, create a malware
Edgar is offline   Reply With Quote
Old Sep 7th, 2006, 5:54 PM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
You don't know that. While these tactics are routinely employed by malware authors, they also have legitimate uses - otherwise there wouldn't be any way to do them.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Sep 7th, 2006, 8:15 PM   #6
ProjectX
Programmer
 
ProjectX's Avatar
 
Join Date: Feb 2005
Posts: 37
Rep Power: 0 ProjectX is on a distinguished road
well no im not writing malware. Ive just always wondered how to do that
ProjectX is offline   Reply With Quote
Old Sep 7th, 2006, 9:47 PM   #7
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,207
Rep Power: 5 grumpy is on a distinguished road
Hope so, ProjectX. I would personally describe malware authors as scum of the earth, except that scum has some redeeming characteristics.
grumpy is offline   Reply With Quote
Old Sep 9th, 2006, 2:32 PM   #8
Narue
Professional Programmer
 
Narue's Avatar
 
Join Date: Sep 2005
Posts: 419
Rep Power: 3 Narue is on a distinguished road
>I would personally describe malware authors as scum of the earth
Scum is actually considered a delicacy in some countries. Maybe we should send malware authors on a one way trip to one of them.

...

But don't start that policy until I perform a permanent delete on all of my virus code trees. :p

>Ive just always wondered how to do that
Well, let's assume the two most common systems. In a POSIX environment you would implement a daemon by forking a new process and killing the parent. This is assuming a legitimate daemon because it's still user visible and killable. To make a daemon completely invisible is much harder, especially if you want to hide it from a superuser. Since that's crossing the boundaries of malware, I'll refrain from explaining the process. The meat of a basic daemon would be something like this:
if ( fork() == 0 ) {
  fclose ( stdin );
  fclose ( stdout );

  for ( ; ; ) {
    /* Perform payload after a certain interval forever */
    payload ();
    sleep ( interval );
  }
}
else {
  /* Kill parent process */
  exit ( 0 );
}
Windows is harder, but the concept is pretty simple and you have more options. The first option is a valid Windows service, which is an ideal solution for legit programs. Malware will typically take the low road where a basic Win32 application is created but no window is drawn and taskbar icons are hidden. It's pretty straightforward, but the code is kind of long, so I won't post it. Once again, really hiding the process is more involved and screams nasty program, so I won't describe how to do it.
__________________
Even if the voices aren't real, they have some pretty good ideas.
Narue is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Good game programming books? Serious question gardon C++ 9 Mar 2nd, 2005 9:49 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:12 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC