{"id":49889240,"url":"https://github.com/santhsecurity/attackstr","last_synced_at":"2026-05-15T20:09:08.405Z","repository":{"id":347044437,"uuid":"1192202188","full_name":"santhsecurity/attackstr","owner":"santhsecurity","description":"Grammar-based security payload generation — TOML-driven, composable, mutation engine, 19 encodings","archived":false,"fork":false,"pushed_at":"2026-05-09T21:16:19.000Z","size":158,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-09T23:28:13.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://santh.dev","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/santhsecurity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-26T01:42:17.000Z","updated_at":"2026-05-09T21:16:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/santhsecurity/attackstr","commit_stats":null,"previous_names":["santhsecurity/attackstr"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/santhsecurity/attackstr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhsecurity%2Fattackstr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhsecurity%2Fattackstr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhsecurity%2Fattackstr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhsecurity%2Fattackstr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santhsecurity","download_url":"https://codeload.github.com/santhsecurity/attackstr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santhsecurity%2Fattackstr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33078186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:05:40.333Z","status":"ssl_error","status_checked_at":"2026-05-15T20:05:38.672Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-15T20:09:07.438Z","updated_at":"2026-05-15T20:09:08.400Z","avatar_url":"https://github.com/santhsecurity.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# attackstr\n\nGenerate attack strings from TOML grammars. You define contexts, techniques, variables, and encodings in a TOML file. attackstr expands them into every combination and hands you back structured payloads with metadata.\n\n```rust\nuse attackstr::PayloadDb;\n\nlet mut db = PayloadDb::new();\ndb.load_toml(\n    r#\"\n[grammar]\nname = \"inline-example\"\nsink_category = \"sql-injection\"\n\n[[contexts]]\nname = \"quoted\"\nprefix = \"'\"\nsuffix = \" --\"\n\n[[techniques]]\nname = \"tautology\"\ntemplate = \"{prefix} OR 1=1{suffix}\"\n\n[[encodings]]\nname = \"raw\"\ntransform = \"identity\"\n\"#,\n)\n.unwrap();\n\nfor payload in db.payloads(\"sql-injection\") {\n    println!(\"{}\", payload.text);\n}\n```\n\n## Why this exists\n\nEvery security scanner needs attack payloads. SQLi, XSS, command injection, SSTI, SSRF. Most tools hardcode them as string arrays. When you want to add a new encoding or context, you edit Rust code and recompile.\n\nattackstr moves payloads into TOML files. Add a new technique by editing a file. No recompilation. The grammar expansion engine handles the combinatorics.\n\n## What you get\n\n- TOML grammar files define contexts, techniques, variables, encodings\n- Cartesian expansion: contexts x techniques x variables x encodings\n- 19 built-in encodings (URL, hex, unicode, base64, HTML entities, charcode, and more)\n- 7 mutation strategies for WAF bypass variants (case, whitespace, null bytes, SQL comments, HTML, unicode normalization)\n- Custom encoding registration (bring your own transforms)\n- Taint markers for tracking payload flow through targets\n- Grammar validation at load time with actionable error messages\n- TOML configuration for all settings\n- Serde on every type (serialize/deserialize payloads, cache them, send them over the wire)\n\n## Grammar format\n\n```toml\n[grammar]\nname = \"sql-injection\"\nsink_category = \"sql-injection\"\n\n[[contexts]]\nname = \"string-break\"\nprefix = \"';\"\nsuffix = \"\"\n\n[[techniques]]\nname = \"union-based\"\ntemplate = \"{prefix} UNION SELECT {column}{suffix}\"\n\n[[columns]]\nvalue = \"NULL,NULL,NULL\"\n\n[[columns]]\nvalue = \"1,2,3\"\n\n[[encodings]]\nname = \"raw\"\ntransform = \"identity\"\n\n[[encodings]]\nname = \"url\"\ntransform = \"url_encode\"\n```\n\nThis grammar produces 4 payloads (2 columns x 1 technique x 2 encodings).\n\n## Configuration\n\nLoad settings from TOML:\n\n```toml\nmax_per_category = 1000\ndeduplicate = true\nmarker_prefix = \"SLN\"\ntarget_runtime = [\"php\", \"node\"]\nexclude_categories = [\"xxe\"]\ngrammar_dirs = [\"./grammars\", \"/usr/share/grammars\"]\n```\n\n## Mutations\n\nGenerate evasion variants from any payload:\n\n```rust\nuse attackstr::mutate_all;\n\nlet variants = mutate_all(\"UNION SELECT 1,2,3\");\n// Produces: case alternation, whitespace variants, SQL comment injection,\n// null byte insertion, unicode normalization bypasses, mixed encodings\n```\n\n## Contributing\n\nPull requests are welcome. There is no such thing as a perfect crate. If you find a bug, a better API, or just a rough edge, open a PR. We review quickly.\n\n## License\n\nMIT. Copyright 2026 CORUM COLLECTIVE LLC.\n\n[![crates.io](https://img.shields.io/crates/v/attackstr.svg)](https://crates.io/crates/attackstr)\n[![docs.rs](https://docs.rs/attackstr/badge.svg)](https://docs.rs/attackstr)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanthsecurity%2Fattackstr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanthsecurity%2Fattackstr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanthsecurity%2Fattackstr/lists"}