Offensive Security – Telegram
Offensive Security
255 subscribers
91 photos
9 videos
20 files
113 links
I post what I read; I'm a low-level programmer with a focus on offensive security and redteam development.
Download Telegram
C2.pdf
264 KB
Comprehensive Overview of Command and Control (C2) Frameworks

#C2
CVE-2025-39727

CVE-2025-39727 is a security vulnerability in the Linux kernel, specifically within the memory management (mm) subsystem, affecting the swap handling mechanism. The issue occurs due to a potential buffer overflow in the setup_clusters() function. In the setup_swap_map() function, only bad pages within the range (0, last_page] are checked. However, if maxpages is less than last_page, setup_clusters() may access memory beyond its allocated buffer when processing a badpage with an index greater than or equal to maxpages. This can lead to undefined behavior, including system crashes, memory corruption, or privilege escalation under certain conditions.



Potential Impact

This vulnerability is serious because it resides in the Linux kernel, which operates at ring 0, giving full control over system resources. Potential consequences include:
1. Local Privilege Escalation (LPE):
• A user with local access could exploit this vulnerability to overwrite kernel memory structures, potentially gaining root privileges.
• Example: Modifying the cred structure of a process to escalate a low-privilege account to full administrative rights.
2. Denial of Service (DoS):
• The overflow may trigger a kernel panic, crashing the system.
• Example: A server handling swap-intensive workloads could become unavailable until rebooted.
3. Memory Corruption / Data Leakage:
• The buffer overflow could corrupt adjacent kernel memory, leading to unpredictable behavior. In some scenarios, it may allow reading sensitive kernel data.

Note: Unlike some other kernel vulnerabilities, remote exploitation is highly unlikely without local code execution, as attackers must influence the swap system or memory directly.



Technical Details

The vulnerability arises from improper bounds checking in setup_clusters():

// simplified conceptual example
for (i = 0; i < nr_badpages; i++) {
page = badpages[i];
// no check if page >= maxpages
clusters[page / CLUSTER_SIZE]++;
}


If badpages[i] >= maxpages, clusters[] is accessed out-of-bounds, leading to a heap or stack memory corruption.

This memory corruption can have multiple outcomes:
• Overwriting critical kernel structures → privilege escalation.
• Overwriting control data → kernel panic (DoS).
• In rare cases, manipulating data to execute code in kernel context (requires bypassing SMEP/SMAP/KASLR).



Example Scenario

1. A Linux server (e.g., Ubuntu 24.04) is running a vulnerable kernel.
2. An attacker has local access (low-privilege user or compromised process).
3. The attacker runs a crafted program that injects invalid badpage entries into the swap system, triggering the overflow in setup_clusters().
4. Consequences may include:
• Escalating privileges to root.
• Crashing the system (DoS).
• Potentially corrupting kernel memory or leaking sensitive data.





Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-39727
https://git.kernel.org/stable/c/152c1339dc13ad46f1b136e8693de15980750835

#Kernel #Linux
🔥1
Exploiting an array-Out-Of-Bounds vulnerability in the Linux network packet scheduler (CVE-2025-37752)

https://syst3mfailure.io/two-bytes-of-madness/

#CVE #Linux
The book MAoS, written by Uriel Kosayev, an Israeli author and researcher, was recently published. About this book, he wrote:
• It is the result of several years of practical and personal research, including long nights of reverse engineering and real-world incident response experiences.
• Its content is designed to be highly operational, going far beyond theory alone.

کتاب MAoS اثر اورئیل کوسایف، نویسنده و محقق اسرائیلی، به‌تازگی منتشر شده است. او درباره این کتاب نوشت:
• این کتاب حاصل چندین سال پژوهش عملی و شخصی است؛ شامل شب‌های طولانی مهندسی معکوس و تجربه‌های مستقیم از Incident Response‌های واقعی.
• محتوای آن کاملاً عملیاتی طراحی شده و تنها به مباحث تئوری محدود نمی‌شود.

https://www.amazon.com/MAoS-Analysis-Steroids-Real-World-Engineering/dp/B0FQF2Z176
👍1
How an Attacker’s Blunder Gave Us a Rare Look Inside Their Day-to-Day Operations

در این وبلاگ، تیم Huntress گزارشی از یک اشتباه مهاجم ارائه می‌دهد که منجر به دسترسی به فعالیت‌های روزانه او شد.

Tweet:
https://x.com/huntresslabs/status/1965450929987031484?s=46

Blog:
https://www.huntress.com/blog/rare-look-inside-attacker-operation

#malware #threat
LockBit is down again —XOXO from Prague
LockBit's 5.0 panel just got wrecked

lockbitfbinpwhbyomxkiqtwhwiyetrbkb4hnqmshaonqxmsrqwg7yad.onion

#LockBit #Ransomware
IMG_1905.JPG
1.6 MB
ARM-32 Bit Assembly Basics Cheatsheet
usenix25-tlbsidechannel.pdf
1.1 MB
This is a research paper and it shows that some Linux kernel hardening tricks accidentally create TLB side-channel leaks that let an unprivileged attacker find where critical kernel objects live, for example heap objects, page tables and kernel stacks. The authors use allocator shaping plus Evict+Reload-style TLB measurements and show practical results on recent Intel CPUs and kernels.

این یه مقالهٔ تحقیقاتیه که نشون می‌ده چندتا از مکانیزم‌های سخت‌سازی کرنل لینوکس به صورت ناخواسته الگوهای نشتی توی TLB درست می‌کنن و با این کار می‌شه آدرس اشیای حساس کرنل مثل ساختارهای heap، جداول صفحه و استک کرنل رو لو داد. روش‌شون ترکیبیه از دستکاری تخصیص‌دهنده‌ها و اندازه‌گیری‌های شبیه Evict+Reload روی TLB و تو آزمایش‌ها روی پردازنده‌های جدید اینتل و کرنل‌های مدرن کار کرده.


#kernel #linux
👍2
l-24.txt
1.4 KB
Requirements list.
To understand the article, you must be familiar with the headings in the file.
Offensive Security
l-24.txt
برای درک کامل مقاله
“WHEN GOOD KERNEL DEFENSES GO BAD: Reliable and Stable Kernel Exploits via Defense-Amplified TLB Side-Channel Leaks”،
باید با مفاهیم پایه‌ای و مرتبط آشنا باشید.
برای همین لیستی از نیازمندی‌هارو در فایل بالا نوشتم و هرپارت رو تاجایی که بلد باشم در روز‌های بعدی راجبش مینویسم و توضیحش میدم.
Offensive Security
UnderStanding The Linux Kernel 3rd Edition.pdf
اگر علاقمندید به مطالعه عمیق در لینوکس، کتاب بالارو حتما بخونید.
برای کسانی که میخوان LinuxPostExploit کار کنن بشدت مفید خواهد بود.