3 ms·
shabble@host:~$ cp /bin/chmod /tmp/chmoo shabble@host:~$ chmod 600 /tmp/chmoo shabble@host:~$ ll /tmp/ch* -rw------- 1 shabble shabble 59K Nov 21 17
by shabble 9y ago
shabble@host:~$ cp /bin/chmod /tmp/chmoo
shabble@host:~$ chmod 600 /tmp/chmoo
shabble@host:~$ ll /tmp/ch*
-rw------- 1 shabble shabble 59K Nov 21 17:15 /tmp/chmoo
shabble@host:~$ /tmp/chmoo
-bash: /tmp/chmoo: Permission denied
shabble@host:~$ /lib64/ld-linux-x86-64.so.2 /tmp/chmoo
/tmp/chmoo: missing operand
Try '/tmp/chmoo --help' for more information.
- ansible 9y agoWell, that's a new one on me. I'd just have 'cat'ted the chmod executable onto some other executable, which keeps the permissions.
- AnIdiotOnTheNet 9y agoThis technique fails if chmod is compiled statically.