@@ -29,44 +29,23 @@ class Functions
29
29
'syslog ' ,
30
30
'passthru ' ,
31
31
'define_syslog_variables ' ,
32
- /*
33
- "dl",
34
- "debugger_off",
35
- "debugger_on",
36
- "parse_ini_file",
37
- "show_source",
38
- "symlink",
39
- "popen",
40
- */
41
32
'posix_kill ' ,
42
- /*
43
- "posix_getpwuid",
44
- "posix_mkfifo",
45
- "posix_setpgid",
46
- "posix_setsid",
47
- "posix_setuid",
48
- */
33
+ 'posix_getpwuid ' ,
34
+ 'posix_mkfifo ' ,
35
+ 'posix_setpgid ' ,
36
+ 'posix_setsid ' ,
37
+ 'posix_setuid ' ,
49
38
'posix_uname ' ,
50
39
'proc_close ' ,
51
40
'proc_get_status ' ,
52
41
'proc_nice ' ,
53
42
'proc_open ' ,
54
43
'proc_terminate ' ,
55
- /*
56
- "ini_alter",
57
- "ini_get_all",
58
- "ini_restore",
59
- "parse_ini_file",
60
- */
44
+ 'pcntl_exec ' ,
61
45
'inject_code ' ,
62
46
'apache_child_terminate ' ,
63
47
'apache_note ' ,
64
48
'define_syslog_variables ' ,
65
- /*
66
- "apache_setenv",
67
- "escapeshellarg",
68
- "escapeshellcmd",
69
- */
70
49
];
71
50
72
51
/**
@@ -75,51 +54,129 @@ class Functions
75
54
* @var array
76
55
*/
77
56
public static $ dangerous = [
57
+ // PHP Code Execution
78
58
'il_exec ' ,
79
59
'shell_exec ' ,
80
60
'eval ' ,
81
61
'system ' ,
82
62
'create_function ' ,
83
63
'exec ' ,
64
+ 'pcntl_exec ' ,
84
65
'assert ' ,
85
- 'syslog ' ,
86
66
'passthru ' ,
67
+ 'create_function ' ,
68
+ 'include ' ,
69
+ 'include_once ' ,
70
+ 'require ' ,
71
+ 'require_once ' ,
72
+ 'preg_replace ' ,
73
+ // Files and configurations
74
+ 'syslog ' ,
87
75
'define_syslog_variables ' ,
88
76
'debugger_off ' ,
77
+ 'get_meta_tags ' ,
78
+ 'highlight_file ' ,
89
79
'debugger_on ' ,
90
80
'parse_ini_file ' ,
81
+ 'php_strip_whitespace ' ,
91
82
'show_source ' ,
92
83
'symlink ' ,
93
- 'popen ' ,
84
+ 'fopen ' ,
85
+ 'file_get_contents ' ,
86
+ 'file_put_contents ' ,
87
+ 'chmod ' ,
88
+ 'chown ' ,
89
+ 'copy ' ,
90
+ 'move ' ,
91
+ 'is_file ' ,
92
+ 'is_dir ' ,
93
+ 'ini_alter ' ,
94
+ 'ini_get_all ' ,
95
+ 'ini_restore ' ,
96
+ 'parse_ini_file ' ,
97
+ 'inject_code ' ,
98
+ 'apache_child_terminate ' ,
99
+ 'apache_setenv ' ,
100
+ 'apache_note ' ,
101
+ 'define_syslog_variables ' ,
102
+ // Curl
103
+ 'curl_init ' ,
104
+ 'curl_setopt ' ,
105
+ 'curl_exec ' ,
106
+ // Posix
94
107
'posix_kill ' ,
95
108
'posix_getpwuid ' ,
96
109
'posix_mkfifo ' ,
97
110
'posix_setpgid ' ,
98
111
'posix_setsid ' ,
99
112
'posix_setuid ' ,
100
113
'posix_uname ' ,
114
+ // Processes
115
+ 'popen ' ,
101
116
'proc_close ' ,
102
117
'proc_get_status ' ,
103
118
'proc_nice ' ,
104
119
'proc_open ' ,
105
120
'proc_terminate ' ,
106
- 'ini_alter ' ,
107
- 'ini_get_all ' ,
108
- 'ini_restore ' ,
109
- 'parse_ini_file ' ,
110
- 'inject_code ' ,
111
- 'apache_child_terminate ' ,
112
- 'apache_setenv ' ,
113
- 'apache_note ' ,
114
- 'define_syslog_variables ' ,
121
+ // Encoding
115
122
'escapeshellarg ' ,
116
123
'escapeshellcmd ' ,
117
124
'base64_decode ' ,
118
125
'urldecode ' ,
119
126
'rawurldecode ' ,
120
127
'str_rot13 ' ,
121
128
'preg_replace ' ,
122
- 'create_function ' ,
129
+ // Information Disclosure
130
+ 'phpinfo ' ,
131
+ 'posix_mkfifo ' ,
132
+ 'posix_getlogin ' ,
133
+ 'posix_ttyname ' ,
134
+ 'getenv ' ,
135
+ 'get_current_user ' ,
136
+ 'proc_get_status ' ,
137
+ 'get_cfg_var ' ,
138
+ 'disk_free_space ' ,
139
+ 'disk_total_space ' ,
140
+ 'diskfreespace ' ,
141
+ 'getcwd ' ,
142
+ 'getlastmo ' ,
143
+ 'getmygid ' ,
144
+ 'getmyinode ' ,
145
+ 'getmypid ' ,
146
+ 'getmyuid ' ,
147
+ // Callback functions
148
+ 'ob_start ' ,
149
+ 'array_diff_uassoc ' ,
150
+ 'array_diff_ukey ' ,
151
+ 'array_filter ' ,
152
+ 'array_intersect_uassoc ' ,
153
+ 'array_intersect_ukey ' ,
154
+ 'array_map ' ,
155
+ 'array_reduce ' ,
156
+ 'array_udiff_assoc ' ,
157
+ 'array_udiff_uassoc ' ,
158
+ 'array_udiff ' ,
159
+ 'array_uintersect_assoc ' ,
160
+ 'array_uintersect_uassoc ' ,
161
+ 'array_uintersect ' ,
162
+ 'array_walk_recursive ' ,
163
+ 'array_walk ' ,
164
+ 'assert_options ' ,
165
+ 'uasort ' ,
166
+ 'uksort ' ,
167
+ 'usort ' ,
168
+ 'preg_replace_callback ' ,
169
+ 'spl_autoload_register ' ,
170
+ 'iterator_apply ' ,
171
+ 'call_user_func ' ,
172
+ 'call_user_func_array ' ,
173
+ 'register_shutdown_function ' ,
174
+ 'register_tick_function ' ,
175
+ 'set_error_handler ' ,
176
+ 'set_exception_handler ' ,
177
+ 'session_set_save_handler ' ,
178
+ 'sqlite_create_aggregate ' ,
179
+ 'sqlite_create_function ' ,
123
180
];
124
181
125
182
/**
0 commit comments