I would like to know how secure memory is and PHP's usage of it were a hacker to gain full access to the server.

Lets say this happens:

  1. User visits login.domain.com
  2. Generates a cookie which stores a unique unlock key
  3. User is redirected to secure.domain.com which reads said cookie and decrypts the users data row

(Where both domains are hosted on completely separate servers so key & data are not in the same place)

Were someone to gain access to the server at the same point as 3 is occurring - how easy is it for someone to also see/read the Cookie's content from the user? Equally if PHP is simply processing variables etc how easy is it for them to be read too?

I appreciate that no system is ever 100% secure but I want to make sure that there is nothing obvious that can be done apart from management of access to the server in the first place (considering its hosted by one of the top 20 hosting companies).

1 Answer 1


If they have root access to the server, they have full control over it. It's as easy as hooking up a strace to the webserver process, and they will exactly see what PHP does, what the content of the variables are, what files it writes, etc. This includes the cookies too, of course.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .