Rapid7 Vulnerability & Exploit Database

Malicious Git HTTP Server For CVE-2018-17456

Back to Search

Malicious Git HTTP Server For CVE-2018-17456

Disclosed
10/05/2018
Created
03/19/2019

Description

This module exploits CVE-2018-17456, which affects Git versions 2.14.5, 2.15.3, 2.16.5, 2.17.2, 2.18.1, and 2.19.1 and lower. When a submodule url which starts with a dash e.g "-u./payload" is passed as an argument to git clone, the file "payload" inside the repository is executed. This module creates a fake git repository which contains a submodule containing the vulnerability. The vulnerability is triggered when the submodules are initialised (e.g git clone --recurse-submodules URL)

Author(s)

  • timwr

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/multi/http/git_submodule_url_exec
msf exploit(git_submodule_url_exec) > show targets
    ...targets...
msf exploit(git_submodule_url_exec) > set TARGET < target-id >
msf exploit(git_submodule_url_exec) > show options
    ...show and set options...
msf exploit(git_submodule_url_exec) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;