Skip to contentSkip to conversation

forbid to strace a program

DISCUSSION Andreas Hartmann 4 participants 4 messages Sep 4, 2005 – Sep 5, 2005 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 7 lines · Chase Venters
Quoted 7 lines

Is there another way to do this? If the password is crypted, I need a passphrase or something other to decrypt it again. Not really a solution of the problem.

Therefore, it would be best, to hide it by preventing stracing of the application to all users and root.

Quoted 8 lines
Quoted 2 lines

Ok, root could search for the password directly in the memory, but this would be not as easy as a strace.

Obfuscation isn't really valid security. Making something 'harder' to break isn't a solution unless you're making it hard enough that current technology can't break it (eg... you always have the brute force option, but good crypto intends to make such an option impossible without expending zillions of clock cycles).

You're right. If I would have a solution, which could do this, I would prefer it.

Quoted 2 lines

Can I ask why you want to hide the database password from root?

It's easy: for security reasons. There could always be some bugs in some software, which makes it possible for some other user, to gain root privileges. Now, they could easily strace for information, they shouldn't could do it. The password they could see, isn't just used for the DB, but for some other applications, too. That's the disadvantage of general (single sign on) passwords.

Kind regards,
Andreas Hartmann

#5 lore raw

Hi Andreas,

Quoted 6 lines · Andreas Hartmann
Quoted 1 line

Can I ask why you want to hide the database password from root?

It's easy: for security reasons. There could always be some bugs in some software, which makes it possible for some other user, to gain root privileges. Now, they could easily strace for information, they shouldn't could do it.

Then you're loosing your time. If the user gains root privileges, then he can do what he wants to get the password, including loading modules or scanning the memory. For instance, it happened to me several times that my browser crashed during a post with a very long message. Not funny at all. Then, as root, I started my hex editor and scaned all memory for words I was sure I wouldn't find anywhere else, and then I could restore my data by hand. Doing so to find a password is pretty easy too. And don't tell me that it's deleted very soon, because it's also possible to send lots of SIGSTOP/scan/SIGCONT very fast to try to catch the clear password.

Quoted 3 lines

The password they could see, isn't just used for the DB, but for some other applications, too. That's the disadvantage of general (single sign on) passwords.

can't you use a specific password just for this app ? or use another server on which no user has access to relay your connections and insert the right password itself ?

Regards,
Willy

#6 lore raw
In reply to Andreas Hartmann
Quoted 21 lines · Andreas Hartmann
Quoted 7 lines · Chase Venters
Quoted 7 lines

Is there another way to do this? If the password is crypted, I need a passphrase or something other to decrypt it again. Not really a solution of the problem.

Therefore, it would be best, to hide it by preventing stracing of the application to all users and root.

Quoted 8 lines
Quoted 2 lines

Ok, root could search for the password directly in the memory, but this would be not as easy as a strace.

Obfuscation isn't really valid security. Making something 'harder' to break isn't a solution unless you're making it hard enough that current technology can't break it (eg... you always have the brute force option, but good crypto intends to make such an option impossible without expending zillions of clock cycles).

You're right. If I would have a solution, which could do this, I would prefer it.

Quoted 1 line
Quoted 9 lines
Quoted 1 line

Can I ask why you want to hide the database password from root?

It's easy: for security reasons. There could always be some bugs in some software, which makes it possible for some other user, to gain root privileges. Now, they could easily strace for information, they shouldn't could do it. The password they could see, isn't just used for the DB, but for some other applications, too. That's the disadvantage of general (single sign on) passwords.

I'm no security expert, but if root privileges are compromised,
there's no way to plug anything. A kernel module can be loaded to do just about anything. Signals can be sent to obtain core dumps. Binaries can be switched. Network traffics can be sniffed. Kernel image can be replaced and rebooted while no one is watching without leaving any record.

If security is important for your application, move the application
into a separate machine in a physically protected place and use very restrictive firewall. Plugging strace() will make little (if any) change w.r.t. security.

Signature · 1 line
tejun
#7 lore raw
In reply to Andreas Hartmann
Quoted 1 line · Andreas Hartmann

Chase Venters wrote:

[...]

Quoted 6 lines
Quoted 2 lines

Can I ask why you want to hide the database password from root?

It's easy: for security reasons. There could always be some bugs in some software, which makes it possible for some other user, to gain root privileges. Now, they could easily strace for information, they shouldn't

Forget it.
You cannot hide anything seriously from root (or equivalent users on other OSes and so-called OSes) with such attempts (independent how the process got root - with the correct password or through a security hole somewhere).
Consider the case that root installed a (patched) DB-server which dumps the passwords in some logfile. Or root logs from the authentication framework (be it PAM or something else)

Quoted 3 lines

could do it. The password they could see, isn't just used for the DB, but for some other applications, too. That's the disadvantage of general (single sign on) passwords.

So either you get your own machine or you use different passwords for different services.

Bernd

Signature · 3 lines
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services