8000 feat(932125): update list with latest aliases by fzipi · Pull Request #3050 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(932125): update list with latest aliases #3050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion regex-assembly/932125.ra
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

##! Word list for rule 932125 (RCE Windows command injection - PowerShell aliases)
##!
##! This list comes from the powershell source code. Can be updated using this oneliner:
##! curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/System.Management.Automation/engine/InitialSessionState.cs -o - | awk -F\" '/new SessionStateAliasEntry\("/ { print $2; }'
##! To prevent some FP for a command, you can require command parameters
##! after a command. Only do this if the command regularly causes FP and if
##! allowing the bare command (without parameters) is not too dangerous.
Expand Down Expand Up @@ -86,21 +88,28 @@

ac@
asnp@
cd@
##! disabled for FP: cat@
chdir@
clc@
##! disabled for FP: clear
clhy@
cli@
clp@
cls
clv@
cnsn
##! disabled for FP: compare@
##! disabled for FP: copy@
cp@
cpi@
cpp@
cvpa@
dbp@
del@
diff@
dir@
dnsn
ebp@
epal@
epcsv@
Expand All @@ -120,6 +129,7 @@
gcm@
gcs@
gdr@
gerr
ghy@
gi@
gjb@
Expand All @@ -128,13 +138,15 @@
gmo@
gp@
gps@
gpv
##! disabled for FP: group
gsn@
gsnp@
gsv@
gu@
gv@
gwmi@
##! disabled for FP: h
##! disabled for FP: history
icm@
iex@
Expand All @@ -144,39 +156,50 @@
ipcsv@
ipmo@
ipsn@
irm@
ise@
iwmi@
iwr@
##! disabled for FP: kill
lp@
ls
man@
md@
##! disabled for FP: measure
mi@
mount@
##! disabled for FP: move
mp@
mv@
nal@
ndr@
ni@
nmo@
npssc
nsn@
nv@
ogv@
##! disabled for FP: oh
popd@
pushd@
##! disabled for FP: pwd
##! disabled for FP: r
rbp@
rcjb@
rcsn
rd@
rdr@
ren@
ri@
rjb@
rm@
rmdir@
rmo@
rni@
rnp@
rp@
rsn@
rsnp@
rujb
rv@
rvpa@
rwmi@
Expand All @@ -188,16 +211,21 @@
sc@
##! disabled for FP: select
##! disabled for FP: set
shcm
si@
sl@
##! disabled for FP: sleep
sls@
##! disabled for FP: sort
sp@
spjb@
spps@
spsv@
##! disabled for FP: start
sujb
sv@
swmi@
##! disabled for FP: tee
trcm@
##! disabled for FP: type
##! disabled for FP: where
Expand Down
2 changes: 1 addition & 1 deletion rules/REQUEST-932-APPLICATION-ATTACK-RCE.conf
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAME
# (consult https://coreruleset.org/docs/development/regex_assembly/ for details):
# crs-toolchain regex update 932125
#
SecRule REQUEST_COOKIES|!REQUEST_COOKIES:/__utm/|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:/* "@rx (?i)(?:[\n\r;`\{]|\|\|?|&&?)[\s\v]*[\s\v\"'-\(,@]*(?:[\"'\.-9A-Z_a-z]+/|(?:[\"'\x5c\^]*[0-9A-Z_a-z][\"'\x5c\^]*:.*|[ \"'\.-9A-Z\x5c\^-_a-z]*)\x5c)?[\"\^]*(?:(?:a[\"\^]*(?:c|s[\"\^]*n[\"\^]*p)|c[\"\^]*(?:h[\"\^]*d[\"\^]*i[\"\^]*r|l[\"\^]*(?:[cipv]|h[\"\^]*y)|p[\"\^]*[ip]|v[\"\^]*p[\"\^]*a)|d[\"\^]*(?:b[\"\^]*p|e[\"\^]*l|i[\"\^]*r)|e[\"\^]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