Skip to content

Instantly share code, notes, and snippets.

View shahmal1yev's full-sized avatar
🎯
Focusing

Eldar Shahmaliyev shahmal1yev

🎯
Focusing
View GitHub Profile
@shahmal1yev
shahmal1yev / bsky-video-upload-example.php
Last active April 4, 2025 09:37
Bluesky PHP Video Upload Example
<?php
use Atproto\Client;
use Atproto\DataModel\Blob\Blob;
use Atproto\Lexicons\App\Bsky\Embed\Video;
use Atproto\Responses\App\Bsky\Video\UploadVideoResponse;
use Atproto\Support\FileSupport;
// Authenticate the client with Bluesky credentials
$client = new Client();
@shahmal1yev
shahmal1yev / test.php
Created July 29, 2024 16:16
LinkedList vs Array in PHP across different versions: 7.4.33 and 8.3.9
<?php
namespace Tests\LinkedList\Unit;
ini_set('memory_limit', '512M');
use PHPUnit\Framework\TestCase;
use SplDoublyLinkedList;
class LinkedListTest extends TestCase
@shahmal1yev
shahmal1yev / Authentication Bypass Cheatsheet.md
Last active January 15, 2024 12:28
Authentication Bypass Cheatsheet

Authentication Bypass - Avtorizasiya Bypass

Website error messages are great resources for collating this information to build our list of valid usernames. We have a form to create a new user account if we go to the Acme IT Support website (http://MACHINE_IP/customers/signup) signup page.

If you try entering the username admin and fill in the other form fields with fake information, you'll see we get the error An account with this username already exists. We can use the existence of this error message to produce a list of valid usernames already signed up on the system by using the ffuf tool below. The ffuf tool uses a list of commonly used usernames to check against for any matches.

TryHackMe - Authentication Bypass Room

Username Enumeration

@shahmal1yev
shahmal1yev / Subdomain Enumeration Cheatsheet.md
Last active December 24, 2023 16:02
Subdomain Enumeration Cheatsheet

Subdomain Enumeration - Subdomen siyahılandırılması

OSINT

SSL/TLS Certificates

When an SSL/TLS (Secure Sockets Layer/Transport Layer Security) certificate is created for a domain by a CA (Certificate Authority), CA's take part in what's called "Certificate Transparency (CT) logs". These are publicly accessible logs of every SSL/TLS certificate created for a domain name. The purpose of Certificate Transparency logs is to stop malicious and accidentally made certificates from being used. We can use this service to our advantage to discover subdomains belonging to a domain, sites like https://crt.sh and https://ui.ctsearch.entrust.com/ui/ctsearchui offer a searchable database of certificates that shows current and historical results.

TryHackMe - Subdomain Enumeration Room

@shahmal1yev
shahmal1yev / Content Discovery Cheatsheet.md
Created December 23, 2023 20:40
Content Discovery Cheatsheet

Content Discovery - Məzmun Kəşfi

Firstly, we should ask, in the context of web application security, what is content? Content can be many things, a file, video, picture, backup, a website feature. When we talk about content discovery, we're not talking about the obvious things we can see on a website; it's the things that aren't immediately presented to us and that weren't always intended for public access.

This content could be, for example, pages or portals intended for staff usage, older versions of the website, backup files, configuration files, administration panels, etc.

There are three main ways of discovering content on a website which we'll cover. Manually, Automated and OSINT (Open-Source Intelligence).

TryHackMe - Content Discovery Room

@shahmal1yev
shahmal1yev / PAM Cheatsheet.md
Last active December 24, 2023 16:03
PAM Cheatsheet

Privileged Access Management - Səlahiyyətli Giriş İdarəetməsi

PAM, sistemlər üzərindəki kritik önəmə sahib resurslara access əldə etməyi əhatə edən, bu prosesləri idarə edən metodologiya. Bir qurum daxilindəki kritik bir resursa əlçatanlıqla bağlı prosedurları idarə etməyi ifadə edir.

PAM metodologiyasını tətbiq edən şirkət

  • Kritik önəmə sahib sistem resurslarını təyin edir
  • Bu resurslara əlçatanlığı günün müəyyən saatları ilə limitləndirir
  • Bu resurslara əlçatanlığı müəyyən cihaz və məkanlarla limitləndirir
  • Əlçatanlıq siyasətlərini müntəzəm olaraq yeniləyir
  • Bu resurslarla bağlı fəaliyyətləri, o cümlədən əldə edilən access`ləri sıx izləməyə alır və davamlı olaraq incələyir
@shahmal1yev
shahmal1yev / PIM Cheatsheet.md
Last active December 24, 2023 16:03
PIM Cheatsheet

Priveleged Identity Management - Səlahiyyətli Şəxsiyyət/İdentifikasiya İdarəetməsi

PIM, sistemlər üzərindəki kritik önəmə sahib hesablara access əldə etməyi əhatə edən, bu prosesləri idarə edən metodologiya. Bir istifadəçinin bir qurum daxilindəki rolunu sistemdə bir rola çevirməyi ifadə edir.

PIM metodologiyasını tətbiq edən şirkət

  • Kritik önəmə sahib hesabların siyahısını çıxarır: sistem administratorları, təhlükəsizlik komandaları və digər kritik vəzifələrə sahib olan əməkdaşlar
  • Hər istifadəçiyə vəzifələrini yerinə yetirə biləcəyi minimum səlahiyyətləri mənimsədir (Least Privilege Principle - Ən az imtiyaz prinsipi)
  • Avtorizasiya ilə bağlı prosedurları gücləndirir: Şifrə siyasətinə uyğun güclü şifrələr, biometriya ilə doğrulama, OTP kodları və s.
  • Bu hesabların ümumi fəaliyyətlərini və access`lərin sıx olaraq izləməyə alır. Şübhəli və ya təhlükəsizlik siyasətinə uyğunsuz fəaliyyətləri təyin etmə mexanizmləri qurur.
@shahmal1yev
shahmal1yev / StoreFolderRequest.php
Last active December 7, 2023 12:47
Dynamic Retrieval of Rules for Multilingual Fields
<?php
namespace App\Http\Requests\Folder;
use Illuminate\Foundation\Http\FormRequest;
use function PHPUnit\Framework\callback;
class StoreFolderRequest extends FormRequest
{
public function rules(): array