cbcvebase.
CVE-2004-2687
published 2004-12-31

CVE-2004-2687: distcc 2.x, as used in XCode 1.5 and others, when not configured to restrict access to the server port, allows remote attackers to execute arbitrary commands…

PriorityP269critical9.3CVSS 2.0
AVNACMAuNCCICAC
EXPLOIT
EPSS
90.47%
99.6th percentile
distcc 2.x, as used in XCode 1.5 and others, when not configured to restrict access to the server port, allows remote attackers to execute arbitrary commands via compilation jobs, which are executed by the server without authorization checks.

Affected

3 ranges
VendorProductVersion rangeFixed in
applexcode
debiandistcc< distcc 2.18.1-1 (bookworm)distcc 2.18.1-1 (bookworm)
sambasamba<= 2.18.3

Detection & IOCsextracted from sources · hover to see the quote

port3632
commandDIST00000001
commandDOTI0000000A
bytes
444953543030303030303031
bytes
41524743303030303030303841524756303030303030303273684152475630303030303030322d634152475630303030303030637368202d6320272869642927415247563030303030303031234152475630303030303030322d634152475630303030303030366d61696e2e634152475630303030303030322d6f4152475630303030303030366d61696e2e6f444f5449303030303030303141
  • Exploit traffic begins with the magic token 'DIST00000001' followed by 'ARGC' and argument count in hex — detect this pattern on TCP port 3632 to identify CVE-2004-2687 exploitation attempts.
  • The exploit appends 'ARGV' tokens for each shell argument (e.g., 'sh', '-c', payload) followed by a 'DOTI' token with a 10-byte alphanumeric tag and newline — monitor for this protocol sequence on port 3632.
  • The exploit disguises the payload as a compile job by appending '# -c main.c -o main.o' to the argument list — look for these literal strings in distccd TCP streams.
  • Successful exploitation results in command output containing 'uid=<N>...gid=<N>...' in the response — use this regex to confirm RCE in network captures or IDS.
  • The Nuclei probe sends the full hex-encoded distcc RCE payload (running 'id') over TCP port 3632 — the two hex blobs can be used as byte signatures in Snort/Suricata rules.
  • ·The vulnerability only affects distccd instances that are NOT configured to restrict access to the server port — deployments with a proper IP whitelist are not exposed.
  • ·The Metasploit module notes the process runs without elevated privileges by default ('Privileged => false'), so post-exploitation impact depends on the uid distccd runs as.

CVSS provenance

nvdv2.09.3CRITICALAV:N/AC:M/Au:N/C:C/I:C/A:C
osv9.3CRITICAL
vendor_debian9.3LOW
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.