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

推荐订阅源

J
Java Code Geeks
S
SegmentFault 最新的问题
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
博客园 - 【当耐特】
Recent Announcements
Recent Announcements
I
InfoQ
U
Unit 42
博客园_首页
GbyAI
GbyAI
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 聂微东
T
Tailwind CSS Blog
量子位

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders
GitHub - pwnwriter/seg: Analyze binaries and generate str...
pwn0x01 · 2026-04-30 · via Hacker News - Newest: "AI"

Analyze. Understand. Exploit binaries || seg,  A CLI tool that gives you actionable binary intelligence in one command. Point it at any ELF binary and get a full recon report — protections, dangerous functions, symbols with PLT/GOT addresses, disassembly highlights, libc resolution, and a suggested exploit strategy. Built for CTF players, pentesters, and AI agents.

No more running 7 tools and cross-referencing output manually. One command. Full picture. 🦀

GitHub Release Crate Release MIT LICENSE ko-fi

-----------------------------------------------------

Table of contents

-----------------------------------------------------

Features

  • One command recon: Run seg analyze ./binary and get everything — protections, symbols, strings, disassembly, exploit strategy.
  • Dual output: --markdown for humans, --json for AI agents and automation pipelines.
  • Dangerous function detection: Flags gets, strcpy, system, printf and 17 more risky functions with call-site locations.
  • Exploit strategy: Automatically suggests ret2libc, ret2win, format string, shellcode, ROP, or heap exploitation based on what it finds.
  • Libc resolution: Extracts local libc from ldd and queries libc.rip for remote libc matching with useful offsets (system, str_bin_sh, etc.).
  • Disassembly highlights: Pulls out main, _start, and suspiciously named functions (vuln, win, backdoor, shell, etc.).
  • String categorization: Separates shell commands, format strings, file paths, URLs, and suspicious strings.
  • Portable: Written in Rust. Wraps standard Linux tools you already have.

TODO (pls help)

  • seg invoke: call exported functions from shared libraries using dlopen, dlsym, and libffi.

  • seg invoke --addr: call functions inside ELF binaries by address using debugger-assisted execution.

  • seg hook: hook libc/imported functions using LD_PRELOAD.

  • seg hook --frida: runtime hooks using Frida later.

    References: https://youtu.be/0o8Ex8mXigU?si=Qq60LRr5jUB_nnwR

Installation

🌼 Source  
git clone --depth=1 https://github.com/pwnwriter/seg --branch=main
cd seg
cargo build --release

Binary will be at target/release/seg. Move it to your $PATH.

🎠 Cargo  
cargo install seg
❄️ Nix  
nix run github:pwnwriter/seg

Requirements

seg wraps these standard Linux tools (most are pre-installed):

Tool Package Purpose
file coreutils Binary type detection
stat coreutils File metadata
strings binutils String extraction
readelf binutils ELF headers, sections, segments, symbols
objdump binutils Disassembly, PLT/GOT resolution
ldd glibc Linked library detection
checksec checksec Security protections

Missing tools won't crash seg — they degrade gracefully and report what couldn't be gathered.

-----------------------------------------------------

Usage

╔═╝╔═╝╔═╝
══║╔═╝║ ║
══╝══╝══╝ v0.1.0
    Analyze. Understand. Exploit binaries
                @pwnwriter/seg
  • Markdown report to stdout  
    seg analyze ./vuln --markdown
  • Markdown report to file  
    seg analyze ./vuln --markdown report.md
  • JSON report to stdout  
    seg analyze ./vuln --json
  • JSON report to file  
    seg analyze ./vuln --json report.json
  • Both formats at once  
    seg analyze ./vuln --markdown report.md --json report.json
  • Short aliases  
    seg ana ./vuln --json
    seg analy ./vuln --markdown
  • Pipe JSON to jq  
    seg analyze ./vuln --json | jq '.strategy'
    seg analyze ./vuln --json | jq '.dangerous_functions'
    seg analyze ./vuln --json | jq '.exploitation_hints'

-----------------------------------------------------

Report Sections

📊 View Report Sections
# Section Description
1 Summary Binary path, type, arch, bits, endianness
2 Security Protections PIE, NX, Canary, RELRO, Fortify
3 File Metadata Size, permissions, owner, SHA256
4 ELF Headers Entry point, machine, ABI
5 Program Segments LOAD, INTERP, etc. with permissions
6 Sections .text, .plt, .got, .bss, etc.
7 Linked Libraries Shared libraries from ldd
8 Dynamic Entries NEEDED, INIT, FINI, etc.
9 Imported Functions Name, library, PLT address, GOT address
10 Exported Symbols Name, address, type
11 Interesting Strings Shell, format strings, paths, URLs, suspicious
12 Disassembly Highlights Entry point, main, suspicious functions
13 Dangerous Functions gets, strcpy, system, printf, etc. with risk + location
14 Exploitation Hints Buffer overflow, format string, ret2libc, ROP
15 Libc Information Local libc + libc.rip matching
16 Suggested Strategy Most likely exploit path with step-by-step
17 AI Agent Summary One-line summary for automation
18 Raw Tool Outputs Unprocessed output from all tools

-----------------------------------------------------

How it works

seg is a wrapper and analyzer — it runs standard binary analysis tools, parses their output, cross-references the results, and generates structured intelligence:

Binary ──→ file, stat, readelf, objdump, strings, ldd, checksec
               │
               ▼
         Parse & Cross-reference
               │
               ▼
    Dangerous functions + Exploitation hints + Strategy
               │
               ▼
       Markdown (human) / JSON (machine)

The JSON output is designed to be consumed directly by AI agents, exploit scripts, or automation pipelines. Every address, every symbol, every protection status is structured and queryable.

-----------------------------------------------------

Contribution

Contributions are welcome! You can suggest features, report bugs, fix issues via issues or pull requests. Help with code, documentation, and spreading the word about seg is appreciated!

Building test binaries

# Compile sample vulnerable binaries for testing
./tests/compile.sh

# Run seg against them
seg analyze ./tests/bins/bof_basic --markdown
seg analyze ./tests/bins/fmt_string --json
seg analyze ./tests/bins/ret2libc --json | jq '.strategy'
seg analyze ./tests/bins/heap_uaf --json | jq '.dangerous_functions'

Support

I am a student currently attending university. I like working for Open Source in my free time. If you find my tool or work beneficial, please consider supporting me via KO-FI by leaving a star; I'll appreciate your action :)

Also see

  • Haylxon :- A blazingly fast tool to grab screenshots of webpages from terminal
  • Kanha :- A web-app pentesting suite written in Rust
  • checksec :- Bash script to check binary security properties
  • pwntools :- CTF framework and exploit development library
  • binsider :- Analyze ELF binaries like a boss 😼🕵️‍♂️

License

Licensed under the MIT LICENSE

Copyright © 2026 - present pwnwriter me