LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-27-2015, 05:17 PM   #1
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Rep: Reputation: 57
Is it possible that RAM is encrypted too, without special hardware?


It may be a long shot, but can the entire RAM be encrypted with some simple sort of encryption whereby the key is held in cpu registers?

Last edited by Ulysses_; 03-27-2015 at 05:20 PM.
 
Old 03-27-2015, 06:57 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
No. (pretty darn sure)
 
Old 03-27-2015, 07:26 PM   #3
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
What do you want to accomplish ?
 
Old 03-28-2015, 03:37 AM   #4
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Maybe run arbitrary software with an emulator or hypervisor that intercepts all access to ram encrypting/decrypting the data so real ram is always encrypted and a core dump does not reveal what the software is processing. A core dump is possible by an adversary that owns the hardware (VPS hoster).
 
Old 03-28-2015, 06:00 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Ulysses_ View Post
Maybe run arbitrary software with an emulator or hypervisor that intercepts all access to ram encrypting/decrypting the data so real ram is always encrypted and a core dump does not reveal what the software is processing. A core dump is possible by an adversary that owns the hardware (VPS hoster).
A VPS hoster can make a a snapshot from the entire machine, including the CPU registers, at any given time, so this excercise would be moot.
 
Old 03-28-2015, 08:12 AM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I was intrigued by this concept so I did some googling and it would appear that it has been tried and there should be a proof of concept out there:
http://ieeexplore.ieee.org/xpl/login...mber%3D5655081
While encrypting RAM contents is probably not all that much of a defense I can see it making it tougher for a provider to snoop and if there are any built-in snooping measures I wouldn't have thought they would expect encrypted RAM -- so, perhaps, there is some use in doing this?
 
1 members found this post helpful.
Old 03-28-2015, 08:44 AM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
This may work on bare metal machines, but that simply doesn't apply to VMs.
 
Old 03-28-2015, 08:59 AM   #8
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by TobiSGD View Post
This may work on bare metal machines, but that simply doesn't apply to VMs.
I meant that, for example, if the VPS provider takes automated memory dumps of machines for "auditing" purposes they're not going to be of much use if most data is encrypted. In other words I know that if the VPS provider is aware of these things they could employ countermeasures but automated systems could be defeated.
Whether that is "enough security" is another question entirely, of course.
 
Old 03-28-2015, 09:00 AM   #9
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Does it matter if it is a vmware VM, not a VPS?

Vmware VM's look very much like real hardware from the inside, complete with a BIOS etc and therefore capable of running any PC operating system.

Last edited by Ulysses_; 03-28-2015 at 09:08 AM.
 
Old 03-28-2015, 09:18 AM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Any VM, regardless if it is VMware, Virtualbox, KVM, ..., allows the host running the VM to make snapshots of the running machine, including all encryption keys (this is what happens when you suspend the VM, only that the VM is shut down afterwards). If they have the keys, encryption is no protection at all
 
Old 03-28-2015, 09:21 AM   #11
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Someone has already found enough space for the keys in the cpu for some reason:

Quote:
TRESOR is a software approach that seeks to resolve this insecurity by storing and manipulating encryption keys almost exclusively on the CPU alone ... TRESOR is written as a kernel patch that stores encryption keys in the x86 debug registers
https://en.wikipedia.org/wiki/TRESOR...R.27s_approach
 
Old 03-28-2015, 09:36 AM   #12
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Sure all cpu registers must appear in a core dump, even if AES-NI is supported?
Quote:
Its developers state that "running TRESOR on a 64-bit CPU that supports AES-NI, there is no performance penalty compared to a generic implementation of AES",[5] and run slightly faster than standard encryption despite the need for key recalculation, a result which initially surprised the authors as well
 
Old 03-28-2015, 09:39 AM   #13
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by TobiSGD View Post
Any VM, regardless if it is VMware, Virtualbox, KVM, ..., allows the host running the VM to make snapshots of the running machine, including all encryption keys (this is what happens when you suspend the VM, only that the VM is shut down afterwards). If they have the keys, encryption is no protection at all
Indeed, they even have them when stored in debug registers as per the abobe posted TRESOR. However, as I mentioned previously, it would depend upon what the VPS host does as regards monitoring. Again though I'm not suggesting this is security which could be relied upon but wonder whether it would frustrate any routine "records keeping" by a provider. Sadly I don't know how VPS provisers work as I never got past the interview stage when I attempted to work for one.
 
Old 03-28-2015, 11:08 AM   #14
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Ulysses_ View Post
Sure all cpu registers must appear in a core dump, even if AES-NI is supported?
I am not talking about core dumps. A VPS hoster can save the machine's state at any given time, including RAM and all CPU registers.
 
Old 03-28-2015, 11:22 AM   #15
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
In conclusion, yes you can encrypt RAM, but no it won't help you if the VPS host owns the hardware and is the adversary.
 
  


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] 14.1 on old hardware with 512M RAM enine Slackware - Installation 13 08-25-2014 11:00 AM
Hardware encrypted USB flash Drives joboy General 4 06-01-2013 02:34 PM
do i need special hardware other than video card to enable 3D direct rendering babu198649 Linux - Newbie 2 04-26-2008 02:48 AM
Talking to laptop hardware (sound, touchpad, display, special keys, ..) marsm Linux - Laptop and Netbook 1 02-11-2007 06:43 AM
Hardware for special box Conpen2000 Linux - Hardware 1 09-12-2004 10:43 AM

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

All times are GMT -5. The time now is 06:25 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