执行rm –rf之后的机器
创建一个可以改变busybox访问权限的对象
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
$ cat > setx.c <<EOF
extern int chmod (const char *pathname, unsigned int mode);
int entry(void) {
return !! chmod ( "busybox" , 0700);
}
char *desc[] = {0};
struct quick_hack {
char *name; int (*fn)(void); int on;
char **long_doc, *short_doc, *other;
} setx_struct = { "setx" , entry, 1, desc, "chmod 0700 busybox" , 0 };
EOF
$ gcc -Wall -Wextra -pedantic -nostdlib -Os -fpic -shared setx.c -o setx
$ upload < setx
|
以内建工具的方式使能setx,使busybox可执行
操作如下:

原文链接: rm -rf remains 翻译: 伯乐在线 - honpey
译文链接: http://blog.jobbole.com/70971/ |