• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

LinuxSec Exploit

Nothing is Ever Locked

  • XSS Payloads
  • About Us

Website Security | Disable PHP Execution in Website Directory using Htaccess

April 25, 2015 by Jack Wilder Leave a Comment

Sebenernya ini trik lama sih, buat arsip pribadi aja. Berhubung sering keluar masuk web orang tentu juga harus tau cara biar web sendiri gak dimasukin orang. (ngomong apa sih ? ) . Jadi biasanya kalo hacker bisa menembus halaman admins ebuah website, mereka akan mengumload backddoor berupa file .php di web kita sebagai akses masuk mereka.
Dan mas mas hacker biasa nya juga cukup pinter kok, kalo aggal upload file .php biasanya doi ganti ekstensi nya jadi .phtml , atau kalo mentok ya minimal upload file .html atau .txt ssebagai tanya kalo doi berhasil masuk ke web korban.
Ada cara mencegah nya ?
Ada lah pasti .
Sebagai contoh ane ambil cms wordpress.
Nah, direktori /uploads/ biasa nya yang sering jadi sasaran.
kalo pengen tau cara upload shell di wp, baca disini :
Bypass Upload Shell di WordPress

Kita bisa mencegah agar file backdoor tersebut gagal dieksekusi.
Cara nya ?
buat file .htaccess di folder /uploads/ *folder silahkan tentuin sendiri.
isi nya :
<FilesMatch “(?i).(php|php3?|phtml|html|txt)$”>
Order Deny,Allow
Deny from All
</FilesMatch>

Liat ss dibawah :

htaccess security

Saya coba testing di cpanel sendiri . :v
Disitu ada file .htaccess yang isi nya seperti di atas.
lalu ada file lol.php .
Kita lihat apa yang terjadi jika file lol.php tadi dibuka .

Folder Protected

scriptkiddies gonna kill you now :p

Sekian tutor kali ini dan semoga bermanfaat 😀

Shares

Filed Under: Uncategorized Tagged With: Hacking, Security

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Popular Post

Cara Mudah Hack cPanel dengan Fitur Reset Password

Reverse Shell From Local File Inclusion Exploit

Tumblr Custom Domain or Subdomain Takeover

Bruteforce FTP Login dengan Metasploit Module FTP Authentication Scanner

Arti dari Kata Deface yang Sering Dibahas oleh para Hacker

Heroku Custom Domain or Subdomain Takeover

Cracking FTP Password using Hydra on BackBox Linux

Exploit WordPress N-Media Website Contact Form with File Upload 1.3.4 Shell Upload Vulnerability

GitHub Custom Domain or Subdomain Takeover

Deface WordPress Dengan Exploit Archin WordPress Theme 3.2 Unauthenticated Configuration Access Vulnerability

LinuxSec / 63 queries in 0.08 seconds