題目:test普通用戶嘗試讀取/root/README
首先發(fā)現(xiàn)root目錄是其他用戶不可讀的
[test@ALICTF ~]$ ls -al /
dr-xr-x---. 2 root root 4096 Sep 10 14:07 root
然后在提示之下嘗試sudo su 成功了,終于可以讀取/root 目錄,但是發(fā)現(xiàn)README文件怎么都讀取不了。
[root@ALICTF test]# id
uid=0(root) gid=0(root) groups=0(root) context=_
[root@ALICTF test]# ls -al /root
ls: /root/install.log: Permission denied
ls: /root/README: Permission denied
ls: /root/anaconda-ks.cfg: Permission denied
ls: /root/install.log.syslog: Permission denied
total 96
dr-xr-x---. 2 root root 4096 Sep 10 14:07 .
dr-xr-xr-x 25 root root 4096 Sep 22 07:20 ..
-rw------- 1 root root 1423 Sep 10 10:11 anaconda-ks.cfg
-rw------- 1 root root 2091 Sep 22 07:18 .bash_history
-rw-r--r-- 1 root root 18 May 20 2009 .bash_logout
-rw-r--r-- 1 root root 176 May 20 2009 .bash_profile
-rw-r--r-- 1 root root 176 Sep 22 2004 .bashrc
-rw-r--r-- 1 root root 100 Sep 22 2004 .cshrc
-rw-r--r-- 1 root root 30601 Sep 10 10:11 install.log
-rw-r--r-- 1 root root 7346 Sep 10 10:10 install.log.syslog
-rw-------. 1 root root 41 Sep 10 14:07 .lesshst
-rw-r--r-- 1 root root 101 Sep 10 12:49 README
-rw-r--r-- 1 root root 129 Dec 3 2004 .tcshrc
-rw-------. 1 root root 5141 Sep 10 13:30 .viminfo
[root@ALICTF test]# cat /root/README
cat: /root/README: Permission denied
最終由大牛提醒用sudo debugfs 加cat 來讀取。因此本題關(guān)鍵詞是smack 和debugfs。?