Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
技高一籌,還是人為疏失,由 gov.ph 窺探 vim 疏忽
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Lex Chien
May 26, 2013
Technology
1
170
技高一籌,還是人為疏失,由 gov.ph 窺探 vim 疏忽
技高一籌,還是人為疏失,由 gov.ph 窺探 vim 疏忽
Lex Chien
May 26, 2013
Tweet
Share
More Decks by Lex Chien
See All by Lex Chien
樹木心理測驗
lexchien
0
5.3k
SEO在做些什麼
lexchien
1
640
Other Decks in Technology
See All in Technology
GitHub Actions侵害 — 相次ぐ事例を振り返り、次なる脅威に備える
flatt_security
8
6.7k
JEDAI認定プログラム JEDAI Order 2026 受賞者一覧 / JEDAI Order 2026 Winners
databricksjapan
0
400
MIX AUDIO EN BROADCAST
ralpherick
0
120
AWS Systems Managerのハイブリッドアクティベーションを使用したガバメントクラウド環境の統合管理
toru_kubota
1
190
タスク管理も1on1も、もう「管理」じゃない - KiroとBedrock AgentCoreで変わった“判断の仕事”
yusukeshimizu
0
140
FASTでAIエージェントを作りまくろう!
yukiogawa
4
160
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
1
210
Oracle Cloud Infrastructure:2026年3月度サービス・アップデート
oracle4engineer
PRO
0
200
Kubernetesの「隠れメモリ消費」によるNode共倒れと、Request適正化という処方箋
g0xu
0
150
PostgreSQL 18のNOT ENFORCEDな制約とDEFERRABLEの関係
yahonda
0
150
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
5
1.2k
脳が溶けた話 / Melted Brain
keisuke69
1
1.1k
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
91
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
500
Being A Developer After 40
akosma
91
590k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
500
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
310
Raft: Consensus for Rubyists
vanstee
141
7.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Music & Morning Musume
bryan
47
7.1k
Transcript
技高一籌,還是人為疏失 由 gov.ph 窺探 vim 疏忽 <
[email protected]
>
VIM 有不少人,都會偏好 vim 來進行開發寫程式的習慣 那你有沒有注意過在寫php時候所產生的備份檔 例如 http://xxx.com/xxx.php~ 這種檔案結尾的php一般都是vim 所自動產生出來的備份檔 你有沒有想過這樣的檔案有一天成為你網站的漏洞主要來源
而且還是透漏所有source code.... 以下以 http://dns.gov.ph/ 網站為例
gov.ph
前端 有寫過程式都是,後端的程式碼在前端不太會被讀取出來 甚是顯示在面上 一般在網頁上 點選右鍵 -> 查看原始碼 這種動作的情況所能看到的原始碼都是 html,js,css 這
前端的source code 但如果有一天你寫的 php 在前端能被讀取出來時候,如果 是個開發者你作何感想?
不能說的秘密 vim所產生的 備份檔就是如此 例如 http://dns.gov.ph/ajaxResponse/modReqs.php 打 開的頁面空白一片 既沒有錯誤訊息,也沒有404,這就表示這頁很有可能是一 支邏輯判斷的php 那在結尾嘗試加上
"~" 修改後為 http://dns.gov.ph/ajaxResponse/modReqs. php~如此將會得到這支php的原始碼....
source code
習慣成自然 寫程式都知道,主網站最重要的就是DB 資料庫的帳號密 所以在設定的帳號密碼那隻的php也格外重要,但很多都會 “偷懶“ 把檔名取為 connect.php connection.php.....等等等諸如此 的檔名 如此在進行猜測的時候也很容易進行猜測
繼續挖掘 同上繼續用gov.ph為例 例如 http://dns.gov.ph/process/connection.php 這裡打開頁面也是空的,沒關係今天再嘗試在結尾中加上 "~“ 那麼將會得到 http://dns.gov.ph/process/connection.php~ 點擊打開後頁面將會得到DB所有的位置和帳號密碼
帳密圖示
結論 BTW.....你以為你用notpad++就不會有這樣問題嗎.....? 手法不是新一定最好,而是有用才是上上策
About me X = { µɛ }F³ • Lex Chien
• this’s my website -- http://www.xsoin.com This’s my class This’s my function This’s my world style