ZeroCipher
316 subscribers
8 photos
16 files
6 links
Download Telegram
<red team>
<persis><part 1>

what is the shell execution hijacking via ads?

در این پارت به سوال ads چیست و چه کاربردی دارد و shell execute hijacking چگونه با ads انجام می شود خواهیم پرداخت .

ads چیست؟
alternative data stream یک سرویس ویندوز است که که برای مدیریت stream ها در فایل ها ساخته شده است

stream چیست؟
یک دیتای اضافی که به فایل بایند می شود تا در هنگام اجرای فایل آن stream در پس زمینه فایل باشد تا در مواقع لزوم توسط نرم افزار جاری یا سیستم عامل خوانده شود .

آن stream می تواند متادیتای یک image باشد که در ads آن فایل قرار گرفته .

اگر یک فایل اجرایی exe درون stream یک عکس قرار گیرد چه اتفاقی خواهد افتاد؟
پاسخ واضح است آن stream در پس زمینه ی عکس وجود دارد تا زمانی که فراخوانی شود :
image:malware.exe

و زمانی که فراخوانی شود کاربر عکس را مشاهده خواهد کرد اما در پس زمینه malware.exe اجرا خواهد شد .

از این تکنیک در persistence به صورت مشابه با عنوان atexec یاد می شود .

حال اگر بخواهیم به صورت خودکار پس ازاجرای عکس بدون کامند یک فایل در پس زمینه اجرا شود چه کار کنیم؟

در این مواقع ما نیاز به یک vb script یا یک js script داریم تا برای shell execute استفاده شود .

در این حالت js script به فایل چسبانده خواهد شد و کار او این است که به هنگام اجرای عکس به صورت خودکار stream مورد نظر image:malware.exe اجرا شود.

حال اگر کاربر فقط بر روی عکس دابل کلیک کند shell ما execute خواهد شد و stream مورد نظر در پس زمینه اجرا خواهد شد .

در پست بعدی کد های مربوط به عملیات بالا در اختیار دوستان قرار خواهد گرفت .

این تکنیک همچنین با نام ads polyglot هم شناخته می شود .

#free_learning
5🔥2❤‍🔥1
ZeroCipher
do you like rootkits?
if we teach it will you support us?
Anonymous Poll
89%
yes
11%
no need
ZeroCipher
CVE-2024-21410.py
exchange exploits
1
new discusion now active
ADS-Polyglot.ps1
12 KB
ADS Polyglot!

ADS Shell execute hijacker


what is this?

1. Alternative Stream Injection (ADS) - Create hidden files in the target file

2. Shell Execute Hijack - Change the behavior of double-clicking a file

3. Support for two scripting engines: · JScript (first priority) · VBScript (backup and fallback)

4. Executable file attachment - Ability to add backdoor.exe as a stream


version 2


for malware development and red teaming
5
Books to better understand the kernel and the structure of the C++ language for writing drivers and exploiting kernel-side vulnerabilities
🔥3
What is a Binary Tree?
A Binary Tree is a hierarchical data structure in which each node can have at most two children: a left child and a right child.

Each node contains data and two pointers (left and right).

The topmost node is called the Root, and nodes with no children are called Leaves.

It is widely used for fast searching, sorting, expression parsing, and representing hierarchical relationships.

Summary:
Queue and Deque are linear structures (like a line of people).

Binary Tree is a tree-like structure with parent-child relationships.
4
Difference between Binary Tree and Self-Balancing Binary Tree:

Regular Binary Tree:
Each node can have at most two children.

No mechanism to maintain height balance.

Can degenerate into a linked list in the worst case.

Time complexity: O(n) in worst case.

Self-Balancing Binary Tree:
Automatically maintains balance after insertions/deletions using rotations.
Height is always kept close to log(n).

Guaranteed O(log n) time for search, insert, and delete.
Popular types: AVL Tree and Red-Black Tree.

Summary: Use regular Binary Tree only for small or sorted data.

For large, random, or performance-critical data, always use Self-Balancing Binary Tree.
sample for self-balancing binary tree:
somethings in the way
🔥1