Source Byte – Telegram
Source Byte
7.74K subscribers
846 photos
73 videos
678 files
1.68K links
هشیار کسی باید کز عشق بپرهیزد
وین طبع که من دارم با عقل نیامیزد
Saadi Shirazi 187
Download Telegram
Forwarded from Stuff for Geeks (rВНm)
👍32
Forwarded from APT
🖥 Introduction for to Windows kernel exploitation

Explore the Windows Kernel with HEVD, a vulnerable driver. Dive into stack overflow exploits and bypass SMEP/KPTI protections using the sysret approach.
A detailed guide for Windows kernel explotation:

Part 0: Where do I start?
Part 1: Will this driver ever crash?
Part 2: Is there a way to bypass kASLR, SMEP and KVA Shadow?
Part 3: Can we rop our way into triggering our shellcode?
Part 4: How do we write a shellcode to elevate privileges and gracefully return to userland?

#windows #kernel #driver #hevd #hacksys
Please open Telegram to view this post
VIEW IN TELEGRAM
👍11👾41
Forwarded from Dark Knight
👍4
7👍5👎2👏1
Global Windows outage hits computers around the world. This is linked to Crowdstrike update that cripples boot process.
Supposedly deleting “C-00000291*.sys” file in C:\Windows\System32\drivers\CrowdStrike directory fixes the issue. But editing system files you always do on your own risk :)


Credit: Lukasz Olejnik

#CrowdStrike
2👍1👾1
I created a simple Group Policy (GPO) to automatically fix CrowdStrike BSOD (Blue screen of death) issue.

Credit : Arda Büyükkaya

https://gist.github.com/whichbuffer/7830c73711589dcf9e7a5217797ca617


How are you deploying this to BSOD'd boxes?


You can remotely apply the GPOs using tools like Group Policy Management Console (GPMC) from a server or another computer with administrative privileges. If remote access is not possible due to the BSOD, you may need to boot the affected systems using a Windows recovery environment or a bootable media, manually apply the noscripts to force Safe Mode, and then restart the systems to allow the GPOs to execute the fix. I haven't tested it across multiple affected devices yet, but theoretically, booting into Safe Mode by GPO and then deleting the problematic driver should work. The idea is based on standard troubleshooting steps that target specific faulty drivers causing the BSOD.


🔥3👍2
Forwarded from Source Chat (main one)
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from 🪄࿐. ݁₊ 🌸 Ame 🎀
😁5👍1
ClownStrike.zip
16.9 MB
😁13👍2
Forwarded from Infosec Fortress
Zhang Yunhai - BYPASS CONTROL FLOW GUARD COMPREHENSIVELY - Blackhat

#binary
#exploitation
———
🆔 @Infosec_Fortress
5👍3
Forwarded from Infosec Fortress
us-15-Zhang-Bypass-Control-Flow-Guard-Comprehensively-wp.pdf
425.2 KB
👍3👎1
Forwarded from An Inspired Engineer
کرنل چطور میدونه توی این لحظه کدوم پروسس روی یک هسته‌ی cpu در حال اجراست؟

کرنل تسک(پروسس)هایی که در حال اجرا هستن رو توی یک Linked List به صورت double به اسم task list نگهداری میکنه، ساختمون داده ای که این linked list نگهداری میکنه task_struct هست که نسبتا بزرگه و تمامی اطلاعاتی که کرنل نیاز داره تا بروی پروسس ها context switch انجام بده یا چه فایل هایی توسط این پروسس بازه، وضعیت پروسس چیه، فضای آدرس حافظه کجاست و ... رو توی خودش داره.

نکته:
هر پروسس توی فضای کرنل یک استک داره که کرنل اطلاعات مربوط به این پروسس، ادرس برگشت متد ها، متغیرهای محلی و... رو توش نگه‌میداره. و توی معماری x86 کرنل پوینتر ساختمون داده task_struct متعلق به هر پروسس رو توی انتهای استک همون پروسس میزاره، یعنی اگه از انتهای استک یک پروسس به عقب برگردیم به اطلاعات اون پروسس دسترسی داریم(البته که توی فضای کرنل).

خب حالا خود کرنل چطور به تسکی که الان در حال اجراست میرسه تا بتونه اصلا به task_struct دسترسی داشته باشه؟
همونطور که بالاتر گفتم لیست تسک ها توی یک linked list نگهداری میشن و برای اینکه بتونیم تسکی که در حال اجراست رو پیدا کنیم باید کل لیست رو بگردیم، شاید روی ماشین های خونگی به چشم نیاد ولی روی سرورهایی که چندین هزار پروسس میتونن داشته باشن O(n) هزینه‌ی بالایی محسوب میشه. راه حل؟ کرنل میاد برای اینکه تسک درحال اجرا رو پیدا کنه از ماکروی current استفاده میکنه که اون هم متد current_thread_info() رو کال میکنه. حالا با توجه به معماری یا ادرس این ساختمون داده روی یکی از رجیستر های cpu میزاره. یعنی دیگه نیازی نیست کل لیست رو بگردیم.

پیاده سازی این متد به معماری سخت افزار وابسته اس، برای مثال توی ماشین های power pc IBM رو اجرا میکنند کرنل این اطلاعات رو توی رجیستر r2 نگهداری میکنه و از طریق اسمبلی بهش دسترسی داره:

register struct task_struct *current asm ("r2");


