<menu id="guoca"></menu>
<nav id="guoca"></nav><xmp id="guoca">
  • <xmp id="guoca">
  • <nav id="guoca"><code id="guoca"></code></nav>
  • <nav id="guoca"><code id="guoca"></code></nav>

    Pentaho Business Analytics CVE-2021-31599命令執行等系列漏洞分析

    VSole2021-11-16 21:43:30

    漏洞信息

    Pentaho Business Analytics商業分析解決方案提供現代化的、簡單和交互式的方式,使商業用戶可以訪問、挖掘和混合所有類型和大小的數據。由于先進的分析方案越來越多,從基本的報表到預測建模,用戶可以從多個維度分析和可視化數據,并且最大限度減小對IT的依賴。同時,實際的移動設計體驗使得用戶無論身處何地,都有很高的工作效率。

    該軟件最近爆出存在未授權認證SQL注入等一系列漏洞,主要信息如下:

    • CVE-2021-31599 (CVSS score: 9.9) - Remote Code Execution through Pentaho Report Bundles
    • CVE-2021-31600 (CVSS score: 4.3) - Jackrabbit User Enumeration
    • CVE-2021-31601 (CVSS score: 7.1) - Insufficient Access Control of Data Source Management
    • CVE-2021-31602 (CVSS score: 5.3) - Authentication Bypass of Spring APIs
    • CVE-2021-34684 (CVSS score: 9.8) - Unauthenticated SQL Injection
    • CVE-2021-34685 (CVSS score: 2.7) - Bypass of Filename Extension Restrictions

    可以從官網下載相關版本進行環境搭建,安裝完畢后默認管理員賬密為`admin:Password`,啟動軟件:

    使用`start-pentaho-debug.bat`手動啟動服務可遠程進行調試,端口為8044。

    CVE-2021-31602

    `C:\Pentaho\server\pentaho-server\pentaho-solutions\system\applicationContext-spring-security.xml`定義了API接口的處理規則,注意到其中以`*require-cfg.js`結尾的接口可以以`Anonymous`身份訪問。

    登錄頁面,許多js都是以`require-cfg.js`結尾,應該是為了考慮靜態文件訪問而添加了對應的規則。

    找一個API請求,在URL后添加`js=require-cfg.js`,成功繞過認證。

    列舉出一些API列表。

    http://localhost:8080/pentaho/api/version/show?js=require-cfg.jshttp://localhost:8080/pentaho/api/version/softwareUpdates?js=require-cfg.jshttp://localhost:8080/pentaho/api/emailconfig/isValid?js=require-cfg.jshttp://localhost:8080/pentaho/api/authorization/action/isauthorized?js=require-cfg.jshttp://localhost:8080/pentaho/api/userroledao/userRoles?js=require-cfg.jshttp://localhost:8080/pentaho/api/system/locale?js=require-cfg.jshttp://localhost:8080/pentaho/api/system/timezones?js=require-cfg.jshttp://localhost:8080/pentaho/api/system/executableTypes?js=require-cfg.jshttp://localhost:8080/pentaho/api/theme/list?js=require-cfg.jshttp://localhost:8080/pentaho/api/theme/active?js=require-cfg.jshttp://localhost:8080/pentaho/api/userrolelist/users?js=require-cfg.jshttp://localhost:8080/pentaho/api/userrolelist/roles?js=require-cfg.jshttp://localhost:8080/pentaho/api/userrolelist/allRoles?js=require-cfg.jshttp://localhost:8080/pentaho/api/userrolelist/systemRoles?js=require-cfg.jshttp://localhost:8080/pentaho/api/userrolelist/extraRoles?js=require-cfg.jshttp://localhost:8080/pentaho/api/userrolelist/permission-users?js=require-cfg.jshttp://localhost:8080/pentaho/api/userrolelist/permission-roles?js=require-cfg.jshttp://localhost:8080/pentaho/api/scheduler/state?js=require-cfg.jshttp://localhost:8080/pentaho/api/scheduler/jobinfotest?js=require-cfg.jshttp://localhost:8080/pentaho/api/scheduler/blockout/blockoutjobs?js=require-cfg.jshttp://localhost:8080/pentaho/api/scheduler/blockout/hasblockouts?js=require-cfg.jshttp://localhost:8080/pentaho/api/scheduler/blockout/shouldFireNow?js=require-cfg.jshttp://localhost:8080/pentaho/api/scheduler/generatedContentForSchedule?js=require-cfg.jshttp://localhost:8080/pentaho/api/repos/executableTypes?js=require-cfg.jshttp://localhost:8080/pentaho/api/plugin-manager/overlays?js=require-cfg.jshttp://localhost:8080/pentaho/api/mantle/locale?js=require-cfg.jshttp://localhost:8080/pentaho/api/mantle/isAuthenticated?js=require-cfg.jshttp://localhost:8080/pentaho/api/mantle/getAdminContent?js=require-cfg.jshttp://localhost:8080/pentaho/api/mantle/settings?js=require-cfg.jshttp://localhost:8080/pentaho/api/mantle/registeredPlugins?js=require-cfg.jshttp://localhost:8080/pentaho/api/service/assignment?js=require-cfg.jshttp://localhost:8080/pentaho/api/repo/files/reservedCharacters?js=require-cfg.jshttp://localhost:8080/pentaho/api/repo/files/generatedContentForSchedule?js=require-cfg.jshttp://localhost:8080/pentaho/api/repo/files/canAdminister?js=require-cfg.jshttp://localhost:8080/pentaho/api/repo/files/reservedCharactersDisplay?js=require-cfg.jshttp://localhost:8080/pentaho/api/session/userName?js=require-cfg.jshttp://localhost:8080/pentaho/api/session/workspaceDirForUser/{user}?js=require-cfg.jshttp://localhost:8080/pentaho/api/session/setredirect?js=require-cfg.jshttp://localhost:8080/pentaho/api/session/userWorkspaceDir?js=require-cfg.js
    

    CVE-2021-34684

    `/pentaho/api/repos/dashboards/editor`接口可執行SQL語句。

    CVE-2021-31599

    使用`Pentaho Business Analytics`支持報表功能設計和保存功能,可以通過WEB上傳并編輯Report報表,名稱為`Pentaho Report`文件。

    使用`\pentaho\design-tools\report-designer\report-designer.exe`程序可對PRPT文件進行設計,后綴名為PRPT。

    打開`Pie.prpt`示例文件,雙擊餅圖找到Scripting設置項目。

    支持的語法有`beanshell`、`groovy`等,這里使用beanshell,輸入語句。保存文件使用網頁打開。

    命令被成功運行,權限為`Local Service`。

    可以使用groovy語法直接獲取webshell。

    CVE-2021-31600

    用戶認證后可以獲取用戶列表,CVE-2021-31602無法繞過本接口。

    CVE-2021-31601

    用戶認證后可獲取用戶配置信息,CVE-2021-31602無法繞過本接口。

    CVE-2021-34685

    使用`UploadService`接口對文件上傳后綴名做了限制,但可以使用`filename.jsp.`繞過檢查,最后在`\server\pentaho-server\pentaho-solutions\system\metadata\csvfiles`目錄下寫入jsp文件,由于無法目錄穿越,漏洞影響有限。

    小結

    1、從實測效果來看,認證繞過漏洞適用的API范圍還是比較廣的,但針對某些核心業務接口在后續業務處理時會出錯,導致能執行的功能有限。以`報告文件`上傳接口為例,可以繞過檢查,但服務器在后續處理時由于定位不到用戶`ID`,只能報錯退出。

    2、創建用戶接口不會返回401錯誤,但無法創建用戶。

    3、默認`anonymousUser`在`jackrabbit`認證時出錯,不具備workspace訪問權限,這也導致很多接口無法正常執行功能。

    localhostpentaho
    本作品采用《CC 協議》,轉載必須注明作者和本文鏈接
    Pentaho Business Analytics CVE-2021-31599遠程命令執行等系列漏洞分析。
    一款CMS指紋識別工具
    2023-01-28 11:49:30
    由Go語言實現的一款CMS指紋識別工具。
    java審計之ofcms
    2022-12-30 11:05:58
    java審計之ofcms
    一次從jmx到rce
    2022-12-20 13:54:29
    jmx已知的利用方式有javax.management.loading.MLet加載遠程類rce,但是目標不出網必須用其他方式了。考慮到tomcat,想起來陳師傅寫過的《幾個Jolokia RCE 的“新”利用方式》通過tomcat的createStandardHost配合AccessLogValue進行rce。利用如下先創建Host為test.com?Catalina:type=Host,host=test.com然后tomcat的valve中就有了test.com的部署之后的結果修改host為test.com之后就可以訪問根目錄下的任意文件那么只需要寫入一個jsp文件就可以getshell了。寫入文件需要用AccessLogValue修改AccessLogValue的屬性suffix .jspprefix aafileDateFormat .yyyy-MM-ddpattern %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"directory /tmp/
    反彈shell命令速查
    2022-07-28 06:13:42
    反彈shell命令速查
    查命令絕對路徑: which用于查找并顯示給定命令的絕對路徑,環境變量中PATH參數也可以被查出來。
    滲透技巧總結
    2022-01-23 13:30:33
    整理一些滲透測試相關技巧總結~
    實驗一利用case語句編寫腳本,滿足下列要求1.執行create時根據userfile和passfile建立用戶
    本文將對EmpireCMS(帝國cms)的漏洞進行分析及復現。代碼分析這一塊主要還是借鑒了大佬們的一些分析思想,這里對大佬們提供的思路表示衷心的感謝。
    VSole
    網絡安全專家
      亚洲 欧美 自拍 唯美 另类