본문 바로가기
보안관리

OWASP (Open Web Application Security Project)

by ojava 2021. 4. 18.
반응형

보안취약점 조치를 하다보면 보게 되는 특정한 용어들이 있다.
그 중 아주 자주봤던 OWASP에 대해 자세히 알아보기로 하자.

 

 

OWASP (Open Web Application Security Project)

OWASP(Open Web Application Security Project)는 웹 애플리케이션 보안과 관련된 내용을 연구하는 프로젝트로, 정보노출, 악성 파일 및 스크립트, 보안 취약점 등을 연구하며 연구 결과를 토대로 10대 웹 애플리케이션의 취약점 (OWASP TOP 10)을 발표한다.

OWASP TOP 10은 웹 애플리케이션 취약점 중에서 빈도가 많이 발생하고, 보안상 영향을 크게 줄 수 있는 것들 10가지를 선정하는 것으로 2004년, 2007년, 2010년, 2013년, 2017년까지 3년 주기로 발표되었고, 가장 최근 버전이 2017년 버전인것으로 보아 최근에는 별도 발표내용이 없는 듯 하다.

공식 페이지에서 owasp.org/www-project-top-ten/ 2020년 계획에 대해서 언급만 되어있을 뿐, 최근 버전으로 2017년 버전을 언급하고 있으므로 2017년 버전을 최근 버전으로 소개한다.

 

 

Top 10 Web Application Security Risks (웹 애플리케이션 위험 Top 10)

  1. Injection
  2. Broken Authentication
  3. Sensitive Date Exposure
  4. XML External Entities (XXE)
  5. Broken Access Control
  6. Security Misconfiguration
  7. Cross-Site Scripting (XSS)
  8. Insecure Deserialization
  9. Using Components with Known Vulnerabilities
  10. Insufficient Logging & Monitoring

1. 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.

SQL, NoSQL, OS, LDAP 인젝션 취약점은, 신뢰할 수 없는 데이터가 명령어 또는 쿼리의 일부분으로 보내지면서 발생하는 취약점을 의미한다. 공격자의 악의적인 데이터는 예상하지 못한 명령을 실행하거나 적절한 권한이 부여되지 않은 데이터에 접근할 수 있도록 인터프리터를 속일 수 있다.

SQL Injection으로 가장 잘 알고 있는 이 취약점은 쿼리 구성방식부터 외부에서 들어온 입력내용이 쿼리로 수행되어 공격할 수 없도록 구성해야 한다. 

 

2. 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.

인증과 세션관리와 연관된 애플리케이션 펑션들은 종종 정확하게 구현되어있지 않아서 발생하는 취약점
공격자가 이런 펑션을 공격하여 비밀번호, 키, 세션 토큰을 해킹하거나 다른 취약점을 공격하여 다른 사용자의 계정을 일시적 혹은 영구적으로 탈취하는 것을 허용한다.

 

3. 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.

많은 웹 애플리케이션과 API들이 금융, 건강 정보와 같은 민감한 데이터를 제대로 보호하지 않는다. 공격자는 신용카드 사기, 신분 도용 또는 다른 범죄를 저지르기 위해 취약하게 보호된 데이터를 탈취하거나 변경할 수 있다.
중요한 데이터는 저장 또는 전송 중이거나 브라우저와 교환하는 경우 특별히 주의하여야 하며, 암호화와 같은 보호조치를 취해야 한다.

 

반응형

 

 

4. XML External Entities (XXE). (XML 외부개체)

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.

오래되거나 잘못구성된 XML 프로세서들은 XML 문서 내에서 외부 개체 참조를 평가한다.
외부 개체는 파일 URI 처리기, 내부 파일 공유, 내부 포트 검색, 원격 코드 실행과 서비스 거부 공격을 사용하여 내부 파일을 공개하는데 사용할 수 있다.

 

5. 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.

