Network Security Channel
2.57K subscribers
5.33K photos
3.42K videos
5.56K files
4.44K links
شروع از سال 1395
Security Operation Center (SOC)
Bug Bounty
Vulnerability
Pentest
Hardening
Linux
Reasearch
Security Network
Security Researcher
DevSecOps
Blue Team
Red Team
Download Telegram
⭕️ یکی از راه های دور زدن execution policy و AV ها استفاده از فایل های SIGN شده توسط کمپانی های معتبر است.
در لینک زیر یک لیست مناسب از ‏Net Application. های مورد تایید Microsoft جمع آوری شده ، که ما میتوانیم با استفاده از فایل های Config. فایل های DLL را فراخوانی کنیم به طوری که از قبل مورد تایید قرار گرفته باشد.

https://github.com/Mr-Un1k0d3r/.NetConfigLoader
#RedTeam #MalDev

@Engineer_Computer
⭕️ یک تکنیک جالب از سری تکنیک های Anti-forensic در DLL-Injection وجود دارد که با نام DLL Unlinking شناخته می شود.
این تکنیک از ویژگی های Windows Process Environment Block (PEB) استفاده می کند تا بتواند DLL های مورد نظر را به صورت پنهان لود کند.

‏PEB شامل یک اشاره گر به ساختار PEB_LDR_DATA است که درون آن لیستی ازعناصر LDR_DATA_TABLE_ENTRY وجود دارد که به صورت Doubly-linked برای هرپروسه در Virtual Memory ذخیره می شود.
این لیست ها شامل موارد زیر میباشد :

InLoadOrderModuleList InMemoryOrderModuleList InInitializationOrderModuleList

برای استفاده از تکنیک DLL Unlinking، می توان از ابزاری با زبان NIM استفاده کرد که با استفاده از این کد می توان DLL های مورد نظر را از ‏ ‏doubly-linked لیست ها Unlink کرد، از جمله این موارد :
InLoadOrderModuleList InMemoryOrderModuleList InitializationOrderModuleList LdrpHashTable

باید توجه داشت که پس از Unlink کردن یک DLL ، هنوز هم ممکن است این DLL را با استفاده از ابزارهای مشابه Process Hacker مشاهده کنیم زیرا این ابزارها می توانند ماژول های بارگذاری شده را از VAD یا Virtual Address Descriptors به جای لیست های مربوط به فضای کاربر دریافت کنند.

https://blog.christophetd.fr/dll-unlinking/
https://github.com/frkngksl/UnlinkDLL
#RedTeam #MalDev

@Engineer_Computer
⭕️ Loader ای که با نام Atlas توسط یک شخص توسعه داده شده است، از روش Reflective برای اجرای dll و PE های 64 بیتی استفاده می‌کند. این loader از Dynamic Indirect Syscalls برای انجام عملیات های خود استفاده می‌کند.

‏بعضی از ویژگی‌های این loader عبارتند از:


* Retrieve of DLL and PE from a remote server
* Manual Mapping on a remote process
* Position independent code
* Use of indirect Syscalls
- ZwAllocateVirtualMemory
- ZwProtectVirtualMemory
- ZwQuerySystemInformation
- ZwFreeVirtualMemory
- ZwCreateThreadEx
* Single stub for all Syscalls
- Dynamic SSN retrieve
- Dynamic Syscall address resolution
* Atlas also uses
- LdrLoadDll
- NtWriteVirtualMemory
* Custom implementations of
- GetProcAddress
- GetModuleHandle
* API hashing
* Cleanup on error
* Variable EntryPoint


#RedTeam #MalDev

@Engineer_Computer
⭕️Memory Patcher ای نوشته شده است که با استفاده از تکنیک API Hooking، تغییراتی در سیستم مورد نظر اعمال می‌کند. این ابزار ویژگی‌های زیر را داراست:

