Contact us in messengers or by phone.

whatsapp telegram viber phone email
+79214188555

Search for vulnerable services and passwords in open logs in Google using dorks

НСК-СБ

Staff member
Private access level
Full members of NP "MOD"
Joined
Jul 14, 2011
Messages
3,122
Reaction score
2,094
Points
613
Location
Новосибирск
Search for vulnerable services and passwords in open logs in Google using dorks

10:59 / February 17, 2020

Since Google indexes almost everything that is connected to the Internet and has a web interface, we can easily find incorrectly configured devices and services.

d22702f1e0a4b809802d77b6216b2d3c.jpg

Posted by: Kody

You probably did not suspect that dorks can be a very powerful tool with which you can compromise a device without unnecessary gestures using Google and the right request. Since this search engine can fantastically index everything connected to the Internet, you can find files that turned out to be available randomly and containing confidential information.

Google Dorking or Dorki are advanced methods of using search operators and special strings to find specific vulnerable devices. If we assume that Google has indexed most devices that are accidentally connected to the Internet, then we can use special text from the authorization pages or admin panels to search for these devices.

What devices can be found?
You will be surprised, but the range of potential goals is quite wide, ranging from swimming pool control systems on a yacht in the ocean to configuration interfaces of critical systems. All of these devices and services may turn out to be connected to the Internet, based on the best of intentions, the owners of which do not even realize that the device turned out to be accessible to everyone.

How does this happen? Imagine that you have a camera that is accessible through the phone at any time. After setting up and connecting via Wi-Fi, you downloaded the authorization application, and from now on you have access to the camera from anywhere!

In fact, everything is a little more complicated. The camera connects to a server in China and broadcasts the video stream in real time, and after authorization you can view the video directly from your phone. The video stream may even turn out to be not password protected and be accessible to anyone who forms the correct request to search for the text that the page contains for viewing the broadcast from the camera.

Unfortunately, Google is ruthlessly effective in the field of searching for any devices connected to the Internet with HTTP and HTTPS servers running. Since the server is used for configuration in most devices, a lot of things fall into the public domain that should not fall.

What are the most useful dorks?
By far the most tidbit file that we can find is containing the accounts of individual users or to the entire service at once. As a rule, two scenarios are possible.

The first is when the server or other service is configured incorrectly, and administrative logs are available via the Internet. In case of password change or failure during authorization, account leakage through these logs is possible. The second scenario is when configuration files containing the same information become available. It is assumed that these files are for internal use only, but often confidential information is available in clear text. Both of these scenarios allow you to gain control over the entire service if an attacker manages to find files of this kind.

We will use Google’s dorks to search not only these files, but also FTP servers, which may contain interesting information, email lists, and available webcams.

What is needed
You will need a browser and an internet connection. When using dorks to search for vulnerable systems, we can use tools that are available to almost everyone.

Open a browser and go to google.ru. Now we are ready to start.

Step 1. Search for FTP servers and sites using HTTP
First, we’ll use the dork to search for FTP servers published after 2018. These servers allow you to find files intended for internal use, but unknowingly ended up in public access.

intitle: "index of" inurl: ftp after: 2018

image001.jpg

Figure 1: List of FTP Servers Found

These servers become public, because the FTP server index file loves to crawl Google, which administrators often forget. After indexing, all server files can be searched through Google.

If we want to find unsafe HTTP pages, we slightly modify the request above by changing “ftp” to “http”.

intitle: "index of" inurl: http after: 2018

As a result of the search, you can get thousands of pages that use HTTP and are ready to be compromised. However, if we are looking for a specific type of site, such as a forum, we modify the request as follows:

intitle: "forum" inurl: http after: 2018


We can also add operators like AND inurl: "registration" to make the search more targeted (for example, unsafe forms on registration pages).

image002.jpg


Figure 2: List of unsafe forums using the HTTP protocol



Step 2. Search logs with passwords
The next step is to search for files with the extension .LOG. Files of this kind allow you to find out information about the accounts of ordinary users or administrators.

For search we will use the following dork:

allintext: password filetype: log after: 2018


We get the results with the logs available via the Internet immediately:

image003.jpg


