cara patch bug bypass admin or SQL login

cara patch bug bypass admin or SQL login cara patch bug bypass SQL login

cara patch bug Bypass admin or SQL login

Assalamu'alaikum


Dalam Artikel ini saya akan membahas cara mempatch bug Bypass admin pada website anda, agar tidak terjadinya Peretasan dengan mengandalkan bug ini. 


Karena jika bug ini terdapat pada website anda?. Maka Akan sangat berbahaya.

Kenapa bisa menjadi bahaya besar?. 

Karena hanya dengan mencari admin page dan Menginjeksi User dan Password dengan code seperti 

~> ' or 1=1 limit 1 -- -+

~> '=' 'or' 

Seseorang yang sangat "Gabutz" dapat mengakses Atau masuk menuju admin panel atau Dashboard Website anda. Dan di sana seorang peretas dapat Mengubah index, dan lebih berbahaya nya lagi mereka Dapat meng-upload backdoor shell dan mengambil alih Website!!..


Contoh bug dan Filter untuk bug nya

Nah disini gw udah punya source code yang terdapat bug bypass nya.

<?php $message = “”; 

if(isset($_POST[‘submit’])){ 

$username= ($_POST[username]); 

$password = md5($_POST[‘password’]);

$query = “SELECT * FROM admin WHERE username = ‘$username’ and password = ‘$password’ and usertype = ‘1’”; 

$query_result = mysqli_query($con, $query); 

if(mysqli_num_rows($query_result)){ 

$row = mysqli_fetch_assoc($query_result); 

$_SESSION[‘admin_id’] = $row[‘id’]; $_SESSION[‘username’] = $row[‘username’]; header(“location: index.php”); 

}else{ 

$message = “String Lu Kurang Mantep Bozz. Mending Pake Unicode.”; 

} } ?>


Nah dari script di atas apa anda sudah tau dimana Letak source code yang terdapat bug bypass nya?..


Coba anda teliti baik baik di sana tidak ada filter pada User dan Pass hal tersebut lah yang menyebabkan Website anda terdapat bug bypass admin or SQL login!!.


$username= ($_POST[username]); 

$password = md5($_POST[‘password’]);


Yap di sana lah penyebabnya.


Bagaimana cara menambahkan filter pada user dan pass login?..


Di bawah ini bakal gw kasih source code filter nya:


$username=mysqli_escape_string($con,$_POST['username']);

$password=mysqli_escape_string($con,$_POST['password']);


Kita akan mengganti source code yang belum terdapat Filter dengan menambahkan filter nya seperti di bawah Ini :


<?php $message = “”; 

if(isset($_POST[‘submit’])){ 

$username=mysqli_escape_string($con,$_POST['username']);

$password=mysqli_escape_string($con,$_POST['password']);

$query = “SELECT * FROM admin WHERE username = ‘$username’ and password = ‘$password’ and usertype = ‘1’”; 

$query_result=mysqli_query($con, $query); 

if(mysqli_num_rows($query_result)){ 

$row=mysqli_fetch_assoc($query_result); 

$_SESSION[‘admin_id’]=$row[‘id’]; $_SESSION[‘username’]=$row[‘username’]; header(“location: index.php”); 

}else{ 

$message = “String Lu Kurang Mantep Bozz. Mending Pake Unicode.”; 

} } ?>

Akhir kata 

Nah selesai :)),Nah sekarang anda coba login pake bypass , pasti udah ga berhasil :D

Ok sekian,bye


About the Author

Just for education, all forms of damage / crime are not our responsibility!
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.