Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Challenge exposed in process list #44

Closed
HacKanCuBa opened this issue Feb 17, 2019 · 5 comments
Closed

Challenge exposed in process list #44

HacKanCuBa opened this issue Feb 17, 2019 · 5 comments
Labels

Comments

@HacKanCuBa
Copy link

Hello there! I was checking your scripts and I noticed that you pass the password to the ykchalresp bin as part of its command line, thus exposing it to the system:

YKFDE_RESPONSE="$(ykchalresp -"$YKFDE_CHALLENGE_SLOT" "$YKFDE_CHALLENGE" 2>/dev/null | tr -d '\n')"

If you run top or htop you will see the password shows up there. The same happens in the initram script, but on that scenario is not so dangerous. However, on the already booted up scenario, having the password shown as part of the command is VERY dangerous.

I haven't used ykchalresp but a better approach would be to pass the password like: printf "%s" "$P1" | ykchalresp -2 - or something like that (we need to test this).

@HacKanCuBa
Copy link
Author

HacKanCuBa commented Feb 17, 2019

BTW, this code is somewhat similar to cornelinux/yubikey-luks, and thus has this same issue.

@Vincent43
Copy link
Collaborator

@HacKanCuBa great find! I'll look into it.

@Vincent43
Copy link
Collaborator

@HacKanCuBa This should be fixed in 6aa15b9 . Thank you again for reporting this.

@Vincent43 Vincent43 changed the title Password exposed in process list Challenge exposed in process list Feb 17, 2019
@Vincent43 Vincent43 added the bug label Feb 17, 2019
@HacKanCuBa
Copy link
Author

Awesome! I checked the commit and seems fine.

Thank you!

@agherzan
Copy link
Owner

Nice report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants