manipulate the "ps" source code in order to hide a process
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
manipulate the "ps" source code in order to hide a process
hi..
how can i manipulate the source code of ps command in order to hide a process from the list that run by ps.
as you know ps command list all the process that exist in /proc.
so how can i do this??
this is part of my assingment...
plz response me as soon as possible...
thanks...
What do you mean, "part of your assignment" ? Is this schoolwork?
Forgive me, but it sounds like a rather sketchy assignment to me. What is the intention of hiding certain processes?
In any event, you seem to understand that you would need to edit the sourcecode of `ps` to accommodate your request. This would produce a new "tool" which would/should no longer be known as `ps`, since it would be somewhat defective compared to the REAL `ps` tool. You need to learn some C programming to do this.
Do you want someone to do the assignment for you? That won't happen. Show us what you've come up with so far, and *maybe* someone can point you in the right direction.
Answering this question may be contrary to LQ Rules: "Posts containing information about cracking, piracy, warez, fraud or any topic that could be damaging to either LinuxQuestions.org or any third party will be immediately removed". Thread reported for decision by the moderators.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339
Rep:
Quote:
Originally Posted by catkin
Answering this question may be contrary to LQ Rules: "Posts containing information about cracking, piracy, warez, fraud or any topic that could be damaging to either LinuxQuestions.org or any third party will be immediately removed". Thread reported for decision by the moderators.
And in what way is it cracking, piracy or warez?
GNU GPL = Source is suppose to be modified.
You know fully well what their concerns are. A hidden process suggests bad things at foot. Just like Aircrack is a fine piece of code, it's uses are typically less admirable.
Yes there is that, and as such I've not closed the thread. As for needing to remove itself? Can't see it personally. If you felt the need to do that, then you're probably using the wrong tool, and should use pgrep or someething else.
The OP hints its a school assignment.
And there is legit uses for example filtering out "ps" itself.
The OP wrote "this is part of my assingment" which may or may not be academic. It would be a strange academic assignment, having no obvious application in the (ethical) real world.
Note that the first reply already challenged the OP wrt homework or not. Echoing that post or trying to discuss the case before the OP replies clutters up this thread and does not help LQ, the OP or you.
hi friends..this mini project is part of my system security course.
by using one programming language like c, i have to change ps source code such that one existing process will be hided from the list which showed by running ps -a in console.
any help is helpful for me,because i don't know how to start.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.