mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-12-06 12:24:44 +00:00
Regex and string intercept rules were matched on the raw tool input, but Bash removes quotes and backslashes and decodes $'...' before it runs a command: r\m -rf, r''m -rf, rm -r''f, rm -R -$'f' and a backslash-newline inside a word all ran rm -rf while the built-in recursive-force-delete rule did not match, and so did rm -rf on the line after another command, because the JSON escape of the newline glued an "n" to the command name. A deny or ask rule on a Bash call now also meets the command decoded with the argv word decoder, the simple commands joined by "; ". Allow rules are still matched on the text as written. The word decoder now decodes ANSI-C strings instead of treating them as opaque, which also lets argv deny and ask rules meet $'nmap' and bash -c $'nmap x'.