Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
semantic_firewall — Generate deterministic semantic fingerprints for Go functions. Detect xz-style backdoors and verify semantic equivalence using Static Single Assignment (SSA) analysis and Scalar Evolution. | Kitploit
도구/GitHubGitHub/blackvectorops/semantic_firewall
Defensive ToolsStatic AnalysisStatic Code Analysis (SAST)Vulnerability AnalysisCode AnalysisMalware AnalysisDevSecOpsSupply Chain SecurityAI-Assisted Reversing
GitHubblackvectorops/semantic_firewall

semantic_firewall

Generate deterministic semantic fingerprints for Go functions. Detect xz-style backdoors and verify semantic equivalence using Static Single Assignment (SSA) analysis and Scalar Evolution.

3611414시간 6분 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
저장소 보기
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

Semantic Firewall

Go Reference License: MIT Marketplace Semantic Check

sfw is a static analyzer for Go source. It builds SSA with golang.org/x/tools/go/ssa, rewrites each function into a canonical IR, and fingerprints the function as the SHA-256 of that IR. On top of the fingerprint:

  • sfw diff compares two files function by function. It matches renamed functions by topology and scores each change by the capabilities it newly reaches and the guards, checks and security settings it removes.
  • sfw deps diff compares the third-party code two trees of a module compile in: changed functions, exported functions that newly reach a capability, and changed files the analysis cannot see.
  • sfw audit sends a diff's high-risk changes, their source and the commit message to an LLM, which reads the code (through tools, with a Claude model) and decides whether the message describes the change.
  • sfw index and sfw scan match function topologies against a signature store (PebbleDB or JSON).

The analysis never executes the code under test.

[!CAUTION] This tool is provided for defensive security research and authorized testing only. Do not use it to create, distribute, or deploy malware. Users are responsible for compliance with applicable laws and organizational policies. The author assumes no liability for misuse.

Contents

  • Install
  • Commands
  • sfw check
  • sfw diff
  • Risk scoring
  • Detection scope
  • sfw deps diff
  • sfw audit
  • sfw index and sfw scan
  • Signature store
  • Fingerprint pipeline
  • Semantic Zipper
  • Function topology
  • Entropy and obfuscation
  • Sandbox
  • GitHub Action
  • Library usage
  • Development

Install

go install github.com/BlackVectorOps/semantic_firewall/v7/cmd/[email protected]

go.mod declares go 1.27.2. sfw version prints the build:

Semantic Firewall CLI
Build: v7.1.1 (Pebble/Gob+PackedIdx)

Commands

Flags must come before positional arguments. The CLI parses each command with Go's flag package, which stops at the first non-flag argument; flags placed after a file name are silently ignored.

CommandFlags (default)ArgumentsSandboxed
check--strict (false), --scan (false), --db (""), --no-sandbox (false)<file.go|dir>yes
diff--no-sandbox (false), --batch ("")<old.go> <new.go>, or none with --batch <pairs-file>yes
deps diff--no-sandbox (false)<old-module-dir> <new-module-dir>yes
audit--model (claude-opus-5-5), --api-key (""), --api-base (""), --no-sandbox (false)<old.go> <new.go> "<commit message>"yes (the diff step)
index--name (required), --severity (HIGH), --category (malware), --db ("")<file.go|dir>no
scan--db (""), --threshold (0.75), --exact (false), --deps (false), --deps-depth (direct), --no-sandbox (false)<file.go|dir>yes
migrate--from (required), --to (required)noneno
stats--db ("")noneno
versionnonenoneno

sfw <command> -h lists a command's flags. --severity is stored as given, without validation. Any --deps-depth value other than transitive is treated as direct.

Exit codes:

CommandExit 0Exit 1
checkanalysis ran, even when a file failed to load (reported in that file's error field)--strict and any file errored; fatal errors
diffdiff produced, regardless of riskfatal errors
diff --batchevery pair diffed, regardless of riskany pair failed (after printing all results); fatal errors
deps diffdiff produced, regardless of riskeither tree failed to load; fatal errors
scanscan ran, regardless of alertsfatal errors (e.g. no database)
auditverdict MATCHverdict LIE, SUSPICIOUS or ERROR

diff treats a missing input file as an empty file.

sfw check

Prints a JSON array with one entry per file. A directory is walked recursively, skipping vendor/, hidden directories and _test.go files. Function names are package-qualified: a file loaded on its own belongs to command-line-arguments.

sfw check --no-sandbox new.go
[
  {
    "file": "new.go",
    "functions": [
      { "function": "command-line-arguments.Handle",   "fingerprint": "4acdccda3895dd4cec3af2d55ad43489f91860cd226f82091eaf0a2429849e2f", "file": "/work/new.go", "line": 5 },
      { "function": "command-line-arguments.Handle$1", "fingerprint": "1777c5c3ae9a69e395f6bbe8f35a1e447d25534afec7bb907eacf873e7d4917c", "file": "/work/new.go", "line": 7 },
      { "function": "command-line-arguments.Sum",      "fingerprint": "7cc1efa6ef6ca643863de5dcb0a68f7c80cd6dae8c530697706f40ce737030ae", "file": "/work/new.go", "line": 10 },
      { "function": "command-line-arguments.init",     "fingerprint": "825a2d206f4eb4ea4413c050e4ca9e4b8e439c2067219829a8fef891031a1850", "file": "" }
    ]
  }
]

The output above was captured from a real run, with the absolute path shortened to /work and each object put on one line. new.go is the file in the sfw diff example.

  • --strict: an unhandled SSA instruction makes the canonicalizer fail instead of emitting UnhandledInstr<T>, and any per-file error makes the command exit 1.
  • --scan: each function's topology is also matched against the signature database (--db, or the default resolution) at a fixed threshold of 0.75. The matches go in a scan_results field. A missing database is a fatal error.

sfw diff

Input:

// old.go
package p

import "fmt"

func Handle(cmd string) { fmt.Println(cmd) }

func Add(a, b int) int { return a + b }
// new.go
package p

import "net"

func Handle(cmd string) {
	net.Dial("tcp", cmd)
	go func() {}()
}

func Sum(a, b int) int { return a + b }

sfw diff --no-sandbox old.go new.go prints the following. This is the full output, except that the init entry is abbreviated to its status and delta.

도구 다운로드