Figure 3: During the search, an available OpenCast project log was found

The log in the figure above shows that the system uses a standard password, and the log itself is easy to find on the OpenCast project website using a simple search query. In the end, we probably discovered a system account without using sophisticated hacking techniques.

Step 3. Search for configuration files with passwords
Configuration files should never be accessible externally. If, for example, you find a file with the extension .ENV containing the DB_PASSWORD parameter, then we can say that we immediately found the password to the detected database.

filetype: env "DB_PASSWORD" after: 2018


image004.jpg


Figure 4: Example of a configuration file with a database password

If you remove the after: 2018 expression from the query, then the results will display older configuration files, which also allow you to access services via the Internet.

Step 4. Search the list of emails
Collecting email lists is a great way to find information about various organizations. For example, these lists can be used by companies or schools to organize email addresses for their members, but often fall into the public domain.

We will search e-mail lists in spreadsheets (files with the .XLS extension). In the search query inside the URL, set the file name "email.xls".

image005.jpg


Figure 5: Search results for email.xls files

The search results may be useful, but you should be careful not to run into a honeypot (a pot of honey). Many people know about such dorks and intentionally leave files that at first glance seem vulnerable, but actually contain malware.

Step 5: Search for open cameras
If you think that Shodan is the only service for finding open cameras, then you are very mistaken. Usually, authorization and camera viewing pages are accessible via HTTP, and Google will be happy to index these documents. Accordingly, to find this kind of information is also not difficult with the right search query.

One of the most common queries contains the name “top.htm” to search the URL along with the current time and date. Using the below dork, you will get many results:

inurl: top.htm inurl: currenttime


image006.jpg


Figure 6: Search results for open cameras

The landscape captured by the first camera in the search results is most similar to the screensaver in Windows XP and is located somewhere in the city of Belmallet (Ireland).

image007.jpg


Figure 7: Image of one of the cameras found

Another dork for camera search, which allows you to get excellent results for pages stored on routers.

inurl: "lvappl.htm"


With the help of this dork, I was able to find something very interesting, and specifically - a camera that monitors the nest of birds (birdcam1):

image008.jpg


Figure 8: One of the cameras found during the search for lvappl.htm pages

Other cameras are not as interesting as birdcam1.

image009.jpg


Figure 9: Camera inside the cottage village

You can also find cameras inside factories and industrial zones:

image010.jpg


Figure 10: Camera inside the workshop

All of the above cameras are available without a password. However, many dorks allow you to find authorization pages for cameras that use standard passwords. Although this tactic is illegitimate, it allows you to access many cameras that are not intended for the general public.

Conclusion
Since Google indexes almost everything that is connected to the Internet and has a web interface, we can easily find incorrectly configured devices and services. However, it is better not to connect to these devices, even if the password is in the clear, as problems may arise with law enforcement agencies. If you have a service connected to the Internet, it is worth testing the most popular dorks on your domains. Suddenly you accidentally left something important that could attract the attention of an attacker.

I hope you enjoyed this guide on how to find vulnerable devices and open passwords.
Search for vulnerable services and passwords in open logs in Google using dorks
 
Original message
Поиск уязвимых служб и паролей в открытых логах в Гугле при помощи дорков

10:59 / 17 Февраля, 2020

Поскольку Гугл индексирует практически все, что подключено к интернету и имеет веб-интерфейс, мы легко можем найти некорректно настроенные устройства и службы.

d22702f1e0a4b809802d77b6216b2d3c.jpg

Автор: Kody

Вероятно, вы и не подозревали, что дорки могут оказаться очень мощным инструментом, при помощи которого можно скомпрометировать устройство без лишних телодвижений, используя Гугл и правильный запрос. Поскольку эта поисковая система умеет фантастическим образом индексировать все, что подключено к интернету, можно найти файлы, оказавшиеся доступными случайно и содержащие конфиденциальную информацию.

Google Dorking или дорки представляют собой продвинутые методы использования поисковых операторов и специальных строк для нахождения специфических уязвимых устройств. Если предположить, что Гугл проиндексировал большинство устройств, случайно подключенных к интернету, то мы можем использовать специальный текст со страниц авторизации или административных панелей для поиска этих девайсов.

Какие устройства можно найти?
Вы удивитесь, но спектр потенциальных целей довольно широк, начиная от систем управления бассейном на яхте в океане и заканчивая конфигурационными интерфейсами критических систем. Все эти устройства и службы могут оказаться подключенными к интернету, исходя из лучших побуждений, хозяева которых даже не догадываются, что девайс оказался доступным всем и каждому.

Как же подобное происходит? Представьте, что у вас появилась камера, доступная через телефон в любое время. После настройки и подключения по Wi-Fi вы скачали приложение для авторизации, и с этого момента у вас есть доступ к камере из любого места!

На самом деле, все чуть сложнее. Камера подключается к серверу в Китае и транслирует видеопоток в режиме реального времени, а вы после авторизации можете просматривать видео прямо с телефона. Видеопоток может даже оказаться не защищен паролем и быть доступным всем, кто сформирует правильный запрос для поиска текста, который содержит страница для просмотра трансляции с камеры.

К сожалению, Гугл безжалостно эффективен на поприще поиска любых устройств, подключенных к интернету, с запущенными HTTP и HTTPS серверами. Поскольку в большинстве устройств сервер используется для настройки, на всеобщее обозрение попадает многое, что попадать не должно.

Какие дорки наиболее полезные?
Безусловно, наиболее лакомый файл, который мы можем найти – содержащий учетные записи отдельных пользователей или ко всей службе сразу. Как правило, возможно два сценария.

Первый – когда сервер или другая служба настроены некорректно, и административные логи доступны через интернет. В случае смены пароля или неудачи во время авторизации, через эти логи возможна утечка аккаунтов. Второй сценарий – когда становятся доступными конфигурационные файлы, содержащие ту же самую информацию. Предполагается, что эти файлы исключительно для внутреннего пользования, но часто конфиденциальная информация доступна в открытом виде. Оба этих сценария позволяют получить контроль над всей службой в случае, если злоумышленнику удастся найти файлы подобного рода.

Мы будем использовать дорки в Гугл с целью поиска не только этих файлов, но и FTP серверов, которые могут содержать интересную информацию, списки электронных почт и доступные вебкамеры.

Что понадобится
Вам потребуется браузер и подключение интернету. При использовании дорков для поиска уязвимых систем мы можем использовать инструменты, доступные практически каждому.

Откройте браузер и зайдите в google.ru. Теперь мы готовы начать.

Шаг 1. Поиск FTP серверов и сайтов, работающих по протоколу HTTP
Вначале воспользуемся дорком для поиска FTP серверов, опубликованных после 2018 года. Эти сервера позволяют найти файлы, предназначенные для внутреннего пользования, но по незнанию оказавшиеся в публичном доступе.

intitle:"index of" inurl:ftp after:2018

image001.jpg

Рисунок 1: Список найденных FTP серверов

Эти сервера становятся публичными, поскольку индексный файл FTP сервера очень любит сканировать Гугл, о чем часто забывают администраторы. После индексации все файлы сервера можно искать через Гугл.

Если мы хотим найти небезопасные HTTP-страницы, немного модифицируем запрос выше, изменив «ftp» на «http».

intitle:"index of" inurl:http after:2018

В результате поиска можно получить тысячи страниц, использующих HTTP, и готовых к компрометированию. Однако если мы ищем определенный тип сайта, как, например, форум, то модифицируем запрос следующим образом:

intitle:"forum" inurl:http after:2018


Мы также можем добавить операторы наподобие AND inurl:"registration", чтобы сделать поиск более целенаправленным (например, небезопасных форм на страницах регистрации).

image002.jpg


Рисунок 2: Список небезопасных форумов, использующих протокол HTTP



Шаг 2. Поиск логов с паролями
Следующий шаг – поиск файлов с расширением .LOG. Файлы подобного рода позволяют выяснить информацию об учетных записях обычных пользователей или администраторов.

Для поиска будем использовать следующий дорк:

allintext:password filetype:log after:2018


Результаты с логами, доступными через интернет, получаем незамедлительно:

image003.jpg


Рисунок 3: Во время поиска найден доступный лог проекта OpenCast

