Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have written a command line application in C++ that is used to access an online user account via a SOAP API. In order to avoid having any login details written to file anywhere on my machine for security purposes, I decided to write the application as taking the username and passwords as command line arguments. I then found that upon running a ps -aux command that those sensitive arguments are actually visible in the process list. Is there anyway that these can be masked? I am probably being overly sensitive about the security aspects here but I would like to avoid this data being accessible in any way.

If not, are there any other options available other than using encryption algorithms to decrypt this data from a file or passing in encrypted command line arguments?

share|improve this question

1 Answer 1

The kernel maintains internal pointers to the start and end of the arguments array in the process address space. So, you have to do it in tricky way. You will find a brief explanation here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.