
OWASP Top 10 Application Security Risks (2017)
OWASP (Open Web Application Security Project)
A1 – Injection
Injection flaws, such as SQL, NoSQL, OS, and LDAP injection, occur when untrusted data is sent to an interpreter as part of a command or query. The attacker’s hostile data can trick the interpreter into executing unintended commands or accessing data without proper authorization.
A2 – Broken Authentication
Application functions related to authentication and session management are often implemented incorrectly, allowing attackers to compromise passwords, keys, or session tokens, or to exploit other implementation flaws to assume other users’ identities temporarily or permanently.
A3 – Sensitive Data Exposure
Many web applications and APIs do not properly protect sensitive data, such as financial, healthcare, and PII. Attackers may steal or modify such weakly protected data to conduct credit card fraud, identity theft, or other crimes. Sensitive data may be compromised without extra protection, such as encryption at rest or in transit, and requires special precautions when exchanged with the browser.
A4 – XML External Entities (XXE)
Many older or poorly configured XML processors evaluate external entity references within XML documents. External entities can be used to disclose internal files using the file URI handler, internal file shares, internal port scanning, remote code execution, and denial of service attacks.
A5 – Broken Access Control
Restrictions on what authenticated users are allowed to do are often not properly enforced. Attackers can exploit these flaws to access unauthorized functionality and/or data, such as access other users’ accounts, view sensitive files, modify other users’ data, change access rights, etc.
A6 – Security Misconfiguration
Security misconfiguration is the most commonly seen issue. This is commonly a result of insecure default configurations, incomplete or ad hoc configurations, open cloud storage, misconfigured HTTP headers, and verbose error messages containing sensitive information. Not only must all operating systems, frameworks, libraries, and applications be securely configured, but they must be patched/upgraded in a timely fashion.
A7 – Cross-Site Scripting (XSS)
XSS flaws occur whenever an application includes untrusted data in a new web page without proper validation or escaping, or updates an existing web page with user-supplied data using a browser API that can create HTML or JavaScript. XSS allows attackers to execute scripts in the victim’s browser which can hijack user sessions, deface web sites, or redirect the user to malicious sites.
A8 – Insecure Deserialization
Insecure deserialization often leads to remote code execution. Even if deserialization flaws do not result in remote code execution, they can be used to perform attacks, including replay attacks, injection attacks, and privilege escalation attacks.
A9 – Using Components with Known Vulnerabilities
Components, such as libraries, frameworks, and other software modules, run with the same privileges as the application. If a vulnerable component is exploited, such an attack can facilitate serious data loss or server takeover. Applications and APIs using components with known vulnerabilities may undermine application defenses and enable various attacks and impacts.
A10 – Insufficient Logging&Monitoring
Insufficient logging and monitoring, coupled with missing or ineffective integration with incident response, allows attackers to further attack systems, maintain persistence, pivot to more systems, and tamper, extract, or destroy data. Most breach studies show time to detect a breach is over 200 days, typically detected by external parties rather than internal processes or monitoring.
OWASP Top 10 Application Security Risks (2017)
OWASP ย่อมาจาก Open Web Application Security Project
A1 – Injection
ข้อบกพร่องในการเข้าถึง SQL NoSQL OS และ LDAP เกิดขึ้นเมื่อมีข้อมูลที่ไม่น่าเชื่อถือถูกส่งไปยังส่วนของ command หรือ query โดยผู้บุกรุกจะใช้ trick ในการส่งข้อมูลไปก่อกวนหรือเข้าถึงข้อมูลนั้นๆโดยไม่ได้รับอนุญาต
A2 – Broken Authentication
ฟังก์ชันในแอปพลิเคชันที่เกี่ยวข้องกับการตรวจสอบสิทธ์และการจัดการ session มักใช้งานไม่ถูกต้อง ทำให้ผู้บุกรุกสามารถสร้างความเสียหายกับ password, keys หรือ session token หรือใช้ประโยชน์จากข้อบกพร่องเหล่านี้ในการใช้งานอื่นๆ เช่น การปลอมตัวเป็นผู้ใช้รายอื่นๆแบบชั่วคราวหรือถาวรได้
A3 – Sensitive Data Exposure
เว็บแอปพลิเคชันและ APIs จำนวนมากไม่สามารถป้องกันข้อมูลสำคัญได้ เช่น การเงิน เรื่องสุขภาพ และ PII ผู้บุกรุกอาจจะขโมยหรือแก้ไขข้อมูลที่มีการป้องกันต่ำเพื่อการโกงบัตรเครดิต การโจรกรรม หรืออาชญากรรมอื่นๆ ข้อมูลที่ที่มีความสำคัญอาจถูกบุกรุกโดยไม่มีการป้องกันแบบพิเศษ เช่น การเข้ารหัสข้อมูลที่เหลือในระหว่างการถ่ายโอนข้อมูล และควรต้องระวังเป็นพิเศษเมื่อมีการแลกเปลี่ยนข้อมูลกับบราวเซอร์
A4 – XML External Entities (XXE)
XML processors เก่าจำนวนมากถูกประเมินจากแหล่งอ้างอิงภายใน XML documents ซึ่งมีการใช้ entities ภายนอกเพื่อเปิดเผยไฟล์ภายในโดยใช้ตัวจัดการไฟล์ URI, การแชร์ไฟล์ภายใน, การสแกนพอร์ตภายใน, การเรียกใช้ code จากระยะไกล และการปฏิเสธการให้บริการ
A5 – Broken Access Control
ข้อจำกัดในสิ่งที่ผู้ใช้ได้รับการรับรองความถูกต้อง ทำให้ไม่ได้รับการบังคับใช้อย่างเหมาะสม ผู้บุกรุกสามารถใช้ข้อบกพร่องเหล่านี้เพื่อเข้าถึงฟังก์ชันการทำงานหรือข้อมูลที่ไม่ได้รับอนุญาต เช่น การเข้าถึงบัญชีผู้ใช้คนอื่น เพื่อดูไฟล์ที่มีความสำคัญ แก้ไขข้อมูลส่วนตัวของผู้ใช้รายอื่น เปลี่ยนสิทธิ์การเข้าถึง เป็นต้น
A6 – Security Misconfiguration
การกำหนดค่าความปลอดภัยในการรักษาความปลอดภัยเป็นปัญหาที่เห็นบ่อย เป็นผลมาจากการกำหนดค่าเริ่มที่ไม่ปลอดภัย, การกำหนดค่าที่ไม่สมบูรณ์, ที่เก็บข้อมูลบน cloud แบบเปิด, ส่วนหัวของ HTTP ที่กำหนดค่าผิดพลาด และข้อความแสดงข้อผิดพลาด verbose ที่มีความสำคัญ ไม่เพียงแต่ระบบปฏิบัติการทั้งหมดเท่านั้น ยังมี frameworks, libraries และแอปพลิเคชันสามารถกำหนดค่าความปลอดภัย แต่ต้องได้รับการ patched/upgraded ในเวลาที่เหมาะสม
A7 – Cross-Site Scripting (XSS)
ข้อบกพร่อง XSS เกิดขึ้นเมื่อใดก็ตามที่แอปพลิเคชันมีข้อมูลที่ไม่น่าเชื่อถือในหน้าเว็บเพจ โดยไม่มีการตรวจสอบความถูกต้องหรือการหลีกเหลี่ยง หรือการอัปเดตหน้าเว็บโดยใช้ข้อมูลจากผู้ใช้ โดยใช้ API ที่สามารถสร้าง HTML หรือ JavaScript XSS อนุญาตให้ผู้บุกรุกสามารถเรียกใช้ script ในบราวเซอร์ของผู้ใช้ เพื่อชิง session ของผู้ใช้, deface เว็บไซต์ หรือเปลี่ยนเส้นทางของผู้ใช้ไปยังไซต์ที่เป็นอันตราย
A8 – Insecure Deserialization
Deserialization ที่ไม่ปลอดภัยมักนำไปสู่การเรียกใช้ code จากระยะไกล แม้ว่าข้อบกพร่อง deserialization จะไม่ส่งผลให้เกิดการเรียกใช้ code จากระยะไกล แต่สามารถใช้เพื่อโจมตีได้ รวมถึงการโจมตีซ้ำๆ การโจมตีแบบ injection และการโจมตีแบบพิเศษ
A9 – Using Components with Known Vulnerabilities
Components เช่น libraries, frameworks, และ software modules อื่นๆ, รันด้วยสิทธิ์เดียวกันกับแอปพลิเคชัน หากมีการใช้งาน Component ที่มีช่องโหว่ อาจทำให้การโจมตีดังกล่าวเกิดการสูญเสียข้อมูลหรือการเข้าครอบครองการใช้ server อย่างสมบูรณ์ โดยแอปพลิเคชันและ API ที่ใช้ Components ที่มีช่องโหว่อาจจะทำให้ระบบการป้องกันแอปพลิเคชันถูกทำลาย และทำให้เกิดการโจมตีและมีผลกระทบสูง
A10 – Insufficient Logging&Monitoring
การบันทึกและการตรวจสอบไม่เพียงพอ ควบคู่กับการขายหายไปหรือไม่มีประสิทธิภาพในการตอบสนองในเหตุการณ์ต่างๆที่เกิด ช่วยให้ผู้บุกรุกสามารถโจมตีระบบได้ต่อไป การคงอยู่ในระบบ และเกิดความยุ่งเหยิง หรือการทำลายข้อมูล การศึกษาเกี่ยวกับการละเมิดส่วนใหญ่จะสามารถตรวจพบต้องใช้เวลามากกว่า 200 วัน มักจะถูกตรวจพบโดยบุคคลภายนอกมากกว่าการตรวจสอบภายในองค์กรหรือการ monitoring
