Skip to content

Edit sudo facter command. Env variable isn't needed#490

Closed
Sht1n wants to merge 1 commit intoGTFOBins:masterfrom
Sht1n:Sht1n-facter-update
Closed

Edit sudo facter command. Env variable isn't needed#490
Sht1n wants to merge 1 commit intoGTFOBins:masterfrom
Sht1n:Sht1n-facter-update

Conversation

@Sht1n
Copy link
Contributor

@Sht1n Sht1n commented Jan 28, 2025

Hi

Setting environment variable in sudo requires permissions for preserve the environment also (env_check, or env_keep options). So without this permissions escalation via variable fails. However, environment variable isn't needed for facter binary escalation. We can use --custom-dir flag instead

Tested on CentOS 7 and Oracle Linux 9.

Setting environment variable in sudo requires permissions for preserve the environment also (env_check, or env_keep options).
However, environment variable doesn't need for facter binary escalation
@GTFOBins GTFOBins deleted a comment from HackingRepo Jan 28, 2026
@cyrus-and
Copy link
Member

Added in fffc249, thanks!

@cyrus-and cyrus-and closed this Jan 28, 2026
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.

2 participants