Читаем Техника сетевых атак полностью

Дальше статья повествует, как наивный чукотский «вьюноша» манипулировал всеми «хакерскими» утилитами по очереди, ломясь в широко открытую дверь. Чтобы повторить его «подвиг» вовсе не обязательно устанавливать на своей машине Netscape Navigator. Можно воспользоваться, например, приложением «Microsoft Web Publishing», которое поддерживает закачку файлов на сервер по HTTP-протоколу всеми доступными способами:


Рисунок 22 Microsoft Web Publishing поддерживает метод POST необходимый для «заливки» документов на сервер


Однако чаще всего злоумышленнику под тем или иным предлогом в доступе будет отказано. Возможные мотивации - метод PUT запрещен; метод PUT разрешен, но нет прав записи в указанный файл (директорию); наконец, метод PUT разрешен, права записи есть, но требуется авторизация (ввод имени и пароля).

Ниже приведены протоколы трех последовательных попыток подключения к следующим серверам: http://kpnc.virtualave.net, http://dore.on.ru и http://195.161.42.222.

· PUT /index.html HTTP/1.0·· HTTP/1.1 405 Method Not Allowed· Date: Sat, 15 Apr 2000 21:50:26 GMT· Server: Apache/1.2.6· Allow : GET, HEAD, OPTIONS, TRACE· Connection: close· Content-Type: text/html·· «HTML»· «HEAD»· «TITLE» 405 Method Not Allowed «/TITLE»· «/HEAD»· «BODY»· «H1» Method Not Allowed «/H1»· The requested method PUT is not allowed for the URL /index.html.«P»· «/BODY»«/HTML»· PUT /Index.html HTTP/1.0·· HTTP/1.1 403 Access Forbidden· Server: Microsoft-IIS/4.0· Date: Sat, 15 Apr 2000 22:04:25 GMT· Content-Length: 495· Content-Type: text/html·· «html»· «head»· «title»Error 403.3«/title»· «/head»· «body»· «h2»HTTP Error 403«/h2»· «p»«strong» 403.3 Forbidden: Write Access Forbidden «/strong»«/p»· «p»This error can be caused if you attempt to upload to, or modify a file in, a· directory that does not allow Write access.«/p»· «p»Please contact the Web server's administrator if the problem persists.«/p»· PUT /Index.htm HTTP/1.0·· HTTP/1.1 401 Access Denied· WWW-Authenticate: NTLM· WWW-Authenticate: Basic realm="195.161.42.222"· Content-Length: 644· Content-Type: text/html·· «html»· «head»· «title»Error 401.2«/title»· «body»· «h2»HTTP Error 401«/h2»· «p»«strong»401.2 Unauthorized: Logon Faile d due to server configuration«/strong»· «p»This error indicates that the credentials passed to the server do not match the· credentials required to log on to the server. This is usually caused by not s· ending the proper WWW-Authenticate header field.«/p»· «p»Please contact the Web server's administrator to verify that you have permiss· ion to access to requested resource.«/p»


 Первые два случая говорят о правильной конфигурации сервера (с точки зрения политики безопасности), но факт авторизации сам по себе еще не свидетельствует о защищенности (быть может, используется простой пароль, наподобие «guest»).

Механизмы аутентификации HTTP-серверов довольно многочисленны, поэтому ниже будет описан лишь один, наиболее распространенный, из них. Всю остальную информацию можно почерпнуть из технической документации RFC-2068 и RFC-2069.

Начиная со спецификации HTTP 1.0, код ошибки “401” зарезервирован за «Access Denied, need authenticate [261]». Именно его возвратил сервер в последнем примере. Ниже заголовок ответа сервера приводится еще раз:

Перейти на страницу:

Похожие книги

Programming with POSIX® Threads
Programming with POSIX® Threads

With this practical book, you will attain a solid understanding of threads and will discover how to put this powerful mode of programming to work in real-world applications. The primary advantage of threaded programming is that it enables your applications to accomplish more than one task at the same time by using the number-crunching power of multiprocessor parallelism and by automatically exploiting I/O concurrency in your code, even on a single processor machine. The result: applications that are faster, more responsive to users, and often easier to maintain. Threaded programming is particularly well suited to network programming where it helps alleviate the bottleneck of slow network I/O. This book offers an in-depth description of the IEEE operating system interface standard, POSIX (Portable Operating System Interface) threads, commonly called Pthreads. Written for experienced C programmers, but assuming no previous knowledge of threads, the book explains basic concepts such as asynchronous programming, the lifecycle of a thread, and synchronization. You then move to more advanced topics such as attributes objects, thread-specific data, and realtime scheduling. An entire chapter is devoted to "real code," with a look at barriers, read/write locks, the work queue manager, and how to utilize existing libraries. In addition, the book tackles one of the thorniest problems faced by thread programmers-debugging-with valuable suggestions on how to avoid code errors and performance problems from the outset. Numerous annotated examples are used to illustrate real-world concepts. A Pthreads mini-reference and a look at future standardization are also included.

David Butenhof

Программирование, программы, базы данных
Java 7
Java 7

Рассмотрено все необходимое для разработки, компиляции, отладки и запуска приложений Java. Изложены практические приемы использования как традиционных, так и новейших конструкций объектно-ориентированного языка Java, графической библиотеки классов Swing, расширенной библиотеки Java 2D, работа со звуком, печать, способы русификации программ. Приведено полное описание нововведений Java SE 7: двоичная запись чисел, строковые варианты разветвлений, "ромбовидный оператор", NIO2, новые средства многопоточности и др. Дано подробное изложение последней версии сервлетов, технологии JSP и библиотек тегов JSTL. Около двухсот законченных программ иллюстрируют рассмотренные приемы программирования. Приведена подробная справочная информация о классах и методах Core Java API.

Ильдар Шаукатович Хабибуллин

Программирование, программы, базы данных