hce_kmu
113年
計算機概論與程式設計
第 25 題
Which of the followings best describes a buffer overflow vulnerability?
- A Allowing unauthorized access to restricted files or directories
- B Executing arbitrary code by injecting malicious SQL queries
- C Overloading a server by sending a large volume of requests in a short time
- D Writing data beyond the bounds of a fixed-size buffer, leading to memory corruption
- E Intercepting and decrypting network traffic to steal sensitive information
思路引導 VIP
請試著思考:當一個程式在記憶體中預留了一塊固定大小的空間來存放資料,但它卻沒有檢查輸入資料的大小就直接寫入,這時多出來的資料會跑到哪裡去?這對緊鄰在旁邊的其他重要指令或數據會產生什麼影響?
🤖
AI 詳解
AI 專屬家教
恭喜你精準地選出了正確答案!這顯示你對於程式執行時的記憶體分配有著相當紮實的理解。
記憶體邊界與溢位原理
緩衝區溢位 (Buffer Overflow) 是一種極為經典且危險的資安漏洞。正如選項 (D) 所描述,當程式試圖將大量資料寫入一個空間有限的「緩衝區」時,若沒有事先檢查資料長度,多出來的資料就會像滿溢的水一樣,「淹沒」並覆蓋掉相鄰的記憶體位址。這種行為會導致記憶體損壞 (Memory Corruption),輕則讓程式當機,重則讓攻擊者趁機修改函式的返回位址(Return Address),進而取得系統的控制權。
▼ 還有更多解析內容