LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-22-2016, 10:05 AM   #1
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
how to read memory from another users terminal


lets say you have a few people logged into a system like so:
Code:
[schneidz@hyper ~]$ who
alex     pts/0        2016-01-06 11:50 (:0)
beatrice pts/1        2016-01-07 15:41 (:0)
and then alex writes on his terminal:
Code:
[alex@hyper ~]$ my_super_secret_favorite_color=fucshia
is there a way for beatrice to know what alexs favorite color is ?
 
Old 01-23-2016, 04:22 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
UNIX architecture means separate resources. Unless you give away privileges via sudo or use root. Obviously doesn't apply to doing something like './some_app pass=fucshia;'...
 
1 members found this post helpful.
Old 01-23-2016, 04:41 AM   #3
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
The very idea of Unix/Linux is security. Any leakage of info or resources means a violation of the very foundation of that idea. It is that base idea that protects your system against infections...
Why dont you expand on what your goal is? Unless the question was a pure educational and hypothetical one, in that case I thank you for that question
Melissa
 
1 members found this post helpful.
Old 01-23-2016, 07:32 AM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,691
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
In pretty much any modern-day system, each user's "session" consists of a tree of independently-running processes. The memory owned by each process is "virtual," and private to itself. (If fifty processes wrote a number to "address $12345678," all of them would see what they wrote ... because none of them, in fact, would be addressing the same physical memory locations.) Likewise, processes and sessions own "credentials," such as their user-id and maybe other things, which they cannot tamper-with and must possess in order to do things. And, so it goes.

Monitoring another process's memory takes debugging facilities, and the permission to use them, and it is still a difficult and uncertain thing to do. (I rarely use "debuggers" to debug my programs.)

The most likely way that Eve would find out what Alice likes is by reading her private .bash_history file, but this file ordinarily has "rw-------" permissions, which means that only Alice can use it. But, if Eve could trick Alice into doing something that changes the permissions on that file, Eve might be able to snoop. (The .mysql_history file, if it exists, is generally more problematic since it might contain passwords.) Again, "and so it goes."

So, the operating system et al provides the means to maintain system security (and, to keep you from blowing-off your own foot ...), but: "security is a process." You have to know how the system works, and how it can be made to use against you. It takes constant vigilance, and a healthy dose of suspicion. You're taking a walk along the fortress walls on a beautiful night, watching for Hamlet's ghost and listening for digging sounds.
 
Old 01-23-2016, 12:12 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by Thor_2.0 View Post
The very idea of Unix/Linux is security. Any leakage of info or resources means a violation of the very foundation of that idea. It is that base idea that protects your system against infections...
Why dont you expand on what your goal is? Unless the question was a pure educational and hypothetical one, in that case I thank you for that question
Melissa
yup, just curiosity. i remember coming across a thread a while back talking about encrypting blocks of ram and was wondering what the point of that would be.
 
Old 01-23-2016, 12:29 PM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,269
Blog Entries: 24

Rep: Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206
Quote:
Originally Posted by schneidz View Post
...is there a way for beatrice to know what alexs favorite color is ?
Maybe.

You might want to look into the forensic tools, volatility and LiME.

I recently had my first exposure to these tools and was actually successful in recovering some important data from a memory snapshot. So, while you cannot "see" into another user's terminal, processes or virtual memory in real time (as far as I know), you can take a snapshot of real memory and pick it over after the fact...

You could then search for strings or by user or by file (process) name, etc, for my_super_secret_favorite_color and associate it with fucshia and the user.

I have had only the single occasion to use these, and it is anything but a point-and-click process, but I was ultimately successful at the task... so anyone can do it...

Last edited by astrogeek; 01-23-2016 at 12:36 PM.
 
Old 01-24-2016, 02:01 AM   #7
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
@ schneidz
Quote:
yup, just curiosity
Aaaah, the better human trait...
Melissa
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Read memory? southpau1 Linux - General 6 11-10-2011 09:52 AM
when i open new users terminal it starts in old users home event2000 Linux - Newbie 2 08-24-2011 01:10 PM
read english and arabic in terminal gamor Mandriva 2 04-23-2007 03:48 PM
read word on terminal? khucinx Programming 1 06-09-2004 04:04 AM
memory read tincat2 Linux - Hardware 3 08-24-2002 08:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration