使用進行Google攻擊
http://www.googleguide.com/advanced_operators.html
Google是一個功能強大的搜索引擎,通過預定義命令,可以查詢出令人難以置信的結果。利用Google搜索智能搜索,甚至可以進入部分遠程服務器獲取機密、搜索敏感信息,造成信息洩露。本文從安全角度,對Google這一工具進行深度信息挖掘。

Google高級搜索語法
  討論Google特殊命令前,我們首先瞭解一下其命令語法,便於理解如何獲取機密數據。
intitle:
  用來限定Google搜索結果網頁的頭標中出現的關鍵字。例如「intitle:login password」將會返回在頭標中出現「login」、網頁中任一位置出現「password」的所有鏈接。同樣,如果在網頁中想查找一個以上的關鍵字可以用「allintitle」代替「intitle」,如「intitle:login intitle: password」和「allintitle: login password」代表同樣的搜索效果。
inurl:
  用來限定URLs地址中的關鍵字,返回的網頁鏈接中包含第一個關鍵字,後面的關鍵字則出現在鏈接或者網頁文檔中。如「inurl:passwd」將返回在URL中出現「passwd」的所有鏈接。同樣,如果包含有多個關鍵字可以用「allinurl:」代替「inurl」。例如「allinurl:etc/passwd」將搜索URLs中包含有「etc」和「passwd」的所有鏈接,其中「/」將在搜索中忽略。
site:
  搜索結果局限於某個具體網站或者網站頻道。例如「exploits site:hackingspirits.com」用來搜索在「hackingspirits.com」主域中出現關鍵字「exploits」的所有鏈接。
filetype:
  用來限定帶有特殊擴展名的文件(如doc、pdf、ppt等)。如「filetype:doc site:gov confidential」,用於搜索所有URLs有「.gov」的站點中帶有關鍵字「confidential」的「.doc」文檔,搜索結果將直接指向該文檔鏈接。
link:
  返回所有鏈接到某個URL地址的網頁。如「link:www.securityfocus. com」將直接連接到SecurityFocus網站主頁,注意「link:」和網站URL間沒有空格。
related:
  用於連接類似於指定網站的主頁。例如「related:www.securityfocus. com」將直接連接到類似於Security Focus網站的主頁。注意「related:」和網站URL間沒有空格。
cache:
  用於顯示網頁在Google中的緩存內容。例如「cache:www.hackingspirits. com」將顯示該網站在Google中的緩存主頁,注意「cache:」和網站url間沒有空格。如果在查詢中包含一些其他關鍵字,也將會被顯示出來。如「cache:www.hackingspirits.com guest」將顯示在該網站緩存中存在關鍵字「guest」的鏈接。
intext:
  搜索在網站站點關鍵字內容的鏈接,而鏈接、URLs和頁面頭標中的關鍵字不在返回鏈接範圍。例如「intext:exploits」將返回在網頁中出現「exploits」的鏈接。
phonebook:
  返回美國街道地址和電話號碼搜索信息。例如「phonebook:Lisa+CA」將連接指向名字為「Lisa」且位於「California (CA)」的人的信息。
   
Google攻擊揭秘
  通過語法討論,我們已知道如何進行精確和嚴密搜索。面對Google如此智能的搜索,黑客利用它可以從網絡中發掘出許多不被普通搜索用戶所知道的機密和安全信息。
現在,我們就詳細地討論一下黑客如何利用Google從網絡上發掘信息,入侵遠程服務器。
  1、利用「Index of」語法發現站點的活動索引目錄
一個主頁服務器活動索引目錄意味著任何人可以像瀏覽本地目錄一樣查看站點目錄。利用「index of」獲得站點目錄鏈接,極易成為黑客獲取信息的途徑。設想一下我們如何從網絡上獲取正常的密碼文件和其他安全文件?下面我們舉出一些例子來獲取此類信息。
     Index of /admin
     Index of /passwd
     Index of /password
     Index of /mail

    「Index of /」 +passwd
    「Index of /」 +password.txt
    「Index of /」 +.htaccess
    「Index of /secret」
    「Index of /confidential」
    「Index of /root」
    「Index of /cgi-bin」
    「Index of /credit-card」
    「Index of /logs」
    「Index of /config」
  選其中的一項「Index of /admin」,我們在Google中進行搜索測試共獲得6,498,000個結果。另一項「Index of /」+passwd獲得5,130個結果。
  2、利用「inurl:」或「allinurl:」尋找易攻擊的站點或服務器
  (1)利用「allinurl:winnt/system32/」,通過網絡直接連向服務器的受限目錄「system32」。如果您足夠幸運,甚至可以在「system32」中獲得cmd.exe執行權限。一旦具備這一權限,您就可以完全控制遠程的服務器。
  (2)利用「allinurl:wwwboard/passwd.txt」,在google搜索引擎中可直接連向易於受攻擊的弱密碼服務器。
  (3)利用「inurl:.bash_history」,通過網絡可直接連接服務器的「.bash_history」文件,這是一個歷史命令記錄文檔。這個文件包括超級管理員的執行命令序列,甚至包含一些敏感信息,如管理員口令序列,就算是加密的unix(包括*nix)密碼,利用「John The Ripper」也很容易破解。
  (4)利用「inurl:config.txt」,通過網絡可連接到服務器的「config.txt」文檔,這個文件信息包括管理員密碼和數據認證簽名的hash值。
  (5)其他相似「inurl:」和「allinurl:」配合其他語法的搜索。
    inurl:admin filetype:txt
    inurl:admin filetype:db
    inurl:admin filetype:cfg
    inurl:mysql filetype:cfg
    inurl:passwd filetype:txt
    inurl:iisadmin
    inurl:auth_user_file.txt
    inurl:orders.txt
    inurl:「wwwroot/*.」
    inurl:adpassword.txt
    inurl:webeditor.php
    inurl:file_upload.php

    inurl:gov filetype:xls 「restricted」
    index of ftp +.mdb allinurl:/cgi-bin/ +mailto
  選其中的一項inurl:iisadmin,我們在Google中進行搜索測試共獲得186個結果。另一項index of ftp+.mdb allinurl:/cgi-bin/+mailto,共獲得30個結果。
  3、利用「intitle:」或「allintitle:」尋找易攻擊的站點或服務器
  (1)利用[allintitle:「index of /root」通過連向服務器的受限目錄入口,如「root」。這個目錄通過簡單查詢很容易找到系統敏感信息。
  (2)利用[allintitle:「index of /admin」]通過連向服務器的受限目錄入口如「admin」。大部分網絡註冊用類似於這樣的名字存放超級用戶認證信息。這個目錄通過簡單查詢也很容易找到系統敏感信息。
  (3)其他相似「intitle:」和「allintitle:」配合其他語法的搜索
    intitle:「Index of」 .sh_history
    intitle:「Index of」 .bash_history
    intitle:「index of」 passwd
    intitle:「index of」 people.lst
    intitle:「index of」 pwd.db
    intitle:「index of」 etc/shadow
    intitle:「index of」 spwd
    intitle:「index of」 master.passwd
    intitle:「index of」 htpasswd
    intitle:「index of」 members OR accounts
    intitle:「index of」 user_carts OR user_cart

    allintitle: sensitive filetype:doc
    allintitle: restricted filetype :mail
    allintitle: restricted filetype:doc site:gov
  選其中的一項intitle:「index of」 htpasswd,我們在Google中進行搜索測試共返回8個結果,另一項intitle:「index of」 passwd共獲得2個結果。
4 其他查詢問題
  (1)通過查詢易受攻擊站點的腳本(XSS)攻擊
    allinurl:/scripts/cart32.exe
    allinurl:/CuteNews/show_archives.php
    allinurl:/phpinfo.php
  (2)通過查詢易受攻擊站點的SQL口令攻擊
    allinurl:/privmsg.php
    allinurl:/privmsg.php
arrow
arrow
    全站熱搜

    凌 于右 發表在 痞客邦 留言(0) 人氣()