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

SCE & run scripts without permissions #528

Closed
ybznek opened this issue Sep 16, 2016 · 2 comments
Closed

SCE & run scripts without permissions #528

ybznek opened this issue Sep 16, 2016 · 2 comments
Labels

Comments

@ybznek
Copy link
Contributor

ybznek commented Sep 16, 2016

According to open-scap mailing list,

we are not able to execute SCE scripts without exec permissions (e.g. from /tmp with noexec mount option.)

In my opinion, we can parse shebang from script and use interpret to run it (/usr/bin/bash /tmp/sce.sh) - in similar way we run remediations. Can we run binary files in such way?

@ybznek ybznek added this to the 1.2.11 milestone Sep 16, 2016
@ybznek
Copy link
Contributor Author

ybznek commented Sep 16, 2016

@mpreisler You are much more familiar with SCE, can you please share your thoughts?

@mpreisler
Copy link
Member

There are various tricks to do that, for example:

/usr/lib64/ld-linux-x86-64.so.2 /usr/bin/ls

It's tough to create a portable one. This will be different for linux32, linux64, bsd, OSX, ...

If we decide to do any of these tricks we should implement something like oscap-run-sce-script.sh which wraps all of them so we don't keep them in the C code. That also means that we will be shipping a ready-made execute permission bypassing code but to be honest everybody knows about these tricks so I don't think it matters that much.

@jan-cerny jan-cerny modified the milestones: 1.2.12, 1.2.11 Oct 14, 2016
@mpreisler mpreisler modified the milestones: 1.2.13, 1.2.12 Nov 15, 2016
@mpreisler mpreisler modified the milestones: 1.2.13, 1.2.14 Jan 5, 2017
@mpreisler mpreisler modified the milestones: 1.2.15, 1.2.14 Feb 28, 2017
@jan-cerny jan-cerny modified the milestones: 1.2.16, 1.2.15 Aug 17, 2017
@matejak matejak modified the milestones: 1.2.16, 1.2.17 Nov 13, 2017
@jan-cerny jan-cerny modified the milestones: 1.2.17, 1.2.18 May 29, 2018
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

4 participants