Reverse Engineering & Binary Analysis Basics · บทเรียน

กลไกบรรเทาการโจมตีสมัยใหม่และวิธีหลบเลี่ยง

ทำความเข้าใจแนวป้องกันที่ขวางระหว่างช่องโหว่กับการโจมตีที่ใช้งานได้จริง ได้แก่ ASLR, DEP/NX, แคนารีของสแตก และ CFG รวมถึงแนวคิดระดับสูงเบื้องหลังการหลบเลี่ยงกลไกเหล่านี้

บทเรียน 4 จาก 413 ขั้นตอน

กลไกบรรเทาการโจมตีสมัยใหม่และวิธีหลบเลี่ยง เป็นบทเรียน Reverse Engineering & Binary Analysis Basics ฟรีบน CoddyKit นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Reverse Engineering & Binary Analysis Basics และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Reverse Engineering & Binary Analysis Basics มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

Why Exploits Got Harder

You can identify binary vulnerabilities, fuzz for bugs, and understand exploit primitives. Modern systems add mitigations that turn an easy bug into a hard one.

Knowing these defenses tells you what a working exploit must overcome.

Data Execution Prevention (DEP/NX)

DEP (a.k.a. the NX bit) marks memory as non-executable. Code injected onto the stack will not run.

This killed classic 'shellcode on the stack' attacks and pushed exploiters toward code reuse.

Return-Oriented Programming

To bypass DEP, attackers reuse existing executable code. ROP chains together short instruction sequences (gadgets) ending in ret to perform arbitrary actions without injecting code.

; a gadget
pop rdi
ret
; chained: set rdi, then call a real function

Address Space Layout Randomization

ASLR randomizes where modules, stack, and heap load each run, so attackers cannot hardcode addresses.

Without a known address, both shellcode and ROP gadgets are hard to target.

Defeating ASLR with Leaks

ASLR is bypassed with an information leak: a bug that discloses a real runtime address. From one leaked pointer you compute the module base and locate your gadgets.

Many modern exploits are really 'leak then exploit' two-stage attacks.

Stack Canaries

A stack canary is a random value placed before the saved return address. A linear stack overflow overwrites it, and the function aborts on mismatch.

; epilogue check
mov rax, [rbp-8]
xor rax, fs:[0x28]
jne __stack_chk_fail

Bypassing Canaries

Canaries are defeated by:

  • Leaking the canary value, then writing it back unchanged
  • Overwriting structures that skip the check (e.g. a non-linear write)

This is why info leaks are so valuable.

Control-Flow Integrity

CFI and Windows' CFG validate indirect calls and returns against a set of legitimate targets, breaking many ROP chains.

Hardware features like Intel CET add a shadow stack to protect return addresses.

RELRO and Fortify

Other hardening you will encounter:

  • Full RELRO makes the GOT read-only, blocking GOT-overwrite tricks
  • FORTIFY_SOURCE adds bounds checks to common functions

Check which are enabled before planning an approach.

checksec --file=./target
# RELRO: Full   Canary: Yes   NX: Yes   PIE: Yes

The Mitigation Mindset

Exploit development is an enumerate-then-bypass process: list active mitigations, then find the bug or leak that neutralizes each. Strong defenses do not make exploitation impossible, only more demanding.

PIE and Position Independence

PIE (Position Independent Executable) lets ASLR randomize the main binary itself, not just libraries. Without PIE, the executable loads at a fixed base, giving attackers reliable gadget addresses.

checksec reporting 'PIE: No' is a meaningful weakness worth noting.

Quick Check

Which technique is specifically designed to bypass DEP/NX by reusing existing executable code instead of injecting new code?

Recap

You now map the modern defensive landscape:

  • DEP/NX blocks injected code; ROP reuses existing code
  • ASLR randomizes addresses; info leaks defeat it
  • Canaries, CFI/CFG, RELRO add further hurdles

Real exploitation means enumerating these and chaining bugs to bypass each.

เริ่มต้นได้ฟรี

เรียนรู้ Assembly ด้วย AI tutor — ฟรี

เขียนและเรียกใช้โค้ดจริงในเบราว์เซอร์ของคุณ รับความช่วยเหลือทันทีจาก AI tutor 24/7 และเรียนรู้ต่อจากที่คุณหยุดบนเว็บหรือในแอป

คอร์ส
12
บทเรียน
48

คำถามที่พบบ่อย

บทเรียน “กลไกบรรเทาการโจมตีสมัยใหม่และวิธีหลบเลี่ยง” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “กลไกบรรเทาการโจมตีสมัยใหม่และวิธีหลบเลี่ยง” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Reverse Engineering & Binary Analysis Basics ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Reverse Engineering & Binary Analysis Basics มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “กลไกบรรเทาการโจมตีสมัยใหม่และวิธีหลบเลี่ยง”

ทำความเข้าใจแนวป้องกันที่ขวางระหว่างช่องโหว่กับการโจมตีที่ใช้งานได้จริง ได้แก่ ASLR, DEP/NX, แคนารีของสแตก และ CFG รวมถึงแนวคิดระดับสูงเบื้องหลังการหลบเลี่ยงกลไกเหล่านี้ คุณปฏิบัติ Reverse Engineering & Binary Analysis Basics ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Reverse Engineering & Binary Analysis Basics หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน Reverse Engineering & Binary Analysis Basics บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน

บทเรียน “กลไกบรรเทาการโจมตีสมัยใหม่และวิธีหลบเลี่ยง” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน Reverse Engineering & Binary Analysis Basics นี้ได้ไหม

ได้ บทเรียน Reverse Engineering & Binary Analysis Basics ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. การระบุช่องโหว่ในไบนารี
  2. บทนำสู่ฟัซซิง
  3. ภาพรวมองค์ประกอบพื้นฐานของการโจมตี
  4. กลไกบรรเทาการโจมตีสมัยใหม่และวิธีหลบเลี่ยง
← กลับไปที่ Reverse Engineering & Binary Analysis Basics