Blog

경로 탐색 취약점이 최근 아파치 문제의 원인으로 작용한 영향을 경험해 보십시오.

October 18, 2021
Charlie Eriksen

10월 초에 아파치는 문제를 해결하기 위해 버전 2.4.49를 출시했습니다. 경로 탐색 및 원격 코드 실행 취약성 그런 다음 2.4.50을 사용하여 2.4.49의 수정이 불완전하다는 사실을 해결했습니다.소셜 미디어에서 이러한 위험을 피하려면 최신 버전으로 업데이트하는 것이 중요하다는 이야기를 본 적이 있을 것입니다. 일부 추정에 따르면 Apache는 인터넷의 25% 를 지원합니다..하지만 무슨 일이야?여기에는 얼마나 많은 위험이 존재할까요?

직접 체험해 보지 않겠습니까?

우리는 실제 환경에서 위험을 입증한다는 사명을 세웠고 모든 사람이 시도할 수 있도록 공개했습니다.이번 미션에서는 Path Traversal 취약점이 인프라와 애플리케이션에 어떤 영향을 미칠 수 있는지 안내해 드리겠습니다.아래를 클릭하여 바로 시작하거나, 계속 읽으면서 취약점에 대해 자세히 알아보세요.

Banner that says try out the Apache CVE-2021-41773 Mission
공개 미션으로 이동


경로 탐색 취약성에 대한 정보 

이 취약점은 2.4.49 릴리스에서 도입되었습니다 (URL 정규화 기능 변경으로 인해) 에서 새로운 경로 정규화 기능이 도입되었습니다.안타깝게도 URL 인코딩 경로를 제대로 정규화하지 못했습니다.이를 통해 다음을 수행할 수 있습니다. 경로 트래버설 공격 다음 구성이 없는 경우

Deny or permit access to directory file system


그리고 만약 mod_cgi 활성화되면 원격 코드 실행 취약점에 악용될 수도 있습니다.하지만 무엇이 잘못되었는지 더 잘 이해하기 위해 먼저 URL 인코딩을 자세히 살펴보겠습니다.

URL 인코딩

기본적으로 이 취약점은 URL 인코딩을 사용하는 URL에 대한 고려가 부족하기 때문에 발생합니다.새로 도입된 경로 정규화 기능은 점이 URL로 인코딩되는 경우를 완전히 처리하지 못했습니다.

경로 순회 공격을 수행하려면 시퀀스를 따라 트래버스해야 한다는 점을 기억하십시오. ../.하지만 정규화 함수는 이 부분을 제거할 수 있을 만큼 똑똑합니다.그럼 어떻게 하시나요?URL을 인코딩할 수 있습니다. .(도트) 아래로 %2e, 다음과 같은 시퀀스를 사용하십시오. .% 2e/.이는 대부분의 경우 아파치 2.4.40에서 작동할 것입니다.하지만 한 단계 더 나아가 이중 인코딩할 수도 있습니다.의 URL 인코딩 버전입니다. .% 2e/ 입니다 .% 252e/.이를 통해 아파치가 시도한 정규화를 더 우회할 수 있었다.

하지만 한 가지 문제가 있습니다

누군가가 브라우저에서 바로 이 취약점을 악용하려 한다면 성공하지 못할 것입니다.이는 브라우저가 서버로 전송되는 URL도 정규화하려고 하기 때문입니다.즉, 이중 인코딩된 시퀀스도 삭제됩니다.이는 또한 단순히 브라우저를 사용하여 이를 증명할 수 없다는 의미이기도 합니다.

cURL은 다음을 사용하여 이를 증명할 수 있습니다. --있는 그대로의 경로 URL을 보내기 전에 URL을 정규화하지 못하도록 하는 플래그:

Curl path as is code with link

예방 및 완화

문제를 완전히 방지하려면 Apache의 최신 패치를 최신 상태로 유지하는 것이 중요합니다.특히 최소한 2.4.51로 업그레이드하는 것이 좋습니다.하지만 정기적으로 업그레이드하여 최신 상태를 유지하는 것이 좋습니다.

2.4.49를 실행하는 경우 이 문제를 완화하려면 Apache 구성에 다음을 포함했는지 확인하십시오.

Directory code tags with allowoverride none and require all denied rules

그리고 원격 코드 실행을 방지하려면 비활성화 mod_cgi 사용하지 않는 경우.

그 영향을 직접 경험해 보세요

정확히 무슨 일이 있었는지 알아보고 직접 시험해 보고 싶으신가요?


태그라인

Govern AI-driven development before it ships

Measure AI-assisted risk, enforce secure coding policy at commit, and accelerate secure delivery across your SDLC.

book a demo
태그라인

Explore more blogs

우리는 이 방법을 잘 알고 있습니다. 우리는 이 두 가지 축복을 골고루 살기 위해 노력하고 있습니다.

browse all
Case Study
Filter Label
This is some text inside of a div block.

Supercharged Security Awareness: How Tournaments are Inspiring Developers at Erste Group

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Learn More
Case Study
Filter Label
This is some text inside of a div block.

Security as culture: How Blue Prism cultivates world-class secure developers

Learn how Blue Prism, the global leader in intelligent automation for the enterprise, used Secure Code Warrior's agile learning platform to create a security-first culture with their developers, achieve their business goals, and ship secure code at speed

Learn More
Case Study
Filter Label
This is some text inside of a div block.

One Culture of Security: How Sage built their security champions program with agile secure code learning

Discover how Sage enhanced security with a flexible, relationship-focused approach, creating 200+ security champions and achieving measurable risk reduction.

Learn More
Blog
Filter Label
This is some text inside of a div block.

The Future of AI Software Governance Is Built on Strong Partnerships

Discover why Secure Code Warrior is becoming a channel-first company and how trusted partners help organizations adopt AI Software Governance securely and at scale.

Learn More
Blog
Filter Label
This is some text inside of a div block.

Citizen AI by Secure Code Warrior: Build an AI-Ready Workforce

Secure Code Warrior's AI literacy program for non-developer employees.

Learn More
Blog
Filter Label
This is some text inside of a div block.

Why most CISOs are navigating AI adoption blindfolded (and how they can remove it)

Today, Secure Code Warrior issued an all-new white paper covering a prescriptive, directional AI adoption model that security leaders can use to identify their adoption stage and make real progress in bringing the AI security risks within their organization under control.

Learn More

Secure AI-driven development before it ships

See developer risk, enforce policy, and prevent vulnerabilities across your software development lifecycle.

Book a demo