По логу на рисунке выше видно, что в системе используется стандартный пароль, а сам лог легко найти на сайте проекта OpenCast при помощи простого поискового запроса. В итоге мы, вероятно, обнаружили учетную запись системы без использования изощренных хакерских приемов.

Шаг 3. Поиск конфигурационных файлов с паролями
Конфигурационные файлы вообще никогда не должны быть доступными извне. Если, к примеру, найти файл с расширением .ENV, содержащий параметр DB_PASSWORD, то, можно сказать, что мы тут же нашли пароль к обнаруженной базе данных.

filetype:env "DB_PASSWORD" after:2018


image004.jpg


Рисунок 4: Пример конфигурационного файла с паролем к базе данных

Если из запроса удалить выражение after:2018, то в результатах появятся более старые конфигурационные файлы, также позволяющие получить доступ к службам через интернет.

Шаг 4. Поиск список электронных почт
Сбор списков электронных ящиков – отличный способ поиска информации о различных организациях. Например, эти списки могут использоваться компаниями или школами с целью упорядочивания электронных адресов для своих членов, но часто попадают во всеобщий доступ.

Списки электронных почт будем искать в электронных таблицах (файлы с расширением .XLS). В поисковом запросе внутри URL задаем имя файла «email.xls».

image005.jpg


Рисунок 5: Результаты поиска файлов email.xls

Результаты поиска могут оказаться полезными, но следует быть осторожным, чтобы не нарваться на honeypot (горшочек с медом). Многие знают о подобных дорках и намеренно оставляют файлы, которые на первый взгляд кажутся уязвимыми, а на самом деле содержат вредоносы.

Шаг 5: Поиск открытых камер
Если вы думаете, что Shodan – единственный сервис для поиска открытых камер, то очень ошибаетесь. Обычно страницы авторизации и просмотра камер доступны через HTTP, и Гугл будет счастлив проиндексировать эти документы. Соответственно, найти подобного рода информацию также не составит труда при правильном поисковом запросе.

Один из наиболее распространенных запросов содержит имя «top.htm» для поиска в URL вместе с текущем временем и датой. Используя нижеуказанный дорк, вы получите много результатов:

inurl:top.htm inurl:currenttime


image006.jpg


Рисунок 6: Результаты поиска открытых камер

Ландшафт, снимаемый первой камерой в результатах поиска, больше всего похож заставку в Windows XP и находится где-то в городе Белмаллет (Ирландия).

image007.jpg


Рисунок 7: Изображение одной из найденных камер

Еще один дорк для поиска камер, позволяющий получить отличные результаты для страниц, хранимых на роутерах.

inurl:"lvappl.htm"


При помощи этого дорка я смог найти нечто очень интересное, а конкретно – камеру, следящую за гнездом птиц (birdcam1):

image008.jpg


Рисунок 8: Одна из камер, найденная во время поиска страниц lvappl.htm

Другие камеры не являются столь интересными, как birdcam1.

image009.jpg


Рисунок 9: Камера внутри коттеджного поселка

Также можно найти камеры внутри фабрик и промзон:

image010.jpg


Рисунок 10: Камера внутри мастерской

Все вышеуказанные камеры доступны без пароля. Однако многие дорки позволяют найти страницы авторизации камер, использующих стандартные пароли. Эта тактика хоть и является нелегитимной, но позволяет получить доступ ко многим камерам, которые не предназначены для широкой публики.

Заключение
Поскольку Гугл индексирует практически все, что подключено к интернету и имеет веб-интерфейс, мы легко можем найти некорректно настроенные устройства и службы. Однако подключаться к этим девайсам лучше не надо, даже если пароль находится в открытом виде, поскольку могут возникнуть проблемы с правоохранительными органами. Если у вас есть служба, подключенная к интернету, стоит протестировать наиболее популярные дорки на ваших доменах. Вдруг вы случайно оставили нечто важное, что может привлечь внимание злоумышленника.

Надеюсь вам понравилось это руководство, посвященное доркам для поиска уязвимых устройств и открытых паролей.
Поиск уязвимых служб и паролей в открытых логах в Гугле при помощи дорков