Giter Site home page Giter Site logo

boku7 / homerent-sqli-rce Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 1.0 11.16 MB

House Rental v1.0 suffers from an unauthenticated SQL Injection vulnerability allowing remote attackers to execute arbitrary code on the hosting webserver via sending a malicious POST request.

License: GNU General Public License v3.0

Python 100.00%

homerent-sqli-rce's Introduction

House Rental v1.0 - Unauthenticated SQL Injection - Change Admin Password

Exploit Author: Bobby Cooke (boku) & Adeeb Shah (@hyd3sec)

  • House Rental v1.0 suffers from an unauthenticated SQL Injection vulnerability allowing remote attackers to execute arbitrary code on the hosting webserver via sending a malicious POST request.

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
  • OWASP Top Ten 2017: A1:2017-Injection
  • CVSS Base Score: 10.0
  • Impact Subscore: 6.0
  • Exploitability Subscore: 3.9
  • CVSS Vector: AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Vulnerable Source Code:

 /config/config.php
   11  try {
   12     $connect = new PDO("mysql:host=".dbhost."; dbname=".dbname, dbuser, dbpass);
   13     $connect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 /index.php
    5   if(isset($_POST['search'])) {
    7     $keywords = $_POST['keywords'];
   11     $keyword = explode(',', $keywords);
   12     $concats = "(";
   13     $numItems = count($keyword);
   15     foreach ($keyword as $key => $value) {
   17       if(++$i === $numItems){
   18          $concats .= "'".$value."'";
   19       }else{
   20         $concats .= "'".$value."',";
   23     $concats .= ")";
   47         $stmt = $connect->prepare("SELECT * FROM room_rental_registrations_apartment WHERE country IN $concats OR country IN $loc OR state IN $concats OR state IN $loc OR city IN $concats OR city IN $loc OR address IN $concats OR address IN $loc OR rooms IN $concats OR landmark IN $concats OR landmark IN $loc OR rent IN $concats OR deposit IN $concats");
   48         $stmt->execute();

Vendor Homepage: https://projectworlds.in

homerent-sqli-rce's People

Contributors

boku7 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.