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
⭕️ اگر در حوزه RedTeam فعالیت کرده باشید، مطمئناً با Evilginx آشنا هستید. Evilginx یک ابزار است که برای دور زدن 2FA و انجام مهندسی اجتماعی و فیشینگ مورد استفاده قرار می‌گیرد. با این حال، این نوع ابزارها پس از یک مدت زمان قابل شناسایی می‌شوند و سرویس دهنده‌ها می‌توانند آن‌ها را مسدود کنند.
حال به چند
تکنیک برای جلوگیری از این اتفاق می‌پردازیم.

در ابتدا، برای انجام این روش، نیاز به دو دامنه و سرور، و همچنین یک حساب Cloudflare داریم. Evilginx را روی Apache نصب کرده و از Let's Encrypt برای فعال سازی SSL استفاده می‌کنیم. سپس سایت را به Cloudflare اضافه می‌کنیم.

با فعال کردن ویژگی Temporary Protections و تنظیم شدت آن به حالت Under Attack ، می‌توانیم سایت خود را در برابر حملات مخرب محافظت کنیم. همچنین با فعال کردن ویژگی Geo-blocking، قادر خواهیم بود دسترسی ابزارهای اسکنر و scraper را قطع کنیم. همچنین، با فعال کردن ویژگی Botfight نیز می‌توانیم در برابر حملات رباتیکی که به سایت انجام می‌شوند، محافظت کنیم.

با استفاده از ویژگی Meta Refresh، دو دامنه را در اختیار داریم. یکی Evilginx و دیگری Apache. با استفاده از این روش، می‌توانیم در صورت بازدید از Evilginx، کاربر را به Apache منتقل کنیم و Meta Data را نشان دهیم. با این کار، اسکنر ها با Apache برخورد خواهند کرد.

و در نهایت، از Obfuscation برای مخفی‌سازی کدهای HTML و JS استفاده کنید تا خوانایی آن‌ها به سادگی امکان‌پذیر نباشد.

#RedTeam #OpSec

@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
🍥 muddy
یک کتابخانه مبهم کننده برای جلوگیری از شناسایی توسط ابزارهای ساده تجزیه و تحلیل باینری استاتیک مانند strings یا YARA Rules طراحی شده است که با رمزگذاری برنامه در زمان ساخت و رمزگشایی آن در زمان اجرا عمل می کند.

💠 https://github.com/orph3usLyre/muddy-waters

#RedTeam
#obfuscation
@Engineer_Computer
⭕️ یکی از تکنیک‌های MITRE ATT&CK که در تاکتیک Credential Access جای می‌گیرد، Forced Authentication است.
از تکنیک جدیدی که می‌توان به منظور Forced Authentication بهره‌برداری نمود، و نیز از ابزار‌های پیشفرض Microsoft بوده و ذیل باینری‌های LOLBIN است، ابزار comp.exe است.
این ابزار به منظور مقایسه فایل به شکل byte-to-byte استفاده می‌شود.
یکی از قابلیت‌های این نرم‌افزار، دریافت و مقایسه یک فایل از SMB Share است.
با توجه به اینکه می‌بایست احراز هویت در SMB را به منظور دریافت فایل انجام دهد، می‌توان NTLM Hash را با استفاده از یک Rogue SMB مانند Responder به سرقت برد.

لینک مربوط به تکنیک در گیت‌هاب LOLBAS:
https://github.com/LOLBAS-Project/LOLBAS/pull/341/files

#Redteam #SMBhash #ForcedAuthentication

@Engineer_Computer
1
⭕️ اگر علاقه مند به توسعه 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
⭕️ اگر با C2 معروف Cobalt Strike کار کرده باشید با Beacon Object File (BOF) ها آشنا هستید.BOF ای توسعه داده شده که جایگزینی برای دستورات Spawnas و Inject است که با دستور spawn_with [pid] [listener] از آن میتوان استفاده کرد.
حال به فرایند آن میپردازیم:

Obtain a handle to the target process.
Obtain a handle to the process' primary token.
Duplicate the primary token to an impersonation token.
Get the Beacon spawnto value.
Attempt to spawn a new process with the duplicated token using CreateProcessWithTokenW.
If this attempt fails, try CreateProcessAsUserW.
Inject the Beacon shellcode into the spawned process.
Link to the Beacon in the case of P2P.

#RedTeam #Beacon #C2
@Engineer_Computer
⭕️ Loader ای با Golang نوشته شده که توانایی اجرای ShellCode با تکنیک Process hollowing و استفاده از تکنیک های anti-sandbox و anti-analysis و رمزنگاری 3DES در آن را دارد.
برخی ویژگی های این لودر:

3DES Encryption
Sandbox Evasion
Analysis Evasion
Execution delay
Process Hollowing
Sign to cs and msf

#RedTeam #Evasion
@Engineer_Computer
👍1
⭕️ کد جدیدی به جهت Dump کردن LSASS توسعه داده شده که قابلیت دور زدن AV و EDR های زیر را دارد:

Windows Defender
Malwarebytes Anti-Malware
CrowdStrike Falcon EDR (Falcon Complete + OverWatch)

از جمله ویژگی های این کد میتوان مثال زد:

Manually implementing NTAPI operations through indirect system calls
Disabling Breaking telemetry features (i.e ETW)
Polymorphism through compile-time hash generation
Obfuscating API function names and pointers
Duplicating existing LSASS handles instead of opening new ones
Creating offline copies of the LSASS process to perform memory dumps on
Corrupting the MDMP signature of dropped files
Probably other stuff I forgot to mention here


#RedTeam #Evasion
@Engineer_Computer
👍1