حالا شاید بگین که اوکی ما دیگه چه نیازی به لیست داریم وقتی اطلاعات توی رجیستر وجود داره؟
در حقیقت لیست برای اینه که scheduler بدونه تسک بعدی متعلق به کیه و آیا باید اجرا بشه یا نه؟! اینجا برای انتخاب کردن تسک بعدی کرنل پارامترای اون پروسس رو چک میکنه که مهمترینشون state و priority هست، بعد از اینکه تسک بعدی انتخاب شد، اطلاعات تسک فعلی روی استک نوشته میشه و اطلاعات تسک بعدی روی رجیستر بارگیری میشه.

جمع بندی بخوام بکنم میشه:
- زمانی که پروسس جدید با fork یا clone ساخته میشه کرنل کپی task_struct از parent پروسس جدید هست رو توی task list که یک linked list گلوبال توی فضای کرنل هست اضافه میکنه.
- ماژول scheduler میاد و بر اساس اولویت و پارامتر های دیگه بین پروسس ها برای هر هسته‌ی cpu عملیات context-switching رو انجام میده ولی قبلش مقدار جای فعلی استک، رجیسترهای cpu و وضعیت پروسس رو توی task_struct ذخیره کنه و بعد از انتخاب عملیات context swithing رو انجام بده.
- کرنل باید پوینتر ماکروی current رو به روز کنه تا به task_struct تسک جدید اشاره کنه و این ماکرو از طریق رجیسترهای cpu با سرعت بالا به task_struct دسترسی پیدا میکنه.
- وضعیت تسک جدید توی رجیسترهای cpu و از استک بارگیری میشه.

پس جواب ما برای سوال: کرنل چطور میدونه توی این لحظه کدوم پروسس روی یک هسته‌ی cpu در حال اجراست؟ میشه اینکه کرنل اطلاعات رو توی یک لینک لیست نگهداری میکنه و پوینتر تسک فعلی رو هم برای اینکه O(n) هزینه نکنه از رجیستر میخونه.

منبع ۱
منبع ۲

@knowpow
👍65🤣2👏1🍾1
“Beeep!”
How Malware Uses the Beep WinAPI Function for
[ Anti-Analysis ]

#malware_analysis
👍31👎1
(In)direct Syscalls: A journey from high to low
RedOps | Red Team Village | DEF CON 31

syllabus:
01: Introduction and Abstract
02: Prerequistes
03: Chapter 1 | Windows NT Basics
04: Chapter 2 | Windows OS System Calls
05: Chapter 2 | LAB Exercise Playbook
06: Chapter 3 | Concept of Direct Syscalls
07: Chapter 4 | Win32 APIs
08: Chapter 4 | LAB Exercise Playbook
09: Chapter 5 | Native APIs
10: Chapter 5 | LAB Exercise Playbook
11: Chapter 6 | Direct Syscalls
12: Chapter 6 | LAB Exercise Playbook
13: Chapter 7 | Indirect Syscalls
14: Chapter 7 | LAB Exercise Playbook

All the theory and playbooks for the exercises can be found in the wiki, which together with the prepared POCs is the heart of this project. The POCs for the exercises can be found here on the main page.
https://github.com/VirtualAlllocEx/DEFCON-31-Syscalls-Workshop.git

#redteam #malware_dev
6👍2👾2
Forwarded from 1N73LL1G3NC3
TokenAssignor

This tool tries to steal token from a specified process and execute a token assigned process. Most of methods require administrative privileges.
Currently, 4 methods are implemented:
   • To execute a token assigned process with CreateProcessAsUser API, set -m option to 0;
• When set -m option to 1, this tool tries to create a suspended process and update the primary token to a stolen token. This method cannot be used for changing Session ID due to kernel restriction;
• If set -m option is set to 2, creates a new token assigned process with Secondary Logon Service;
• If set -m option is set to 3, creates a new token assigned process with PPID spoofing method.
👍3🔥3
Forwarded from Stuff for Geeks (Qho Knowa)
Fascinating C code: TCP sockets & HTTP file downloads using only ntdll exports (NtCreateFile & NtDeviceIoControlFile syscalls). Bypasses Winsock for low-level Windows networking.


https://www.x86matthew.com/view_post?id=ntsockets

#Windows
#Programming
3👍2🔥2
Forwarded from Go Casts 🚀
یادگیری زبان Rust احتمالا یکی از کارایی هست که خیلی هامون دوست داریم انجام بدیم. بعضی ها هم ممکنه انجامش داده باشن و لذت ش رو برده باشن.

سایت corrode.dev مقاله های جذابی منتشر میکنه در مورد Rust

این مقاله یه لیست جذاب داره از منابعی که شما میتونید برای یادگیری Rust ازش استفاده کنید.

در مورد یادگیری زبان جدید هم یه تجربه خوب شاید این باشه که سعی کنید گاه و بیگاه در مورد زبان مورد نظرتون مطالعه پراکنده داشته باشید، این مطالعه درک شما رو نسبت به مفاهیم و جذابیت های زبان بیشتر میکنه و به شما شوق بیشتری میده که یادش بگیرید.

Learning Material for Idiomatic Rust
https://corrode.dev/blog/idiomatic-rust-resources/

@gocasts

#rust
👍82👎1
Windows Registry Forensics Learning Path ( 2022 )

https://www.infosecinstitute.com/skills/learning-paths/windows-registry-forensics/


following file just include videos & pdf ( thanks " ᏗᏰᏂᎥᏝᏗᏕᏂ ֆɨռɢɦ 🇮🇳 " for sharing the file )
👍1