Rapid7 Vulnerability & Exploit Database

Pi-Hole heisenbergCompensator Blocklist OS Command Execution

Back to Search

Pi-Hole heisenbergCompensator Blocklist OS Command Execution

Disclosed
05/10/2020
Created
05/18/2020

Description

This exploits a command execution in Pi-Hole <= 4.4. A new blocklist is added, and then an update is forced (gravity) to pull in the blocklist content. PHP content is then written to a file within the webroot. Phase 1 writes a sudo pihole command to launch teleporter, effectively running a priv esc. Phase 2 writes our payload to teleporter.php, overwriting, the content. Lastly, the phase 1 PHP file is called in the web root, which launches our payload in teleporter.php with root privileges.

Author(s)

  • h00die
  • Nick Frichette

Platform

PHP

Architectures

php

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/unix/http/pihole_blocklist_exec
msf exploit(pihole_blocklist_exec) > show targets
    ...targets...
msf exploit(pihole_blocklist_exec) > set TARGET < target-id >
msf exploit(pihole_blocklist_exec) > show options
    ...show and set options...
msf exploit(pihole_blocklist_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

;