suid位,sgid位及setuid(),setgid()函数实测情况
来源:互联网 发布:mac repo 下载失败 编辑:程序博客网 时间:2024/05/17 01:50
suid 标识位,可执行程序文件以所有者的身份被执行
1039进程sh
root@generic:/system/bin # cat /proc/1039/status
cat /proc/1039/status
Name: sh
State: S (sleeping)
Tgid: 1039
Pid: 1039
PPid: 1033
TracerPid: 0
Uid: 2000 2000 2000 2000
Gid: 2000 2000 2000 2000
755情况
root@generic:/system/bin # ls -all | grep test_while
ls -all | grep test_while
-rwxr-xr-x root root 109420 2015-06-23 22:37 test_while
root@generic:/system/bin # ps | grep test_while
ps | grep test_while
shell 1042 1039 272 68 00000000 0000823c R ./test_while
root@generic:/system/bin # cat /proc/1042/status
cat /proc/1042/status
Name: test_while
State: R (running)
Tgid: 1042
Pid: 1042
PPid: 1039
TracerPid: 0
Uid: 2000 2000 2000 2000
Gid: 2000 2000 2000 2000
4755情况
root@generic:/system/bin # ls -all | grep test_while
ls -all | grep test_while
-rwsr-xr-x root root 109420 2015-06-23 22:37 test_while
root@generic:/system/bin # ps | grep test_while
ps | grep test_while
root 1073 1039 272 68 00000000 0000823c R ./test_while
root@generic:/system/bin # cat /proc/1073/status
cat /proc/1073/status
Name: test_while
State: R (running)
Tgid: 1073
Pid: 1073
PPid: 1039
TracerPid: 0
Uid: 2000 0 0 0
Gid: 2000 2000 2000 2000
6755情况
root@generic:/system/bin # ls -all | grep test_while
ls -all | grep test_while
-rwsr-sr-x root root 109420 2015-06-23 22:37 test_while
root@generic:/system/bin # ps | grep test_while
ps | grep test_while
root 1085 1039 272 68 00000000 0000823c R ./test_while
root@generic:/system/bin # cat /proc/1085/status
cat /proc/1085/status
Name: test_while
State: R (running)
Tgid: 1085
Pid: 1085
PPid: 1039
TracerPid: 0
Uid: 2000 0 0 0
Gid: 2000 0 0 0
调用setuid(0)情况
root@generic:/system/bin # cat /proc/1229/status
cat /proc/1229/status
Name: test_while_setuid
State: R (running)
Tgid: 1229
Pid: 1229
PPid: 1039
TracerPid: 0
Uid: 0 0 0 0
Gid: 2000 0 0 0
调用setuid(0),setgid(0) 情况
root@generic:/system/bin # cat /proc/1260/status
cat /proc/1260/status
Name: test_while_setu
State: R (running)
Tgid: 1260
Pid: 1260
PPid: 1039
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
注:在/data/local/tmp目录无效。
测试文件权限:
root@hwH30:/data/local/tmp # ll | grep vnc1.out
ll | grep vnc1.out
---s--x--x root root 207368 2016-05-24 15:03 vnc1.out
shell执行文件:
shell@hwH30:/data/local/tmp $ ./vnc1.out
./vnc1.out
Initializing grabber method...
No grabber method selected, auto-detecting...
--Initializing framebuffer access method--
line_lenght=2880 xres=720, yres=1280, xresv=720, yresv=3840, xoffs=0, yoffs=0, bpp=32
Initializing virtual keyboard and touch device...
---Initializing uinput...---
cannot create virtual kbd device.
Initializing VNC server:
width: 720
height: 1280
bpp: 32
port: 5901
Colourmap_rgba=16:8:0:24
length=8:8:8:8
SEND BUFFER SET 0
15/02/2017 17:16:52 Listening for VNC connections on TCP port 5901
SEND BUFFER SET 0
15/02/2017 17:16:52 Listening for HTTP connections on TCP port 5801
15/02/2017 17:16:52 URL http://localhost:5801
Starting IPC connection...binded to port 13132
Waiting for a connection
执行结果:
root@hwH30:/ # ps | grep vnc
ps | grep vnc
shell 6110 3403 20280 460 ffffffff 40197980 S ./vnc1.out
u0_a79 7813 184 707616 81488 ffffffff 401169e4 S com.reka.vnchid.ui
u0_a87 31568 184 530296 21984 ffffffff 401169e4 S com.schumi.vncs
root@hwH30:/ # cat /proc/6110/status
cat /proc/6110/status
Name: vnc1.out
State: S (sleeping)
Tgid: 6110
Pid: 6110
PPid: 3403
TracerPid: 0
Uid: 20002000 20002000
Gid: 2000 2000 2000 2000
FDSize: 32
- suid位,sgid位及setuid(),setgid()函数实测情况
- setuid和setgid 位
- Linux Setuid(SUID)和Setgid(SGID) sticky bit
- SUID和SGID位简介
- 【转】SUID和SGID位简介
- Linux SUID、SGID、chattr特殊权限位
- linux特殊权限:setUid, setGid, 粘着位(sticky)
- linux特殊权限:setUid, setGid, 粘着位(sticky)
- linux特殊权限位之setuid、setgid和sticky
- chmod命令高级篇( SetUID与SetGID标识位)
- 使用 setuid、setgid 和 Sticky 位的特殊文件权限
- chmod命令高级篇( SetUID与SetGID标识位)
- Linux文件的特殊权限位SUID、SGID作用及编程设置/读取
- A007:文件特殊权限位学习( SUID、SGID、STICKY )
- linux文件权限之suid,sgid,粘贴位
- setUID,setGID,getuid,geteuid函数
- linux setuid setgid setegid函数
- linux 文件标志位 setuid与setgid与stick bit 详解
- vector……转载
- install vpn
- codeforces #306 D 550D D. Regular Bridge(构造+图论)
- MS WORD 表格自动调整列宽,自动变漂亮,根据内容自动调整
- “互联网+”拯救了星巴克,出路是“第四空间
- suid位,sgid位及setuid(),setgid()函数实测情况
- cocos2d-lua 学习笔记—1
- 半年冲3A:行业不景气,如何从差异化中找到突破口
- 【数据结构】线性表之链式存储结构
- 物流电商激辩 “自建物流”成本账
- 调用摄像头接口方法合集
- 利用enterprisedt包实现FTP的操作
- http下载
- 一种可行的Android.mk配置