취약한 접근 통제는 인증된 사용자가 수행할 수 있는 작업에 대한 제한이 제대로 적용되지 않는 것을 의미한다. 공격자는 이러한 취약점을 악용하여 사용자의 계정 액세스, 중요한 파일 보기, 사용자의 데이터 수정, 액세스 권한 변경 등과 같은 권한 없는 기능, 또는 데이터에 액세스할 수 있다.

 

6. 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.

잘못된 보안구성은 가장 일반적으로 발생하는 문제이다.
이는 일반적으로 안전하지 않은 기본 구성, 불완전하거나 임시 구성, 개방형 클라우드 저장공간, 잘못 구성된 HTTP 헤더 및 민감한 정보가 포함된 자세한 오류 메시지의 결과이다.
모든 운영 체제, 프레임워크, 라이브러리, 애플리케이션을 안전하게 구성해야 할 뿐 아니라, 적시에 패치와 업그레이드를 수행하여 최신 상태로 유지해야 한다.

 

7. 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.

XSS 취약점은 애플리케이션이 적절한 유효성 검사나 제한 없이 신뢰할 수 없는 데이터를 가져와 웹 브라우저로 보낼 때 발생한다. XSS는 공격자가 피해자의 브라우저에 스크립트를 실행하여 사용자 세션 탈취, 웹 사이트 변조, 악의적인 사이트로 이동할 수 있다.

XSS를 크로스 사이트 스크립트로 자동으로 읽게 만들게 한 이 문제점은, 게시글 등을 작성할 수 있는 Form에 공격자가 스크립트를 입력하여 공격할 수 있도록 하는 취약점을 말한다. 게시판 기능을 구현할 때는 되도록 HTML 태그를 직접 입력할 수 없도록 구성해야 하며, 링크 등에도 태그 입력이 불가하게 구성해서 이 취약점을 방지해야 한다.

 

8. 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.

안전하지 않은 역직렬화는 종종 원격 코드 실행으로 이어진다. 이 취약점으로 인해 원격 코드가 실행되지는 않더라도, 권한 상승 공격, 주입 공격과 재생 공격을 포함한 다양한 공격 수행에 사용될 수 있다.

 

9. 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.

컴포넌트, 라이브러리, 프레임워크 및 다른 소프트웨어 모듈은 애플리케이션과 동일한 권한으로 실행된다. 취약한 구성요소가 악용하여 공격하는 경우 심각한 데이터 손실이 발생하거나 서버 탈취 상황을 일으킬 수 있다. 알려진 취약점이 있는 구성요소를 사용하는 애플리케이션과 API는 애플리케이션 방어를 약화시키고, 공격 가능한 범위를 활성화하는 등의 영향을 미친다.

 

10. 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.

불충분한 로깅과 모니터링은 사고 대응의 비효율적인 통합 또는 누락과 함께 공격자들이 시스템을 추가 공격하고, 지속성을 유지하며, 더 많은 시스템을 중심으로 공격할 수 있도록 만들고, 데이터를 변조, 추출 또는 파괴할 수 있도록 한다. 대부분의 침해 사례에서 침해를 감지하는데 걸리는 시간이 200일 이상이며, 이는 일반적으로 내부 프로세스와 모니터링이 아닌 외부기관이 탐지한다.

 

 

 

보면 대부분 알거라고 생각했는데, 직접적으로 체감이 가능한 영역은 Injection과 XSS 뿐이다.
로깅을 좀 더 상세하게 남기도록 구성하고 모니터링 방식을 좀 더 다변화해서 공격 또는 탈취 시도를 좀 더 탐지할 수 있는 방향에 대해 고민해봐야겠다. 

더불어 인프라 영역에서의 주기적인 업그레이드와 패치가 잘 이뤄지고 있어서 취약점에서 더 멀어질 수 있음에 감사한 마음을 다시 느껴본다. 인프라 화이팅..☆

 

 

[참고]

ko.wikipedia.org/wiki/OWASP

owasp.org/www-project-top-ten/

반응형