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

[Tests] Testcase to ensure deny_remote can't be bypassed with a cup of "sudo tee" #46

Open
mcdope opened this issue Feb 13, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@mcdope
Copy link
Owner

mcdope commented Feb 13, 2021

(for some required knowledge see #39, maybe also #8, and the associated PRs)

We need a testcase for the functional testing to ensure deny_remote can't be bypassed by remote users with stuff like used in #39.

For this a ssh session needs to be done after configuring (deny_remote enabled), testing some sudo command doesn't work, then trying the same like in #39 and verifying that it doesn't work. But guess we can't use vi there since it's interactive....

@mcdope mcdope added enhancement New feature or request help wanted Extra attention is needed labels Feb 13, 2021
@mcdope
Copy link
Owner Author

mcdope commented Feb 13, 2021

Currently the testing REQUIRES deny_remote to be disabled. So this would need to download the generated deb back to the github runner, installing & configuring it there again and then running the test. But that wont work because the missing usb gadget support on the github runner. The test would need to create a user on the runner, configure it for pamusb, connect to our runner, which then connects back by ssh (not using pamusb) and tries to use the "sudo tea".

... annoying.

@mcdope mcdope added this to the 1.0.0 milestone Mar 1, 2021
@mcdope mcdope removed this from the 1.0.0 milestone Aug 31, 2021
@mcdope
Copy link
Owner Author

mcdope commented May 25, 2022

Maybe if we use docker container for testing instead of remote host we could use a serial console, which would then allow keeping deny_remote disabled while also having a ssh host to connect to and try the cup of tea...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant