I am creating a batch job package that requires regular access to a database running on a Solaris 10 machine. Due to (irreversible) design limitations, we need to use a specific program to connect to it. The specified interface requires that we pass a text password on the command line to connect to the database. This is a terrible security practice, but we are stuck with it.
I try to ensure that everything is securely fixed on our side. Since processing is automated (i.e., we cannot request a password), and I cannot store anything outside the disk, I need a strategy to safely store our password.
Here are some basic rules.
That's what i still have
Although I'm sure there is a better way.
This is not a cryptography solution. No matter which cipher is used, the key will be equally accessible to the attacker. Cyrpto does not solve all problems.
chmod 400 , . chmod 600 , . , chown'ed , . , . , . , , . SELinux AppArmor - / .
Edit: Shread - , .
: Moron/Mike unix ps aux , . , : wget ftp://user:password@someserver/somefile.ext. CURL. . bash , export HISTFILE=
ps aux
wget ftp://user:password@someserver/somefile.ext
export HISTFILE=
, . . - . .
- . "ps", , . , , . , . , , . , , , .
, , . script, , script . , . , .
, . , . ,
, . , "ps" . deadbolt , .
, . , , , , .
prctl (2) PR_SET_NAME . , , ptrace (2), , , :/
, grsecurity CONFIG_GRKERNSEC_PROC_USER:
"Y", , root, , , .
ps , ps /proc/<pid>/cmdline
ps
/proc/<pid>/cmdline
The specified interface requires us a text password at the command to connect to the database. This is a terrible security practice, but we are stuck with it.
This is only a bad security practice due to problems in the O / S architecture. Do you expect other users to be able to intercept your system calls? I would not blame the developer who fell into this trap.