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

Find sudo from PATH #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Find sudo from PATH #2

wants to merge 1 commit into from

Conversation

fluks
Copy link

@fluks fluks commented Oct 8, 2019

Find sudo wherever it may be.

I allocated memory, is that ok?

In my commit, on line 197, the compiler complained about possibly truncating a string, so I used a larger buffer(PATH_MAX) for command.

And when finding the first sudo in PATH, I just ignore the first path, since it should be the one the attacker has added. I think it should be correct? Because of this, hunter@nsa:~$ ./sudo whoami line in README.md might not work if there's only one sudo in the PATH.

Find sudo wherever in PATH it may be.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant