ITAS Team phát hiện lỗ hổng SQL Injection trong ProjectSend r561
ITAS Team đã phát hiện một lỗ hổng SQL Injection trong ProjectSend-r561 CMS. Thông qua lỗ hổng này, hacker có thể thực thi tùy ý các câu lệnh truy vấn SQL. Nguyên nhân của lỗ hổng là do dữ liệu đầu vào từ người dùng cung cấp không được chặn lọc đúng cách (giá trị của tham số đầu vào id có kiểu dữ liệu là Integer nhưng thay vì phải dùng hàm lọc là int() ứng dụng lại dùng hàm lọc là mysql_real_escape_string(), do đó lỗ hổng SQL Injection tồn tại).
Các cá nhân và tổ chức đang sử dụng CMS này nên chú ý và khắc phục.
Thông tin về lỗ hổng:
– Lỗ hổng: SQL injection
– Nhà sản xuất: http://www.projectsend.org/
– Download link: http://www.projectsend.org/download/67/
– Phiên bản lỗi: ProjectSend r561
– Phiên bản vá: N/A
– CVE ID: CVE-2015-2564
– Phát hiện bởi: Le Ngoc Phi (phi.n.le@itas.vn) & ITAS Team (www.itas.vn)
Chi tiết về lỗ hổng:
+ REQUEST:
GET /projectsend/users-edit.php?id= HTTP/1.1
Host: research-itasvn.rhcloud.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: 54f8105d859e0_SESSION=q6tjpjjbt53nk1o5tnbv2123456; PHPSESSID=jec50hu4plibu5p2p6hnvpcut6
Connection: keep-alive
– Tập tin chứa lỗ hổng: client-edit.php
– Tham số: id
– Code:
if (isset($_GET[‘id’])) {
$client_id = mysql_real_escape_string($_GET[‘id’]);
/**
* Check if the id corresponds to a real client.
* Return 1 if true, 2 if false.
**/
$page_status = (client_exists_id($client_id)) ? 1 : 2;
}
else {
/**
* Return 0 if the id is not set.
*/
$page_status = 0;
}
/**
* Get the clients information from the database to use on the form.
*/
if ($page_status === 1) {
$editing = $database->query(“SELECT * FROM tbl_users WHERE id=$client_id”);
while($data = mysql_fetch_array($editing)) {
$add_client_data_name = $data[‘name’];
$add_client_data_user = $data[‘user’];
$add_client_data_email = $data[’email’];
$add_client_data_addr = $data[‘address’];
$add_client_data_phone = $data[‘phone’];
$add_client_data_intcont = $data[‘contact’];
if ($data[‘notify’] == 1) { $add_client_data_notity = 1; } else { $add_client_data_notity = 0; }
if ($data[‘active’] == 1) { $add_client_data_active = 1; } else { $add_client_data_active = 0; }
}
}
Công bố thông tin:
+ 01/06/2015: Phát hiện lỗ hổng
+ 01/07/2015: Liên hệ nhà sản xuất
+ 01/08/2015: Gửi chi tiết lỗi cho nhà sản xuất, nhà sản xuất không phản hồi
+ 03/05/2015: Công bố thông tin