2018年11月22日 星期四

【WebInspect】WebInspect 18.20 15天試用版申請安裝紀錄



// 所以說官網註冊跟用軟體註冊到底有什麼鳥毛關係?

根據官方申請試用說明,步驟如下:

1.    下載Web Inspect並安裝 網址 (WebInspect_64_18.20.zip)

2.    解壓縮後可看到內容物有3 (exemsi、歡迎你pdf)



3.    執行exemsi都可以,只是 Web Inspect 需要安裝 .Net Framework 及 SQL Server

4.    Web Inspect在安裝時可以直接幫你裝.Net Framework 4.6.1,但由於Windows7不支援4.6.1所以會出錯,這時可以參考MS網站的建議,使用Windows Update或到自行下載SP1來安裝 網址 (KB976932)

補充:自行下載的頁面,有一拖拉庫的選擇可以下載,我這邊由於是Windows7x64,所以下載 「windows6.1-KB976932-X64.exe」 安裝就可以了



5.    安裝完.Net Framework後,會跳出提示要先關閉視窗,自行裝好SQL Server再繼續進行 網址 (SQL Server 2014 Express)

6.    這樣基本上就完成啦!接著開始申請試用,選擇「Register 15 Day Trial」,填好資料就可以收到官方寄來的Trial License mail (電子郵件信箱要填對啊)

填入序號後按Next


出現成功訊息!



補充:這裡我一直遇到「Unable to request trial. Please contact Fortify support. Operation has timed out」錯誤訊息,後來隔天再試就成功了,如果確定網路有通或proxy有設定對卻出錯,就有耐心的多試幾次() (


補充:開啟後如果出現SQL Server錯誤訊息,可以去檢查一下是不是服務沒開~




對了官網的試用註冊一點用都沒有,資訊貌似也不同步,到底為什麼設計兩套出來咧~ (填寫郵遞區號那邊根本陷阱



// 完畢

使用的紀錄就下次再補充了~

// 抄文章又盜圖的人吃大便去吧

2018年4月26日 星期四

【Fortify】XML External Entity Injection



只能說Code寫一天,修補要3


有問題的寫法:(XML檔案放入自定義的EmployeeUpdate Object)
  1. File XMLfile = new File("employee.xml");
  2. JAXBContext jaxbContext = JAXBContext.newInstance(EmployeeUpdate.class);
  3. Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
  4. employee = (EmployeeUpdate) jaxbUnmarshaller.unmarshal(XMLfile);


Fortify建議寫法:




修正後:
  1. File XMLfile = new File("employee.xml");
  2. JAXBContext jc = JAXBContext.newInstance(EmployeeUpdate.class);
  3. Unmarshaller u = jc.createUnmarshaller();
  4. DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  5. dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl"true);
  6. dbf.setNamespaceAware(true);
  7. DocumentBuilder db = dbf.newDocumentBuilder();
  8. Document document = db.parse(XMLfile);
  9. employee = (EmployeeUpdate) u.unmarshal(document);




輕描淡寫的紀錄,事實上試了很久才發現重點是DocumentBuilderFactorysetFeature,因為一開始並不是用JAXBContext來處理XML的。

成功解決一高風險! (