‏1. Anti Debugging: ‏Disables specific anti-debugging mechanisms to facilitate debugging in certain scenarios.

‏2. BSoD (Blue Screen of Death): ‏Prevents or mitigates potential causes leading to system crashes or blue screen errors

‏3. BlockInput:‏Controls the system's input-blocking functionality to manage or bypass certain input restrictions.

‏4. FindWindow:‏Modifies the behavior of the FindWindow API function for specific use cases


#RedTeam #MalDev
@Engineer_Computer
⭕️ پروژه ای توسعه داده شده که سمپل یک Rootkit برای استفاده توی پروژه های ردتیم کاربرد داره.
این پروژه با ++C توسعه داده شده و قابلیت ارتباط آسان با C2 مورد نظر ما را دارد.
از ویژگی های این پروژه میتوان به موارد زیر پرداخت:

Current Features
Process hiding and unhiding
Process elevation
Process protection (anti-kill and dumping)
Bypass pe-sieve
Thread hiding and unhiding
Thread protection (anti-kill)
File protection (anti-deletion and overwriting)
Registry keys and values protection (anti-deletion and overwriting)
Registry keys and values hiding
Querying currently protected processes, threads, files, hidden ports, registry keys and values
Function patching
Built-in AMSI bypass
Built-in ETW patch
Process signature (PP/PPL) modification
Can be reflectively loaded
Shellcode Injection
APC
NtCreateThreadEx
DLL Injection
APC
NtCreateThreadEx
Querying kernel callbacks
ObCallbacks
Process and thread creation routines
Image loading routines
Registry callbacks
Removing and restoring kernel callbacks
ETWTI tampering
Module hiding
Driver hiding and unhiding
Credential Dumping
Port hiding/unhiding
Script execution
Initial operations


#RedTeam #Rootkit #Maldev
@Engineer_Computer
⭕️ اگر علاقه مند به توسعه RootKit در محیط ویندوز هستید پروژه ای توسعه داده شده که به مطالعه آن میپردازیم.
از ویژگی های این پروژه میتوان به موارد زیر اشاره کرد:

Kill processes

ZwTerminateProcess is simply called from kernel land to terminate any process. Additionally, you can bury a process to avoid it to restart by setting a kernel callback to process creation: If the target process is created, Banshee will set the CreationStatus of the target process to STATUS_ACCESS_DENIED.

Change protection levels

This is done by modifying the EPROCESS structure, which is an kernel object that describes a processes attributes. It also holds a value that specifies the protection level of the process.
We can directly modify this value (aka Direct Kernel Object Modification or DKOM), since we are operating in Ring 0.

Elevate any process token to SYSTEM

EPROCESS also holds a pointer to the current access token, so we can just make it point to e.g. the token of process 4 (SYSTEM) to elevate any process to SYSTEM

Enumerating and erasing kernel callbacks

For now, only Process- and Thread-Creation kernel callbacks are enumerated, by parsing the PsSetCreateNotifyProcess/ThreadRoutine routine to reach the private Psp* routine and then parsing the address of the array, where kernel callbacks are stored.

Protecting the driver file

By hooking the NTFS filesystem's IRP_MJ_CREATE handler, we can block any process from opening a handle to our driver file

Hide Process by PID

Again, EPROCESS comes to help here - it contains a LIST_ENTRY of a doubly linked list called ActiveProcessLink which is queried by Windows to enumerate running processes. If we simply unlink an entry here, we can hide our process from tools like Process Monitor or Task Manager.

#RedTeam #RootKit #MalDev
@Engineer_Computer
⭕️ پروژه ای توسعه داده شده که Dropper ای از نوع Macro Office ها ایجاد میکند.
این پروژه با استفاده از DLL SideLoading و Embed کردن در LNK فایل اقدام به دور زدن Mark of The Web (MOTW) میکند.

https://github.com/SaadAhla/dropper
#RedTeam #MalDev
@Engineer_Computer