Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
Right now I'm doing a homework project for CS that requires me to write down everything that I do on my PC for a week. Because that would be extremely tedious, I'm getting Linux to do that for me. I'm aware that Linux already logs most user activity, but there are a few things that it doesn't (from what I can tell). I would like to be able to get Linux to record what programs I have opened, what websites I have accessed, how long I was using it for, etc. It would be ideal if it could group everything into two hour blocks and not require too much editing to make it look nice (this is a group project so I want it to be easy to read). How can I do this? I'm running Fedora 27. (I also posted this in the general section, but I think people here will probably know more about logging, though it's not really in a security context)
i doubt a readymade software exists for that!
a combination of Xorg logs and a keylogger might be enough.
or you have to really actually record your screen all the time, but that would create enormous output!
i doubt a readymade software exists for that!
a combination of Xorg logs and a keylogger might be enough.
or you have to really actually record your screen all the time, but that would create enormous output!
Somebody in the general section suggested recording, but I don't have enough space for the output + it would take ages to sift through all the recording, so I'm not doing that, especially since I keep my system on 24/7. I might be able to write my own python or bash script that can detect when the system tries to request a web page from a server and to write the IP and the time that it happened in a file somewhere, but I'm not really sure how I would do the same for everything else. I'm currently running XWayland, I'm not sure if XWayland logs files but I would presume it does, so they should be helpful (I could potentially write another script that reads changes to those logs and puts certain parts of it into a file or something similar). It's disappointing that there aren't any software made for this kind of thing, I'm sure some people would find it useful.
i'm sure wayland logs.
that, plus a keylogger, should go 75% of the way.
have you searched?
Yeah, like I said I presume it does. Yeah, I have done some searching, you and the people on the thread I created in the general section also haven't heard of software that does this so it sounds like it probably doesn't exist. A keylogger and wayland logs should be most of what I need. but like you said that's only 75% and I would prefer to be able to log everything if possible (though I don't really need it to go into tons of details).
Yeah, I have done some searching, you and the people on the thread I created in the general section also haven't heard of software that does this so it sounds like it probably doesn't exist.
Location: Fleury-les-Aubrais, 120 km south of Paris
Distribution: Devuan, Debian, Mandrake, Freeduc (the one I used to work on), Slackware, MacOS X
Posts: 251
Rep:
Impossible
The things you want to log are on too much different levels to be scanned by a single program. Happily GNU/Linux isn't micro$oft window$ NT and so it don't send to a telemetry micro$oft server everything the user does.
For what you did in a browser there is since ages a browser history in any browser I can remember.
ps -aux (or ps aux, whatever the syntax is). same since suse 6.2 or earlier
--
I agree it boils down what you want to gather. Than you need to use some sort of daemon and logfile. Whatever you call it
--
Gathering data is one point.
Using that data in some sort of fashion is the other issue.
You better combine that so you do not end up with lots of useless data.
--
/var/log/messages at least tells you when the box had booted, and I am quite sure when you have shut it down.
It has a decent timestamp, AFAIK in seconds since DAY X, Time Y-Z-A
I would set an alias for all your user software which includes spamming a single line to messages.
You may find a way also to log when you terminate a process somehow.
So you have a nice logfile which you can parse.
--
Also read what the kernel has to offer. I think there are some "debug" features which can be for sure abused in this fashion too.
How is "capturing" anything fulfilling that requirement?
Experience is often "very tedious" to acquire, and writing things down supports memory and learning.
I think you are missing the reason for the writing.
tedious? Wait until you have to physically read
Code:
man bash
!!
I'd ask the teacher if "logging" will suffice. You may find out something you didn't know.
Good Luck.
To add to this, the point of the assignment may have absolutely nothing to do with exacting duplication of commands and/or mouse clicks. Instead it may have to do with a higher level of awareness as to what people use computers for. Perhaps what your instructor is looking for instead is:
Surfing the web
Reading email
Writing documents
And maybe they'll want an estimate of time spent doing those things.
One reason why I'm saying exactly this is because of having been given similar assignments, done exactly what the mass of people do, which is to find one or several highly detailed technical answers. Only to find out that most of us were 100% incorrect. There's always that one student who gets the gold star and answered what the teacher really was looking for.
+1 #12. Yes, ask instructor for clarification.
(IF a concepts class & instructor doesn't say "yes, every cmd/www-page/...",
especially then it may be the 'trick'/conceptual question #12 suggests!!!)
Quote:
Just about everything you do on your PC begins—or can begin—with your Start menu.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.