Есть ли у кого-то шаблоны потенциально опасных функций php. Интересует полный текст выводимой ошибки к примеру:
include()
failed to open stream: No such file or directory in
Есть ли у кого-то шаблоны потенциально опасных функций php. Интересует полный текст выводимой ошибки к примеру:
include()
failed to open stream: No such file or directory in
"Я не потерпел неудачу, просто я открыл 10 000 способов, которые не работают."
Tomas A. Edison
include(), require()-Включение, каких либо файлов в php сценарий. Возможна опасность получения шелла или чтения файлов на сервере при неправильной фильтрации(или отсутствии онной).
include()
include_once()
require()
require_once()
readfile(), show_source(), highlight - тоже относится к работе с файлами. Возможность залить веб шелл.
import_request_variables(), extract(), parse_str() - позволяют переписать любые переменные объявленные раньше, в том числе из глобальных массивов. Возможна передача своего кода в переменную.
eval(), assert() - выполняет переданный ей параметр как php код.
passthru(), exec(), system(), shell_exec(), proc_open( ) -функции выполнения команд или работы с процессами. Отсутствие проверки входных данных могут дать взломщику возможность выполнять команды.
mysql_query() - из части работы php&mysql. Выполняет запрос к БД, при неправильной обработки данных возможна sql injection
fopen(), - Открытие локальных файлов либо с других сайтов по протоколам http и ftp. Аналогично include(),есть возможность залить веб шелл.
echo - конструкция языка, которая позволяет выводить одну или более строк. Есть опасность появления XSS.
Для избежания этого нужно проверять входные данные. И использовать функцию htmlspecialchars()
Это понятно мне нужно failed to open stream: No such file or directory in такого формата ошыбки в виде шаблона что бы автоматом искать в гугле дырявые скрипты.
"Я не потерпел неудачу, просто я открыл 10 000 способов, которые не работают."
Tomas A. Edison
У меня есть давний выхлоп, экспериментального скрипта, который похож на то, что тебе нужно.
Но имхо, таким способом мало чего нагребешь...Code:INCLUDE: Warning: Type 01: Warning: include() [function.include]: Failed opening '*' for inclusion (include_path='*') in * on line * Type 02: Warning: include() [function.include]: URL file-access is disabled in the server configuration in * on line * Type 03: Warning: include() [function.include]: * wrapper is disabled in the server configuration by allow_url_include=0 in * on line * Type 04: Warning: include() [function.include]: open_basedir restriction in effect. File(*) is not within the allowed path(s): (*) in * on line * Type 05: Warning: include(*) [function.include]: failed to open stream: No such file or directory in * on line * Type 06: Warning: include(*) [function.include]: failed to open stream: no suitable wrapper could be found in * on line * Type 07: Warning: include(*) [function.include]: failed to open stream: Operation not permitted in * on line * Type 08: Warning: include(*) [function.include]: * Type 09: Warning: include(*) * Fatal error: Type 01: INCLUDE_ONCE: Warning: Type 01: Warning: include_once() [function.include]: Failed opening '*' for inclusion (include_path='*') in * on line * Type 02: Warning: include_once() [function.include-once]: URL file-access is disabled in the server configuration in * on line * Type 03: Warning: include_once() [function.include-once]: * wrapper is disabled in the server configuration by allow_url_include=0 in * on line * Type 04: Warning: include_once() [function.include-once]: open_basedir restriction in effect. File(*) is not within the allowed path(s): (*) in * on line * Type 05: Warning: include_once(*) [function.include-once]: failed to open stream: No such file or directory in * on line * Type 06: Warning: include_once(*) [function.include-once]: failed to open stream: no suitable wrapper could be found in * on line * Type 07: Warning: include_once(*) [function.include-once]: failed to open stream: Operation not permitted in * on line * Type 08: Warning: include_once(*) [function.include-once]: * Type 09: Warning: include_once(*) * Fatal error: Type 01: REQUIRE: Warning: Type 01: Warning: require() [function.require]: Unable to access * in * on line * Type 02: Warning: require(*) [function.require]: failed to open stream: Permission denied in * on line * Type 03: Warning: require(*) [function.require]: failed to open stream: No such file or directory in * on line * Type 04: Warning: require(*) [function.require]: * Type 05: Warning: require(*) * Fatal error: Type 01: Fatal error: require() [function.require]: Failed opening required '*' (include_path='*') in * on line * REQUIRE_ONCE: Warning: Type 01: Warning: require_once() [function.require-once]: Unable to access * in * on line * Type 02: Warning: require_once(*) [function.require-once]: failed to open stream: Operation not permitted in * on line * Type 03: Warning: require_once(*) [function.require-once]: failed to open stream: No such file or directory in * on line * Type 04: Warning: require_once(*) [function.require-once]: * Type 05: Warning: require_once(*) * Fatal error: Type 01: Fatal error: require_once() [function.require]: Failed opening required '*' (include_path='*') in * on line * READFILE: Warning: Type 01: Warning: readfile() [function.readfile]: Filename cannot be empty in * on line * Type 02: Warning: readfile() [function.readfile]: Couldn't resolve host name in * on line * Type 03: Warning: readfile() [function.readfile]: URL file-access is disabled in the server configuration in * on line * Type 04: Warning: readfile() [function.readfile]: php_network_getaddresses: getaddrinfo failed: Name or service not known in * on line * Type 05: Warning: readfile() [function.readfile]: Unable to access * in * on line * Type 06: Warning: readfile(*) [function.readfile]: failed to open stream: Permission denied in * on line * Type 07: Warning: readfile(*) [function.readfile]: failed to open stream: No such file or directory in * on line * Type 08: Warning: readfile(*) [function.readfile]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in * on line * Type 09: Warning: readfile(*) [function.readfile]: * Type 10: Warning: readfile(*) * Fatal error: Type 01: Fatal error: Cannot redeclare readfile() in * on line * SHOW_SOURCE: Warning: Type 01: Warning: show_source() [function.show-source]: Failed opening '*' for highlighting in * on line * Type 02: Warning: show_source(*) [function.show-source]: failed to open stream: No such file or directory in * on line * Type 03: Warning: show_source(*) [function.show-source]: failed to open stream: HTTP request failed! HTTP/1.1 500 Error Interno del Servidor in * on line * Type 04: Warning: show_source(*) [function.show-source]: * Type 05: Warning: show_source(*) * Fatal error: Type 01: HIGHLIGHT_FILE: Warning: Type 01: Warning: highlight_file() [function.highlight-file]: Filename cannot be empty in * on line * Type 02: Warning: highlight_file() [function.highlight-file]: Failed opening '*' for highlighting in * on line * Type 03: Warning: highlight_file() [function.highlight-file]: SAFE MODE Restriction in effect. The script whose uid is 548 is not allowed to access owned by uid * in * on line * Type 04: Warning: highlight_file() [function.highlight-file]: php_network_getaddresses: getaddrinfo failed: Name or service not known in * on line * Type 05: Warning: highlight_file(*) [function.highlight-file]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in * on line * Type 06: Warning: highlight_file(*) [function.highlight-file]: failed to open stream: No such file or directory in * on line * Type 07: Warning: highlight_file(*) [function.highlight-file]: * Type 08: Warning: highlight_file(*) * Fatal error: Type 01: IMPORT_REQUEST_VARIABLES: Warning: Type 01: Warning: import_request_variables() [function.import-request-variables]: Numeric key detected - possible security hazard. in * on line * Type 02: Warning: import_request_variables(*) [function.import-request-variables]: * Type 03: Warning: import_request_variables(*) * Fatal error: Type 01: EXTRACT: Warning: Type 01: Warning: extract() [function.extract]: First argument should be an array in * on line * Type 02: Warning: extract(*) [function.extract]: * Type 03: Warning: extract(*) * Fatal error: Type 01: PARSE_STR: Warning: Type 01: Warning: parse_str() expects parameter * to be string, array given in * on line * Type 02: Warning: parse_str(*) * Fatal error: Type 01: EVAL: Warning: Type 01: eval()'d code on line * Fatal error: Type 01: eval()'d code on line * ASSERT: Warning: Type 01: Warning: assert() [function.assert]: Assertion failed in * on line * Type 02: Warning: assert(*) [function.assert]: * Type 03: Warning: assert(*) * Fatal error: Type 01: PASSTHRU: Warning: Type 01: Warning: passthru() [function.passthru]: Unable to fork * in * on line * Type 02: Warning: passthru() has been disabled for security reasons in * on line * Type 03: Warning: passthru(*) [function.passthru]: * Type 04: Warning: passthru(*) * Fatal error: Type 01: EXEC: Warning: Type 01: Warning: exec() has been disabled for security reasons in * on line * Type 02: Warning: exec() [function.exec]: Unable to fork * in * on line * Type 03: Warning: exec(*) [function.exec]: * Type 04: Warning: exec(*) * Fatal error: Type 01: SYSTEM: Warning: Type 01: Warning: system() has been disabled for security reasons in * on line * Type 02: Warning: system() [function.system]: Unable to fork * in * on line * Type 03: Warning: system(*) [function.system]: * Type 04: Warning: system(*) * Fatal error: Type 01: SHELL_EXEC: Warning: Type 01: Warning: shell_exec() has been disabled for security reasons in * on line * Type 02: Warning: shell_exec() [function.shell-exec]: Cannot execute using backquotes in Safe Mode in * on line * Type 03: Warning: shell_exec() [function.shell-exec]: Unable to execute * in * on line * Type 04: Warning: shell_exec(*) [function.shell-exec]: * Type 05: Warning: shell_exec(*) * Fatal error: Type 01: PROC_OPEN: Warning: Type 01: Warning: proc_open(): CreateProcess failed, error code - * in * Type 02: Warning: proc_open() [function.proc-open]: CreateProcess failed in * on line * Type 03: Warning: proc_open() [function.proc-open]: open_basedir restriction in effect. File(*) is not within the allowed path(s): (*) in * on line * Type 04: Warning: proc_open(*) [function.proc-open]: failed to open stream: No such file or directory in * on line * Type 05: Warning: proc_open(*) [function.proc-open]: failed to open stream: Operation not permitted in * on line * Type 06: Warning: proc_open(*) [function.proc-open]: * Type 07: Warning: proc_open(*) * Fatal error: Type 01: MYSQL_QUERY: Warning: Type 01: Warning: mysql_query() [function.mysql-query]: * Type 02: Warning: mysql_query(*) [function.mysql-query]: * Type 03: Warning: mysql_query(*) * Fatal error: Type 01: FOPEN: Warning: Type 01: Warning: fopen() [function.fopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in * on line * Type 02: Warning: fopen() [function.fopen]: Filename cannot be empty in * on line * Type 03: Warning: fopen(*) [function.fopen]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in * on line * Type 04: Warning: fopen(*) [function.fopen]: * Type 05: Warning: fopen(*) * Fatal error: Type 01: FILE_GET_CONTENTS: Warning: Type 01: Warning: file_get_contents(*) [function.file-get-contents]: failed to open stream: No such file or directory in * on line * Type 02: Warning: file_get_contents(*) [function.file-get-contents]: * Type 03: Warning: file_get_contents(*) * Fatal error: Type 01: # by Prosper-H (r0 Crew)
PS: Для составления списка ошибок и прочей фигни, лучше сходить на:
http://www.exploit-db.com/google-dorks/
Успех – это путь от провала до провала без потери энтузиазма. (В. Черчиль)
Не бойся идти медленно, бойся остановиться. (Китайская пословица)
When you lose fun and start doing things only for the payback, you're dead. (c) TCLH (Phrack 65, Intro)
ximera (19-11-2011)
Да это как часть скрипта, для 1-го из методов поиска просто по таким шаблонам можно найти ошибку которая например свалилась в кеш гугла что в прицепи даст к примеру раскрытие путей.
"Я не потерпел неудачу, просто я открыл 10 000 способов, которые не работают."
Tomas A. Edison